Skip to content

Instantly share code, notes, and snippets.

@kylebrandt
Last active October 31, 2022 13:42
Show Gist options
  • Save kylebrandt/5b58c4f84db6e9cfc786aa41e5978e97 to your computer and use it in GitHub Desktop.
Save kylebrandt/5b58c4f84db6e9cfc786aa41e5978e97 to your computer and use it in GitHub Desktop.
Contract Dashboards Mock Datasource
{
"__inputs": [
{
"name": "DS_MOCK",
"label": "Mock",
"description": "",
"type": "datasource",
"pluginId": "grafana-mock-datasource",
"pluginName": "Mock"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.0-pre"
},
{
"type": "datasource",
"id": "grafana-mock-datasource",
"name": "Mock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"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,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"title": "NoData & Empty",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 1
},
"id": 4,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-long\"\n },\n \"fields\": []\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericLong: No Data",
"type": "table"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 1
},
"id": 5,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-long\"\n },\n \"fields\": [\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSleepHoursPerSlothPerDay\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericLong: Empty",
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 6
},
"id": 7,
"panels": [],
"title": "Two Items",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 7
},
"id": 8,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-long\"\n },\n \"fields\": [\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [4, 7.5],\n [\"LGA\", \"MIA\"]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericLong: Two Items By Dimension",
"type": "table"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 7
},
"id": 9,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-long\"\n },\n \"fields\": [\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSleepHoursPerSlothPerDay\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [4, 7.5],\n [23.5, 23.2],\n [\"LGA\", \"MIA\"]\n ]\n }\n }\n]\n",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericLong: Four Items By Name & Dimension",
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 12
},
"id": 11,
"panels": [],
"title": "Four Items",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 13
},
"id": 12,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-long\"\n },\n \"fields\": [\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSleepHoursPerSlothPerDay\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [4, 7.5],\n [23.5, 23.2],\n [\"LGA\", \"MIA\"]\n ]\n }\n }\n]\n",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericLong: Four Items By Name & Dimension",
"type": "table"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Contract: NumericLong",
"uid": "O8FmVgH4k",
"version": 8,
"weekStart": ""
}
{
"__inputs": [
{
"name": "DS_MOCK",
"label": "Mock",
"description": "",
"type": "datasource",
"pluginId": "grafana-mock-datasource",
"pluginName": "Mock"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.0-pre"
},
{
"type": "datasource",
"id": "grafana-mock-datasource",
"name": "Mock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"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,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 7,
"panels": [],
"title": "No Data & Empty",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 1
},
"id": 8,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-wide\"\n },\n \"fields\": []\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericWide: No Data",
"type": "table"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two items identified by Dimensions, no value for each item",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 1
},
"id": 5,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-wide\"\n },\n \"fields\": [\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n ],\n [\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericWide: Two Empty Items",
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 6
},
"id": 4,
"panels": [],
"title": "Two Items",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two items identified by Dimensions",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 7
},
"id": 2,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-wide\"\n },\n \"fields\": [\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 4\n ],\n [\n 7.5\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericWide: Two Items",
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 12
},
"id": 10,
"panels": [],
"title": "Remainder Data",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two items identified by Dimensions with a remainder time field",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 13
},
"id": 11,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"numeric-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"avgSlothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976\n ],\n [\n 4\n ],\n [\n 7.5\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NumericWide: Two Items (Remainder Time Field)",
"type": "table"
}
],
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Contract: NumericWide",
"uid": "sBo1WuIVz",
"version": 7,
"weekStart": ""
}
{
"__inputs": [
{
"name": "DS_MOCK",
"label": "Mock",
"description": "",
"type": "datasource",
"pluginId": "grafana-mock-datasource",
"pluginName": "Mock"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.2.2-eb6f0ffe76"
},
{
"type": "datasource",
"id": "grafana-mock-datasource",
"name": "Mock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"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"
}
]
},
"description": "",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 11,
"panels": [],
"title": "NoData & Empty",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "No Fields",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 1
},
"id": 13,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-long\"\n },\n \"fields\": []\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "Long (NoData)",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two Numeric fields and a string field.",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 1
},
"id": 14,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-long\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"sleepHoursPerSlothPerDay\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "Long (Empty)",
"type": "timeseries"
},
{
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 6
},
"id": 7,
"title": "Two Series",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two time series, conceptually slothCount{city=MIA} and slothCount{city=LGA}",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 7
},
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-long\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664901845976,\n 1664902845976,\n 1664902845976\n ],\n [\n 3,\n 6,\n 5,\n 9\n ],\n [\n \"LGA\",\n \"MIA\",\n \"LGA\",\n \"MIA\"\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesLong - Two Items Identified by Dimension",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two time series, conceptually slothCount{city=MIA} and slothCount{city=LGA}\nTransform: Prepare Time Series - Format Multi-Frame",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 7
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-long\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664901845976,\n 1664902845976,\n 1664902845976\n ],\n [\n 3,\n 6,\n 5,\n 9\n ],\n [\n \"LGA\",\n \"MIA\",\n \"LGA\",\n \"MIA\"\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesLong - (With Transform) Two Items Identified by Dimension",
"transformations": [
{
"id": "prepareTimeSeries",
"options": {
"format": "many"
}
}
],
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 13
},
"id": 9,
"panels": [],
"title": "Four Series",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Four Time Series, conceptually slothCount{city=MIA} and slothCount{city=LGA} as well as sleepHoursPerSlothPerDay{city=MIA} and sleepHoursPerSlothPerDay{city=LGA}",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 0,
"y": 14
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-long\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"sleepHoursPerSlothPerDay\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664901845976,\n 1664902845976,\n 1664902845976\n ],\n [\n 3,\n 6,\n 5,\n 9\n ],\n [\n 22,\n 23,\n 21.5,\n 23\n ],\n [\n \"LGA\",\n \"MIA\",\n \"LGA\",\n \"MIA\"\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesLong - Four Items Identified by Name & Dimension",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Four Time Series, conceptually slothCount{city=MIA} and slothCount{city=LGA} as well as sleepHoursPerSlothPerDay{city=MIA} and sleepHoursPerSlothPerDay{city=LGA}",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 14
},
"id": 5,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-long\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"sleepHoursPerSlothPerDay\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"city\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664901845976,\n 1664902845976,\n 1664902845976\n ],\n [\n 3,\n 6,\n 5,\n 9\n ],\n [\n 22,\n 23,\n 21.5,\n 23\n ],\n [\n \"LGA\",\n \"MIA\",\n \"LGA\",\n \"MIA\"\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesLong - (With Transform) Four Items Identified by Name & Dimension",
"transformations": [
{
"id": "prepareTimeSeries",
"options": {
"format": "many"
}
}
],
"type": "timeseries"
}
],
"refresh": false,
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2022-10-04T16:35:45.976Z",
"to": "2022-10-04T17:09:05.976Z"
},
"timepicker": {},
"timezone": "",
"title": "Contract: TimeSeriesLong",
"uid": "cX5_RsV4k",
"version": 2,
"weekStart": ""
}
{
"__inputs": [
{
"name": "DS_MOCK",
"label": "Mock",
"description": "",
"type": "datasource",
"pluginId": "grafana-mock-datasource",
"pluginName": "Mock"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.0-pre"
},
{
"type": "datasource",
"id": "grafana-mock-datasource",
"name": "Mock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"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,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"panels": [],
"title": "NoData / Empty",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single Frame, No Fields",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 1
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\"\n },\n \"fields\": []\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesMulti - NoData",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single Labeled Empty Series",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 1
},
"id": 5,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n ]\n }\n }\n ]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesMulti - Empty",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 6
},
"id": 7,
"panels": [],
"title": "Two Series",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two Labeled (Identified by Dimensions) Series. One series with remainder string field",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 7
},
"id": 9,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"slothNote\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ],\n [\n \"\",\n \"Sloth 🦥\"\n ]\n ]\n }\n },\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901855976,\n 1664902455976,\n 1664902855976\n ],\n [\n 6,\n 7,\n 9\n ]\n ]\n }\n }\n ]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesMulti - Two Series (One with Remainder Field)",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two Labeled (Identified by Dimensions) Series. One has Three points, the other two. Timestamps between series are not aligned.",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 7
},
"id": 10,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ]\n ]\n }\n },\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-multi\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901855976,\n 1664902455976,\n 1664902855976\n ],\n [\n 6,\n 7,\n 9\n ]\n ]\n }\n }\n ]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesMulti - Two Series",
"type": "timeseries"
}
],
"refresh": false,
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2022-10-04T16:35:40.976Z",
"to": "2022-10-04T17:09:20.976Z"
},
"timepicker": {},
"timezone": "",
"title": "Contract: TimeSeriesMulti",
"uid": "qeKFgDSVk",
"version": 14,
"weekStart": ""
}
{
"__inputs": [
{
"name": "DS_MOCK",
"label": "Mock",
"description": "",
"type": "datasource",
"pluginId": "grafana-mock-datasource",
"pluginName": "Mock"
}
],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "9.3.0-pre"
},
{
"type": "datasource",
"id": "grafana-mock-datasource",
"name": "Mock",
"version": "0.1.0"
},
{
"type": "panel",
"id": "table",
"name": "Table",
"version": ""
},
{
"type": "panel",
"id": "timeseries",
"name": "Time series",
"version": ""
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"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"
}
]
},
"description": "Via Debug Datasource Raw",
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "What MarshalJSON returns on a data.NewFrame(\"\") in a slice of frames",
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"custom": {
"align": "auto",
"displayMode": "auto",
"inspect": false
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 3,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"footer": {
"fields": "",
"reducer": [
"sum"
],
"show": false
},
"showHeader": true
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"fields\": []\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "Singe Empty Untyped Frame",
"type": "table"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 3
},
"id": 7,
"panels": [],
"title": "TimeSeriesWide",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Timeseries data ... with no data in it.",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 4
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": []\n },\n \"data\": {\n \"values\": []\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "NoData - TimeSeriesWide",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single time series with name and labels, but no datapoints",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 4
},
"id": 5,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"name\": \"slothCount\",\n \"type\": \"number\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n ],\n [\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Single Empty Item",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single time series with an empty name an no labels",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 9
},
"id": 4,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Single Item (Empty Name)",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single time series with name",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 9
},
"id": 16,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"name\": \"slothCount\",\n \"type\": \"number\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Single Item (With Name & Labels)",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Two time series, unique by label, same name",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 14
},
"id": 8,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ],\n [\n 6,\n 9\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Two Series",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 19
},
"id": 11,
"panels": [],
"title": "TimeSeriesWide - Remainder Data",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single time series with name and labels, remainder string field",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 20
},
"id": 9,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"string\",\n \"name\": \"remainder string field\",\n \"typeInfo\": {\n \"frame\": \"string\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ],\n [\n \"remainder\",\n \"data\"\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Remainder String Field",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Single time series with name and labels, remainder time field",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 20
},
"id": 12,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"name\": \"remainder time field\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ],\n [\n 1764901845976,\n 1764902845976\n ]\n ]\n }\n }\n]\n\n",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Remainder Time Field",
"type": "timeseries"
},
{
"collapsed": false,
"gridPos": {
"h": 1,
"w": 24,
"x": 0,
"y": 25
},
"id": 14,
"panels": [],
"title": "TimeSeriesWide - Invalid Cases",
"type": "row"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "Four series spread across two frames, identified as wide, should be invalid by the contract",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 26
},
"id": 15,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"LGA\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"MIA\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 3,\n 5\n ],\n [\n 6,\n 9\n ]\n ]\n }\n },\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"DEN\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"ORG\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 1,\n 2\n ],\n [\n 3,\n 4\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Invalid - Two Wide Frames",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "only a time field (Note, only get the \"Data is missing a number field\" on time series Viz if there is one value in the time field, otherwise no data)",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 12,
"y": 26
},
"id": 18,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Invalid - Time Only",
"type": "timeseries"
},
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"description": "The first frame is nodata, and second frame is a valid wide frame. Should be invalid, as nodata frame should be alone",
"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",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 5,
"w": 12,
"x": 0,
"y": 31
},
"id": 19,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.3.0-pre",
"targets": [
{
"datasource": {
"type": "grafana-mock-datasource",
"uid": "${DS_MOCK}"
},
"generatorSource": "backend",
"queryType": "raw_frame",
"rawFrameContent": "[\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n ]\n },\n \"data\": {\n \"values\": [\n ]\n }\n },\n {\n \"schema\": {\n \"meta\": {\n \"type\": \"timeseries-wide\"\n },\n \"fields\": [\n {\n \"name\": \"t\",\n \"type\": \"time\",\n \"typeInfo\": {\n \"frame\": \"time.Time\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"DEN\"\n }\n },\n {\n \"type\": \"number\",\n \"name\": \"slothCount\",\n \"typeInfo\": {\n \"frame\": \"float64\"\n },\n \"labels\": {\n \"city\": \"ORG\"\n }\n }\n ]\n },\n \"data\": {\n \"values\": [\n [\n 1664901845976,\n 1664902845976\n ],\n [\n 1,\n 2\n ],\n [\n 3,\n 4\n ]\n ]\n }\n }\n]",
"rawFrameSource": "inline",
"refId": "A",
"resultState": "success",
"scenario": "no-data"
}
],
"title": "TimeSeriesWide - Invalid - NoData followed by Data Frame",
"type": "timeseries"
}
],
"refresh": false,
"schemaVersion": 37,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2022-10-04T16:35:45.976Z",
"to": "2022-10-04T17:09:05.976Z"
},
"timepicker": {},
"timezone": "",
"title": "Contract: TimeSeriesWide",
"uid": "hkK-EfV4z",
"version": 28,
"weekStart": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment