Open dfederm opened 4 years ago
Thanks for contacting us. I appreciate the well-written issue :)
We should add this feature, nothing to debate there.
How to implement:
Stacked
property will be added to CartesianAxis
since it can be used for any bar and line axis. It will also be removed from the bar extension axes.Just create a sub class of the axis you want to use e.g. StackedLinearCartesianAxis : LinearCartesianAxis
. Then add the Stacked
property (type bool
) to your class and use that instead of the original one when creating your config.
Let me know if that works as a temporary solution @dfederm.
@Joelius300 thanks that workaround worked great. I didn't realize these objects were just straight up serialized and used directly as the js config objects.
Describe the feature request
Add support for a stacked line chart
Which charts does this feature request apply to?
Line/Time
Describe the solution you'd like
The ability to set
stacked: true
for the y axisJavaScript equivalent
Describe alternatives you've considered
See first comment below
Additional context
Docs are at the very bottom of this page: https://www.chartjs.org/docs/latest/charts/line.html