diff --git a/devenv/dev-dashboards/panel-timeseries/timeseries-yaxis-ticks.json b/devenv/dev-dashboards/panel-timeseries/timeseries-yaxis-ticks.json index cba384076e1..2538a59e7ae 100644 --- a/devenv/dev-dashboards/panel-timeseries/timeseries-yaxis-ticks.json +++ b/devenv/dev-dashboards/panel-timeseries/timeseries-yaxis-ticks.json @@ -3,56 +3,79 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" } ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "links": [ { - "icon": "external link", - "tags": ["gdev", "graph-ng"], - "type": "dashboards", "asDropdown": true, - "title": "Graph Tests" + "icon": "external link", + "tags": [ + "gdev", + "graph-ng" + ], + "title": "Graph Tests", + "type": "dashboards" } ], + "liveNow": false, "panels": [ { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -61,8 +84,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -84,54 +106,70 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0,500,1000,3000,2500,4000,4500,5000,7000,7500,8000,8500,9000,9500,10000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0 - 10K (unit short)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -140,8 +178,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -163,54 +200,70 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0,500,1000,3000,2500,4000,4500,5000,7000,7500,8000,8500,9000,9500,10000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0 - 10K (unit bytes metric)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -219,8 +272,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -242,54 +294,70 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0,500,1000,3000,2500,4000,4500,5000,7000,7500,8000,8500,9000,9500,10000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0 - 10K (unit bytes IEC)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -298,8 +366,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -321,54 +388,70 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0,500,1000,3000,2500,4000,4500,5000,7000,7500,8000,8500,9000,9500,10000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0 - 10K (unit short)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -377,8 +460,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -400,54 +482,70 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0.001,0.0002,0.0003" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0.0002 - 0.001 (unit short)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -456,8 +554,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -479,28 +576,37 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "12000,15000,20000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 12000 - 30000 (unit ms)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "description": "", "fieldConfig": { "defaults": { @@ -508,26 +614,33 @@ "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -536,8 +649,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -559,28 +671,37 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0,10000000000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0 - 1B (unit short)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "description": "", "fieldConfig": { "defaults": { @@ -588,26 +709,33 @@ "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -616,8 +744,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -639,54 +766,70 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "0,10000000000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 0 - 1B (unit bytes)", "type": "timeseries" }, { - "datasource": null, + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { - "axis": { - "grid": true, - "label": "", - "side": 3, - "width": 60 + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - "bars": { - "show": false + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - "fill": { - "alpha": 0 + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - "line": { - "show": true, - "width": 1 - }, - "nullValues": "null", - "points": { - "radius": 4, - "show": false + "thresholdsStyle": { + "mode": "off" } }, "links": [], @@ -695,8 +838,7 @@ "mode": "absolute", "steps": [ { - "color": "green", - "value": null + "color": "green" }, { "color": "red", @@ -718,31 +860,313 @@ "options": { "legend": { "asTable": false, + "calcs": [], + "displayMode": "list", "isVisible": true, - "placement": "bottom" + "placement": "bottom", + "showLegend": true }, "tooltip": { - "mode": "single" + "mode": "single", + "sort": "none" } }, "pluginVersion": "7.4.0-pre", "targets": [ { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, "refId": "A", "scenarioId": "csv_metric_values", "stringInput": "12000,15000,20000" } ], - "timeFrom": null, - "timeShift": null, "title": "Data from 12000 - 30000 (unit ms)", "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bool" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 0, + "y": 25 + }, + "id": 12, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "0,1" + } + ], + "title": "Boolean True/False", + "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bool_yes_no" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 8, + "y": 25 + }, + "id": 13, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "0,1" + } + ], + "title": "Boolean Yes/No", + "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bool_on_off" + }, + "overrides": [] + }, + "gridPos": { + "h": 6, + "w": 8, + "x": 16, + "y": 25 + }, + "id": 14, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "0,1" + } + ], + "title": "Boolean On/Off", + "type": "timeseries" } ], "refresh": false, - "schemaVersion": 26, + "revision": 1, + "schemaVersion": 37, "style": "dark", - "tags": ["gdev", "panel-tests", "graph-ng"], + "tags": [ + "gdev", + "panel-tests", + "graph-ng" + ], "templating": { "list": [] }, @@ -751,10 +1175,22 @@ "to": "now" }, "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"] + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] }, "timezone": "", "title": "Panel Tests - Graph NG - Y axis ticks", "uid": "29Yjn62Gk", - "version": 2 + "version": 1, + "weekStart": "" } diff --git a/packages/grafana-data/src/field/displayProcessor.ts b/packages/grafana-data/src/field/displayProcessor.ts index 24aef56ab32..cb9f6518464 100644 --- a/packages/grafana-data/src/field/displayProcessor.ts +++ b/packages/grafana-data/src/field/displayProcessor.ts @@ -73,7 +73,7 @@ export function getDisplayProcessor(options?: DisplayProcessorOptions): DisplayP } const hasCurrencyUnit = unit?.startsWith('currency'); - const hasBoolUnit = unit === 'bool'; + const hasBoolUnit = isBooleanUnit(unit); const isNumType = field.type === FieldType.number; const isLocaleFormat = unit === 'locale'; const canTrimTrailingDecimalZeros = diff --git a/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts b/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts index 3fff07ecd41..30fbbfc72ba 100644 --- a/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts +++ b/packages/grafana-ui/src/components/uPlot/config/UPlotAxisBuilder.ts @@ -130,6 +130,7 @@ export class UPlotAxisBuilder extends PlotConfigBuilder { const gridColor = theme.isDark ? 'rgba(240, 250, 255, 0.09)' : 'rgba(0, 10, 23, 0.09)'; + // TODO: this is pretty flimsy now that scaleKey is composed from multiple parts :/ if (isBooleanUnit(scaleKey)) { splits = [0, 1]; }