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:
@@ -103,12 +103,14 @@
|
||||
"defaults": {
|
||||
"unit": "currencyEUR"
|
||||
},
|
||||
"overrides": []
|
||||
"overrides": [{ "matcher": { "id": "byType", "options": "time" }, "properties": [{ "id": "unit", "value": "time:MM.YYYY" }] }]
|
||||
},
|
||||
"options": {
|
||||
"legend": { "displayMode": "list", "placement": "bottom" },
|
||||
"stacking": "normal",
|
||||
"xTickLabelRotation": 0
|
||||
"xTickLabelRotation": 0,
|
||||
"showValue": "never",
|
||||
"tooltip": { "mode": "multi", "sort": "asc" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
@@ -175,11 +177,13 @@
|
||||
"title": "Planung nach Kategorie",
|
||||
"datasource": { "type": "postgres", "uid": "FinanzDB" },
|
||||
"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": {
|
||||
"legend": { "displayMode": "list", "placement": "bottom" },
|
||||
"stacking": "normal",
|
||||
"xTickLabelRotation": 0
|
||||
"xTickLabelRotation": 0,
|
||||
"showValue": "never",
|
||||
"tooltip": { "mode": "multi", "sort": "asc" }
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
|
||||
@@ -69,3 +69,22 @@ def test_panels_ueberlappen_nicht_und_ids_eindeutig():
|
||||
for y in range(g["y"], g["y"] + g["h"]):
|
||||
assert (x, y) not in cells, p["title"]
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user