Skip to content

Commit

Permalink
adds a regression line to charge level
Browse files Browse the repository at this point in the history
  • Loading branch information
swiffer committed Sep 7, 2024
1 parent 743dd57 commit 22da7b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions grafana/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ENV GF_ANALYTICS_REPORTING_ENABLED=false \
GF_USERS_ALLOW_SIGN_UP=false \
GF_USERS_DEFAULT_LANGUAGE=detect \
GF_DATE_FORMATS_USE_BROWSER_LOCALE=true \
GF_FEATURE_TOGGLES_ENABLE=regressionTransformation \
DATABASE_PORT=5432 \
DATABASE_SSL_MODE=disable

Expand Down
31 changes: 30 additions & 1 deletion grafana/dashboards/charge-level.json
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,35 @@
}
]
}
},
{
"id": "regression",
"options": {
"degree": 5,
"modelType": "polynomial",
"predictionCount": 1000,
"xFieldName": "Time",
"yFieldName": "Battery Level"
}
},
{
"id": "joinByField",
"options": {
"mode": "outer"
}
},
{
"id": "organize",
"options": {
"excludeByName": {
"Battery Level predicted polynomial regression": false
},
"includeByName": {},
"indexByName": {},
"renameByName": {
"Battery Level predicted polynomial regression": "Regression Line"
}
}
}
],
"type": "timeseries"
Expand Down Expand Up @@ -368,6 +397,6 @@
"timezone": "",
"title": "Charge Level",
"uid": "WopVO_mgz",
"version": 7,
"version": 8,
"weekStart": ""
}

0 comments on commit 22da7b2

Please sign in to comment.