Closed latetedemelon closed 8 months ago
I would like to ask for mor information. Where are you getting the error? In the Grafana panel? what is the influxdb version? 1.x or 2.x? Can you check the raw data as table format in Grafana panel editor? That seems like more of a Grafana panel issue that issue with this project.
Not sure what's going wrong here, you can start with a fresh heatmap panel, then use the same query. as the data is there, you can build up the visual gradually using testing and tweaking I hope.
Solved. Some issue with the colour palette. Changing this to Spectral seemed to work:
My panel JSON if it helps anyone.
{
"datasource": {
"type": "influxdb",
"uid": "b76a18a0-2cde-42d1-8779-6d42d4afac3f"
},
"description": "",
"fieldConfig": {
"defaults": {
"custom": {
"groupBy": 30,
"calculation": "mean",
"colorPalette": "interpolateSpectral",
"invertPalette": false,
"nullValueColor": "transparent",
"colorSpace": "rgb"
},
"mappings": [
{
"options": {
"asleep": {
"index": 1,
"text": "0"
},
"awake": {
"index": 0,
"text": "1"
}
},
"type": "value"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 80
}
]
},
"color": {
"mode": "continuous-YlRd"
},
"decimals": 2,
"min": 0
},
"overrides": []
},
"gridPos": {
"h": 9,
"w": 12,
"x": 12,
"y": 46
},
"id": 42,
"options": {
"showCellBorder": false,
"showTooltip": false,
"from": "0",
"to": "0",
"showLegend": false,
"showValueIndicator": false,
"legendGradientQuality": "medium",
"regions": [
{
"color": "#00000000",
"end": {
"hour": 22,
"minute": 30
},
"start": {
"hour": 6,
"minute": 30
}
}
],
"timeFieldName": "Time",
"valueFieldName": "Value"
},
"pluginVersion": "9.3.2",
"targets": [
{
"alias": "Sleep Regularity",
"datasource": {
"type": "influxdb",
"uid": "b76a18a0-2cde-42d1-8779-6d42d4afac3f"
},
"groupBy": [
{
"params": [
"30m"
],
"type": "time"
}
],
"measurement": "Sleep Levels",
"orderByTime": "ASC",
"policy": "default",
"query": "SELECT median(\"level\") FROM \"Sleep Levels\" WHERE $timeFilter GROUP BY time(1h)",
"queryType": "randomWalk",
"rawQuery": false,
"refId": "A",
"resultFormat": "time_series",
"select": [
[
{
"params": [
"level"
],
"type": "field"
},
{
"params": [],
"type": "median"
}
]
],
"tags": [],
"tz": "$TimeZone"
}
],
"title": "Sleep Regularity",
"transparent": true,
"type": "marcusolsson-hourly-heatmap-panel"
}
undefined is not iterable (cannot read property Symbol(Symbol,iterator))
I keep getting the following error on the Sleep Regularity Panel and I can't figure out why (data?) If I try to mess with the panel config I get the following:
I'm using the latest build and latest panel.