fix: Balkendiagramme ohne Segment-Beschriftung, Tooltip mit allen Kategorien, Monat ohne Uhrzeit

In gestapelten Balken mit vielen Kategorien überlagerten sich die
Segment-Beschriftungen, sichtbar blieb ein zufälliger kleiner Wert.
Betrifft Monat nach Kategorie und Planung nach Kategorie.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-29 09:29:55 +02:00
co-authored by Claude Opus 5.5
parent b904709d0b
commit d2b21c8f8b
2 changed files with 27 additions and 4 deletions
+8 -4
View File
@@ -103,12 +103,14 @@
"defaults": { "defaults": {
"unit": "currencyEUR" "unit": "currencyEUR"
}, },
"overrides": [] "overrides": [{ "matcher": { "id": "byType", "options": "time" }, "properties": [{ "id": "unit", "value": "time:MM.YYYY" }] }]
}, },
"options": { "options": {
"legend": { "displayMode": "list", "placement": "bottom" }, "legend": { "displayMode": "list", "placement": "bottom" },
"stacking": "normal", "stacking": "normal",
"xTickLabelRotation": 0 "xTickLabelRotation": 0,
"showValue": "never",
"tooltip": { "mode": "multi", "sort": "asc" }
}, },
"targets": [ "targets": [
{ {
@@ -175,11 +177,13 @@
"title": "Planung nach Kategorie", "title": "Planung nach Kategorie",
"datasource": { "type": "postgres", "uid": "FinanzDB" }, "datasource": { "type": "postgres", "uid": "FinanzDB" },
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 16 },
"fieldConfig": { "defaults": { "unit": "currencyEUR" }, "overrides": [] }, "fieldConfig": { "defaults": { "unit": "currencyEUR" }, "overrides": [{ "matcher": { "id": "byType", "options": "time" }, "properties": [{ "id": "unit", "value": "time:MM.YYYY" }] }] },
"options": { "options": {
"legend": { "displayMode": "list", "placement": "bottom" }, "legend": { "displayMode": "list", "placement": "bottom" },
"stacking": "normal", "stacking": "normal",
"xTickLabelRotation": 0 "xTickLabelRotation": 0,
"showValue": "never",
"tooltip": { "mode": "multi", "sort": "asc" }
}, },
"targets": [ "targets": [
{ {
+19
View File
@@ -69,3 +69,22 @@ def test_panels_ueberlappen_nicht_und_ids_eindeutig():
for y in range(g["y"], g["y"] + g["h"]): for y in range(g["y"], g["y"] + g["h"]):
assert (x, y) not in cells, p["title"] assert (x, y) not in cells, p["title"]
cells.add((x, y)) cells.add((x, y))
BARCHARTS = ("Monat nach Kategorie", "Planung nach Kategorie")
def test_barcharts_ohne_segment_beschriftung_mit_voller_aufschluesselung():
"""Gestapelte Balken mit vielen Kategorien: Segment-Beschriftungen
überlagern sich (sichtbar bleibt ein zufälliger kleiner Wert). Daher keine
Werte im Balken, stattdessen alle Kategorien im Tooltip, größte Ausgabe
zuerst, und den Monat ohne Uhrzeit (Monatserster UTC wirkte in MEZ wie
01:00 Uhr)."""
panels = {p["title"]: p for p in _load()["panels"]}
for title in BARCHARTS:
p = panels[title]
assert p["options"]["showValue"] == "never", title
assert p["options"]["tooltip"] == {"mode": "multi", "sort": "asc"}, title
overrides = p["fieldConfig"]["overrides"]
assert {"matcher": {"id": "byType", "options": "time"},
"properties": [{"id": "unit", "value": "time:MM.YYYY"}]} in overrides, title