diff --git a/brian_dashboard_manager/templating/templates/shared/panel.json.j2 b/brian_dashboard_manager/templating/templates/shared/panel.json.j2 index f3e2389ffbf47896e1bb04afa3a3d5c806964098..005e069176752e00082ad58c14348d5edd185b09 100644 --- a/brian_dashboard_manager/templating/templates/shared/panel.json.j2 +++ b/brian_dashboard_manager/templating/templates/shared/panel.json.j2 @@ -1,10 +1,15 @@ -{ +{ + {% if alias_colors %} + "aliasColors": {{ alias_colors }}, + {% else %} "aliasColors": {}, + {% endif %} "bars": false, "collapsed": null, "dashLength": 10, "dashes": false, "datasource": "{{ datasource }}", + "decimals": 2, "fieldConfig": { "defaults": { "custom": {} @@ -12,15 +17,20 @@ "overrides": [] }, "fill": 1, - "fillGradient": 5, + "fillGradient": 10, "gridPos": { "h": {{ height }}, "w": {{ width }}, + {% if x %} + "x": {{ x }}, + {% else %} "x": 0, + {% endif %} "y": {{ y }} }, "hiddenSeries": false, "id": {{ id }}, + {% if not disable_legend %} "legend": { "alignAsTable": true, "avg": true, @@ -32,8 +42,9 @@ "total": false, "values": true }, + {% endif %} "lines": true, - "linewidth": 1, + "linewidth": {{ linewidth }}, "nullPointMode": "null", "options": { "alertThreshold": true @@ -45,7 +56,11 @@ "search": null, "seriesOverrides": [], "spaceLength": 10, - "stack": null, + {% if stack %} + "stack": true, + {% else %} + "stack": false, + {% endif %} "steppedLine": false, "tags": null, "thresholds": [],