diff --git a/deploy/historisation/grafana/dashboards/nuit.json b/deploy/historisation/grafana/dashboards/nuit.json index ec9db35..72d9d09 100644 --- a/deploy/historisation/grafana/dashboards/nuit.json +++ b/deploy/historisation/grafana/dashboards/nuit.json @@ -760,9 +760,88 @@ ] }, "options": { - "mapping": "auto", + "mapping": "manual", "series": [ - {} + { + "frame": { + "matcher": { + "id": "byIndex", + "options": 0 + } + }, + "x": { + "matcher": { + "id": "byName", + "options": "Soiree" + } + }, + "y": { + "matcher": { + "id": "byName", + "options": "Nuit sans voiture" + } + } + }, + { + "frame": { + "matcher": { + "id": "byIndex", + "options": 0 + } + }, + "x": { + "matcher": { + "id": "byName", + "options": "Soiree" + } + }, + "y": { + "matcher": { + "id": "byName", + "options": "Nuit avec voiture" + } + } + }, + { + "frame": { + "matcher": { + "id": "byIndex", + "options": 0 + } + }, + "x": { + "matcher": { + "id": "byName", + "options": "Soiree" + } + }, + "y": { + "matcher": { + "id": "byName", + "options": "Regression" + } + } + }, + { + "frame": { + "matcher": { + "id": "byIndex", + "options": 0 + } + }, + "x": { + "matcher": { + "id": "byName", + "options": "Soiree" + } + }, + "y": { + "matcher": { + "id": "byName", + "options": "Ce soir (prevu)" + } + } + } ], "legend": { "showLegend": true, diff --git a/tools/gen-grafana-dashboards.py b/tools/gen-grafana-dashboards.py index 820fdd1..6595fe6 100644 --- a/tools/gen-grafana-dashboards.py +++ b/tools/gen-grafana-dashboards.py @@ -276,7 +276,14 @@ NUIT_XY = {"type": "xychart", "title": "Soiree contre nuit : le nuage des nuits" {"matcher": {"id": "byName", "options": "Ce soir (prevu)"}, "properties": [{"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}, {"id": "custom.pointSize", "value": {"fixed": 18}}]}]}, - "options": {"mapping": "auto", "series": [{}], + # Mapping MANUEL, quatre series sur la MEME trame (index 0). L'automatique + # n'affichait que la premiere colonne Y (28/09, capture du proprietaire) ; la + # premiere version, une trame par requete, affichait « Err ». + "options": {"mapping": "manual", + "series": [{"frame": {"matcher": {"id": "byIndex", "options": 0}}, + "x": {"matcher": {"id": "byName", "options": "Soiree"}}, + "y": {"matcher": {"id": "byName", "options": n}}} + for n in ["Nuit sans voiture", "Nuit avec voiture", "Regression", "Ce soir (prevu)"]], "legend": {"showLegend": True, "displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single", "sort": "none"}}}