{ "__inputs": [ { "name": "DS_WAISTLINE-API-DATASOURCE", "label": "waistline-api-datasource", "description": "", "type": "datasource", "pluginId": "marcusolsson-json-datasource", "pluginName": "JSON API" } ], "__elements": {}, "__requires": [ { "type": "panel", "id": "barchart", "name": "Bar chart", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "10.2.3" }, { "type": "datasource", "id": "marcusolsson-json-datasource", "name": "JSON API", "version": "1.3.9" }, { "type": "panel", "id": "piechart", "name": "Pie chart", "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", "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": null, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "semi-dark-purple", "mode": "fixed" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "kcal", "axisPlacement": "auto", "fillOpacity": 80, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1, "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 0 }, "id": 1, "options": { "barRadius": 0, "barWidth": 0.94, "fullHighlight": false, "groupWidth": 0.7, "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "orientation": "vertical", "showValue": "always", "stacking": "none", "tooltip": { "mode": "single", "sort": "none" }, "xField": "Date", "xTickLabelRotation": 0, "xTickLabelSpacing": 0 }, "targets": [ { "cacheDurationSeconds": 600, "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fields": [ { "jsonPath": "$.results[*].calories", "name": "Calories", "type": "number" }, { "jsonPath": "$.results[*].~", "language": "jsonpath", "name": "Date", "type": "time" } ], "hide": false, "method": "GET", "params": [ [ "fields", "calories" ], [ "sort", "ASC" ] ], "queryParams": "", "refId": "A", "urlPath": "" } ], "title": "Calories (This week)", "transformations": [ { "id": "formatTime", "options": { "outputFormat": "DD MMM", "timeField": "Date", "timezone": "browser", "useTimezone": true } } ], "type": "barchart" }, { "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "#526dcc", "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "fillOpacity": 80, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineWidth": 1, "scaleDistribution": { "type": "linear" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 0, "fieldMinMax": false, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "massg" }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 0 }, "id": 2, "options": { "barRadius": 0, "barWidth": 0.94, "fullHighlight": false, "groupWidth": 0.85, "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "orientation": "vertical", "showValue": "always", "stacking": "none", "text": { "valueSize": 12 }, "tooltip": { "mode": "single", "sort": "asc" }, "xField": "Date", "xTickLabelRotation": 0, "xTickLabelSpacing": 0 }, "targets": [ { "cacheDurationSeconds": 600, "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fields": [ { "jsonPath": "$.results[*].proteins", "name": "Proteins", "type": "number" }, { "jsonPath": "$.results[*].fat", "language": "jsonpath", "name": "Fat", "type": "number" }, { "jsonPath": "$.results[*].carbohydrates", "language": "jsonpath", "name": "Carbs", "type": "number" }, { "jsonPath": "$.results[*].~", "language": "jsonpath", "name": "Date", "type": "time" } ], "hide": false, "method": "GET", "params": [ [ "fields", "carbohydrates,proteins,fat" ], [ "sort", "ASC" ] ], "queryParams": "", "refId": "A", "urlPath": "" } ], "title": "Stats (This week)", "transformations": [ { "id": "formatTime", "options": { "outputFormat": "DD MMM", "timeField": "Date", "timezone": "browser", "useTimezone": true } } ], "type": "barchart" }, { "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fieldConfig": { "defaults": { "color": { "mode": "continuous-BlPu" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisGridShow": true, "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 25, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "smooth", "lineStyle": { "fill": "solid" }, "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "always", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 0, "fieldMinMax": false, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 8 }, "id": 5, "options": { "legend": { "calcs": [ "mean", "min", "max" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "timezone": [ "browser" ], "tooltip": { "mode": "single", "sort": "desc" } }, "pluginVersion": "10.2.3", "targets": [ { "cacheDurationSeconds": 600, "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fields": [ { "jsonPath": "$.results[*].calories", "name": "Calories", "type": "number" }, { "jsonPath": "$.results[*].~", "language": "jsonpath", "name": "Date", "type": "time" } ], "hide": false, "method": "GET", "params": [ [ "date_from", "$__isoFrom()" ], [ "date_to", "$__isoTo()" ], [ "fields", "calories" ], [ "sort", "ASC" ] ], "queryParams": "", "refId": "A", "urlPath": "" } ], "title": "Calories (Last 30 days)", "transformations": [], "type": "timeseries" }, { "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "#526dcc", "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "decimals": 0, "fieldMinMax": false, "mappings": [], "unit": "massg" }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 12, "y": 8 }, "id": 4, "options": { "displayLabels": [ "percent", "value" ], "legend": { "calcs": [], "displayMode": "hidden", "placement": "right", "showLegend": false, "values": [] }, "pieType": "donut", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "cacheDurationSeconds": 600, "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fields": [ { "jsonPath": "$.results[*].proteins", "name": "Proteins", "type": "number" }, { "jsonPath": "$.results[*].fat", "language": "jsonpath", "name": "Fat", "type": "number" }, { "jsonPath": "$.results[*].carbohydrates", "language": "jsonpath", "name": "Carbs", "type": "number" } ], "hide": false, "method": "GET", "params": [ [ "fields", "carbohydrates,proteins,fat" ], [ "sort", "DESC" ], [ "limit", "1" ] ], "queryParams": "", "refId": "A", "urlPath": "" } ], "title": "Stats (Today)", "transformations": [ { "id": "formatTime", "options": { "outputFormat": "DD MMM", "timeField": "Date", "timezone": "browser", "useTimezone": true } } ], "type": "piechart" }, { "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fieldConfig": { "defaults": { "color": { "fixedColor": "#526dcc", "mode": "palette-classic" }, "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } }, "decimals": 0, "fieldMinMax": false, "mappings": [], "unit": "massg" }, "overrides": [] }, "gridPos": { "h": 8, "w": 6, "x": 18, "y": 8 }, "id": 3, "options": { "displayLabels": [ "percent", "value" ], "legend": { "calcs": [], "displayMode": "hidden", "placement": "right", "showLegend": false, "values": [] }, "pieType": "donut", "reduceOptions": { "calcs": [ "mean" ], "fields": "", "values": false }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "cacheDurationSeconds": 600, "datasource": { "type": "marcusolsson-json-datasource", "uid": "${DS_WAISTLINE-API-DATASOURCE}" }, "fields": [ { "jsonPath": "$.results[*].proteins", "name": "Proteins", "type": "number" }, { "jsonPath": "$.results[*].fat", "language": "jsonpath", "name": "Fat", "type": "number" }, { "jsonPath": "$.results[*].carbohydrates", "language": "jsonpath", "name": "Carbs", "type": "number" } ], "hide": false, "method": "GET", "params": [ [ "fields", "carbohydrates,proteins,fat" ], [ "sort", "ASC" ] ], "queryParams": "", "refId": "A", "urlPath": "" } ], "title": "Average (This week)", "transformations": [ { "id": "formatTime", "options": { "outputFormat": "DD MMM", "timeField": "Date", "timezone": "browser", "useTimezone": true } } ], "type": "piechart" } ], "refresh": "", "schemaVersion": 39, "tags": [], "templating": { "list": [] }, "time": { "from": "now-30d", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Waistline Stats", "uid": "d00ed2d6-1f35-4847-8ac8-110a1fa08946", "version": 15, "weekStart": "" }