TimeSeries: properly stack series with missing datapoints (#48321)

This commit is contained in:
Leon Sorokin
2022-04-27 09:31:15 -05:00
committed by GitHub
parent 9d129bde76
commit 647f749652
3 changed files with 1004 additions and 8 deletions
@@ -2512,7 +2512,7 @@
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
@@ -2648,7 +2648,7 @@
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
@@ -2784,7 +2784,7 @@
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"legend": false,
@@ -2904,6 +2904,484 @@
"title": "Connect null values = never",
"transformations": [],
"type": "timeseries"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 0,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 21,
"w": 12,
"x": 0,
"y": 44
},
"id": 36,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"csvContent": "time,Label 1\n2021-12-20T05:09:05.832Z,1000",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 10\n2021-12-18T04:54:45.888Z,2500\n2021-12-20T05:09:05.832Z,600\n2021-12-22T05:23:25.776Z,350\n2022-01-03T06:49:25.440Z,500",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "B",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 11\n2021-12-18T04:54:45.888Z,28000\n2021-12-20T05:09:05.832Z,3100\n2021-12-22T05:23:25.776Z,36000\n2021-12-24T05:37:45.720Z,2800",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "C",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 12\n2021-12-20T05:09:05.832Z,255\n2021-12-24T05:37:45.720Z,651\n2021-12-26T05:52:05.664Z,50",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "D",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 13\n2021-12-18T04:54:45.888Z,5000\n2021-12-20T05:09:05.832Z,1231",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "E",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 14\n2021-12-14T04:26:06.000Z,122\n2021-12-16T04:40:25.944Z,123\n2021-12-18T04:54:45.888Z,12345\n2021-12-20T05:09:05.832Z,23456\n2021-12-22T05:23:25.776Z,34567\n2021-12-24T05:37:45.720Z,12345\n2021-12-26T05:52:05.664Z,8000\n2021-12-28T06:06:25.608Z,3000\n2021-12-30T06:20:45.552Z,1000\n2022-01-01T06:35:05.496Z,21",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "F",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 15\n2022-01-07T07:18:05.328Z,20",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "G",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 16\n2022-01-03T06:49:25.440Z,210\n2022-01-07T07:18:05.328Z,321",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "H",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 17\n2021-12-28T06:06:25.608Z,210\n2022-01-07T07:18:05.328Z,210",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "I",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 18\n2021-12-18T04:54:45.888Z,250\n2021-12-20T05:09:05.832Z,852\n2021-12-22T05:23:25.776Z,1234\n2021-12-26T05:52:05.664Z,321\n2021-12-30T06:20:45.552Z,432",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "J",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 2\n2021-12-24T05:37:45.720Z,543\n2021-12-26T05:52:05.664Z,18000\n2021-12-28T06:06:25.608Z,17000\n2021-12-30T06:20:45.552Z,12000\n2022-01-01T06:35:05.496Z,8500\n2022-01-03T06:49:25.440Z,8000\n2022-01-05T07:03:45.384Z,5000\n2022-01-07T07:18:05.328Z,3000\n2022-01-09T07:32:25.272Z,2500\n2022-01-11T07:46:45.216Z,2200\n2022-01-13T08:01:05.160Z,3000\n2022-01-15T08:15:25.104Z,1520\n2022-01-17T08:29:45.048Z,665.35",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "K",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 3\n2022-01-11T07:46:45.216Z,800",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "L",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 4\n2021-12-22T05:23:25.776Z,14173\n2021-12-24T05:37:45.720Z,14805\n2021-12-26T05:52:05.664Z,5600\n2021-12-28T06:06:25.608Z,5950\n2021-12-30T06:20:45.552Z,775\n2022-01-01T06:35:05.496Z,725\n2022-01-03T06:49:25.440Z,1450\n2022-01-05T07:03:45.384Z,3175\n2022-01-07T07:18:05.328Z,1850\n2022-01-09T07:32:25.272Z,1025\n2022-01-11T07:46:45.216Z,2700\n2022-01-13T08:01:05.160Z,4825\n2022-01-15T08:15:25.104Z,3600",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "M",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 5\n2022-01-15T08:15:25.104Z,1675",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "N",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 6\n2021-12-22T05:23:25.776Z,433.16",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "O",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 7\n2021-12-24T05:37:45.720Z,41250\n2021-12-26T05:52:05.664Z,45150\n2021-12-28T06:06:25.608Z,45870.16\n2021-12-30T06:20:45.552Z,38728.17\n2022-01-01T06:35:05.496Z,39931.77\n2022-01-03T06:49:25.440Z,39831.8\n2022-01-05T07:03:45.384Z,38252.06\n2022-01-07T07:18:05.328Z,44332.92\n2022-01-09T07:32:25.272Z,51359.74\n2022-01-11T07:46:45.216Z,56155.84\n2022-01-13T08:01:05.160Z,55676.92\n2022-01-15T08:15:25.104Z,55323.84\n2022-01-17T08:29:45.048Z,13830.96",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "P",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 8\n2021-12-30T06:20:45.552Z,52.89\n2022-01-01T06:35:05.496Z,569.57",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "Q",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 9\n2022-01-01T06:35:05.496Z,2140.34\n2022-01-03T06:49:25.440Z,4074.92\n2022-01-05T07:03:45.384Z,1557.85\n2022-01-07T07:18:05.328Z,1097.74\n2022-01-09T07:32:25.272Z,692.06\n2022-01-11T07:46:45.216Z,758.67\n2022-01-13T08:01:05.160Z,957.56\n2022-01-15T08:15:25.104Z,1470.49\n2022-01-17T08:29:45.048Z,198.18",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "R",
"scenarioId": "csv_content"
}
],
"title": "'undefined' join artifacts (bars)",
"type": "timeseries"
},
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 0,
"pointSize": 4,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "normal"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 21,
"w": 12,
"x": 12,
"y": 44
},
"id": 37,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "multi",
"sort": "none"
}
},
"targets": [
{
"csvContent": "time,Label 1\n2021-12-20T05:09:05.832Z,1000",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "A",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 10\n2021-12-18T04:54:45.888Z,2500\n2021-12-20T05:09:05.832Z,600\n2021-12-22T05:23:25.776Z,350\n2022-01-03T06:49:25.440Z,500",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "B",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 11\n2021-12-18T04:54:45.888Z,28000\n2021-12-20T05:09:05.832Z,3100\n2021-12-22T05:23:25.776Z,36000\n2021-12-24T05:37:45.720Z,2800",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "C",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 12\n2021-12-20T05:09:05.832Z,255\n2021-12-24T05:37:45.720Z,651\n2021-12-26T05:52:05.664Z,50",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "D",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 13\n2021-12-18T04:54:45.888Z,5000\n2021-12-20T05:09:05.832Z,1231",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "E",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 14\n2021-12-14T04:26:06.000Z,122\n2021-12-16T04:40:25.944Z,123\n2021-12-18T04:54:45.888Z,12345\n2021-12-20T05:09:05.832Z,23456\n2021-12-22T05:23:25.776Z,34567\n2021-12-24T05:37:45.720Z,12345\n2021-12-26T05:52:05.664Z,8000\n2021-12-28T06:06:25.608Z,3000\n2021-12-30T06:20:45.552Z,1000\n2022-01-01T06:35:05.496Z,21",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "F",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 15\n2022-01-07T07:18:05.328Z,20",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "G",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 16\n2022-01-03T06:49:25.440Z,210\n2022-01-07T07:18:05.328Z,321",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "H",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 17\n2021-12-28T06:06:25.608Z,210\n2022-01-07T07:18:05.328Z,210",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "I",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 18\n2021-12-18T04:54:45.888Z,250\n2021-12-20T05:09:05.832Z,852\n2021-12-22T05:23:25.776Z,1234\n2021-12-26T05:52:05.664Z,321\n2021-12-30T06:20:45.552Z,432",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "J",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 2\n2021-12-24T05:37:45.720Z,543\n2021-12-26T05:52:05.664Z,18000\n2021-12-28T06:06:25.608Z,17000\n2021-12-30T06:20:45.552Z,12000\n2022-01-01T06:35:05.496Z,8500\n2022-01-03T06:49:25.440Z,8000\n2022-01-05T07:03:45.384Z,5000\n2022-01-07T07:18:05.328Z,3000\n2022-01-09T07:32:25.272Z,2500\n2022-01-11T07:46:45.216Z,2200\n2022-01-13T08:01:05.160Z,3000\n2022-01-15T08:15:25.104Z,1520\n2022-01-17T08:29:45.048Z,665.35",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "K",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 3\n2022-01-11T07:46:45.216Z,800",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "L",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 4\n2021-12-22T05:23:25.776Z,14173\n2021-12-24T05:37:45.720Z,14805\n2021-12-26T05:52:05.664Z,5600\n2021-12-28T06:06:25.608Z,5950\n2021-12-30T06:20:45.552Z,775\n2022-01-01T06:35:05.496Z,725\n2022-01-03T06:49:25.440Z,1450\n2022-01-05T07:03:45.384Z,3175\n2022-01-07T07:18:05.328Z,1850\n2022-01-09T07:32:25.272Z,1025\n2022-01-11T07:46:45.216Z,2700\n2022-01-13T08:01:05.160Z,4825\n2022-01-15T08:15:25.104Z,3600",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "M",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 5\n2022-01-15T08:15:25.104Z,1675",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "N",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 6\n2021-12-22T05:23:25.776Z,433.16",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "O",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 7\n2021-12-24T05:37:45.720Z,41250\n2021-12-26T05:52:05.664Z,45150\n2021-12-28T06:06:25.608Z,45870.16\n2021-12-30T06:20:45.552Z,38728.17\n2022-01-01T06:35:05.496Z,39931.77\n2022-01-03T06:49:25.440Z,39831.8\n2022-01-05T07:03:45.384Z,38252.06\n2022-01-07T07:18:05.328Z,44332.92\n2022-01-09T07:32:25.272Z,51359.74\n2022-01-11T07:46:45.216Z,56155.84\n2022-01-13T08:01:05.160Z,55676.92\n2022-01-15T08:15:25.104Z,55323.84\n2022-01-17T08:29:45.048Z,13830.96",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "P",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 8\n2021-12-30T06:20:45.552Z,52.89\n2022-01-01T06:35:05.496Z,569.57",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "Q",
"scenarioId": "csv_content"
},
{
"csvContent": "time,Label 9\n2022-01-01T06:35:05.496Z,2140.34\n2022-01-03T06:49:25.440Z,4074.92\n2022-01-05T07:03:45.384Z,1557.85\n2022-01-07T07:18:05.328Z,1097.74\n2022-01-09T07:32:25.272Z,692.06\n2022-01-11T07:46:45.216Z,758.67\n2022-01-13T08:01:05.160Z,957.56\n2022-01-15T08:15:25.104Z,1470.49\n2022-01-17T08:29:45.048Z,198.18",
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"refId": "R",
"scenarioId": "csv_content"
}
],
"title": "'undefined' join artifacts (lines)",
"type": "timeseries"
}
],
"refresh": false,
@@ -2925,6 +3403,6 @@
"timezone": "",
"title": "TimeSeries & BarChart Stacking",
"uid": "1KxMUdE7k",
"version": 1,
"version": 5,
"weekStart": ""
}