Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stacked Axes #9356

Closed
dislo2000 opened this issue Jul 5, 2021 · 4 comments
Closed

stacked Axes #9356

dislo2000 opened this issue Jul 5, 2021 · 4 comments

Comments

@dislo2000
Copy link

Feature Proposal

like in this stacked-axes amcharts feature
https://www.amcharts.com/docs/v4/tutorials/stacked-axes/
the scales are located beside (x-axis) or on top (y-axis) of each other.

Feature Use Case

comparing charts without overlaying them

Possible Implementation

idk.
i tried to do it somehow in v3, but didn't get a good solution.

@etimberg
Copy link
Member

etimberg commented Jul 5, 2021

Duplicate of #5895

This is probably best implemented as a single custom axis. Multiple axes stacked on top of each other does not fit with the layout model that chart.js uses. Changing that layout model would require a huge change inside of the layout system that would likely be very risky to implement.

@etimberg etimberg closed this as completed Jul 5, 2021
@dislo2000
Copy link
Author

hello etimberg,

yes, by trying to work around somehow i recognized, the underlying model will be hard to tweak for this feature.
maybe wrap more instances of a chart into a container which only delivers the shared axis and its gridlines to "connect" the basically separate charts.

@dislo2000
Copy link
Author

or could you show in stackoverflow how to get a similar behaviour with a custom axis.
i tried this, but for example at getPixelForValue(value, index) {...} i wasn't able to differentiate the values by dataset.

@donalod
Copy link

donalod commented Aug 5, 2021

Hi there, so does this mean that this example is not feasible at all as I wasted a tonne of time and still can't get it to work (but it's still a drawn canvas?)? https://www.chartjs.org/docs/master/samples/scales/stacked.html
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants