Pass line styling options through to ChartJS #11308
Replies: 2 comments
-
Nb: I'd love to contribute to this myself if that's possible! That being said, my server-side python is very Rusty. |
Beta Was this translation helpful? Give feedback.
-
Also test with an entity_id which is an input_number.
input_number plots with a linear spline. It also has the side benefit that the last value is stored. My graphs with a sensor would show a negative spike to zero if I rebooted the Raspberry Pi. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The request
Add a mechanism to pass ChartJs options to cards such as the Line Graph.
Notably
SteppedLine
This will allow people to choose between displaying a Stepped line graph, and a much more pleasing interpolated graph, without having to add unnessasary integrations (for interpolation on the data-side of things)
Ideally, users should be able to set the default for the
history
component, with the ability to override it on a per sensor basis (viacustomize
)Feels like adding a key to the Lovelace config to house any raw params to pass straight through to ChartJs could work well
Eg:
The alternatives
As far as I have seen, this is possible with various custom Lovelace cards, however, that seems overkill.
Additional information
Ex: https://www.chartjs.org/docs/latest/charts/line.html#line-styling
Beta Was this translation helpful? Give feedback.
All reactions