grafana/devenv/dev-dashboards/panel-piechart/panel_test_piechart.json
Oscar Kilhed aeb4bcb3ed
Grafana/UI: Add basic legend to the PieChart (#31278)
* Add basic legend to the PieChart

* Remove console log

* Remove PieChartWithLegend and refactor PieChart a bit

* Use FALLBACK_COLOR

* Refactor PieChart

* Change back to [function]
2021-02-19 11:49:40 +01:00

469 lines
9.8 KiB
JSON

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 231,
"links": [],
"panels": [
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 3
},
"id": 2,
"options": {
"labelOptions": {
"showName": true,
"showPercent": false,
"showValue": false
},
"pieType": "donut",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": true,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__house_locations",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 5
}
],
"timeFrom": null,
"timeShift": null,
"title": "Donut name",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"decimals": 1,
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"unit": "none"
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 8,
"y": 3
},
"id": 11,
"options": {
"labelOptions": {
"showName": true,
"showPercent": true,
"showValue": false
},
"pieType": "pie",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": true,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__house_locations",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 5
}
],
"timeFrom": null,
"timeShift": null,
"title": "Name and Percent",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 16,
"y": 3
},
"id": 8,
"options": {
"labelOptions": {
"showName": true,
"showPercent": false,
"showValue": false
},
"pieType": "pie",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Name",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 5,
"x": 0,
"y": 17
},
"id": 3,
"options": {
"labelOptions": {
"showName": false,
"showPercent": true,
"showValue": false
},
"pieType": "pie",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Percent",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 5,
"x": 5,
"y": 17
},
"id": 9,
"options": {
"labelOptions": {
"showName": false,
"showPercent": false,
"showValue": true
},
"pieType": "pie",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Value",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 6,
"x": 10,
"y": 17
},
"id": 6,
"options": {
"labelOptions": {
"showName": true,
"showPercent": false,
"showValue": false
},
"pieType": "donut",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Name",
"type": "piechart"
},
{
"datasource": null,
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 8,
"x": 16,
"y": 17
},
"id": 10,
"options": {
"labelOptions": {
"showName": true,
"showPercent": false,
"showValue": false
},
"pieType": "pie",
"reduceOptions": {
"calcs": ["mean"],
"fields": "",
"values": false
},
"showLegend": false,
"strokeWidth": 1
},
"pluginVersion": "7.3.0-pre",
"targets": [
{
"alias": "__server_names",
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 4
}
],
"timeFrom": null,
"timeShift": null,
"title": "Memory",
"type": "piechart"
}
],
"schemaVersion": 26,
"style": "dark",
"tags": ["gdev", "panel-tests"],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Panel Tests - Pie chart",
"uid": "lVE-2YFMz",
"version": 1
}