xAxes: Stacked doesn't appear to work
See original GitHub issueIt appears that setting scales.xAxes[0].stacked = true
in the options
does not have an effect in react-chartjs-2
, even though it works as expected in vanilla Chart.js.
scales: {
xAxes: [{
stacked: true
}]
}
Demo: https://www.webpackbin.com/bins/-KeYdil1aIYyXyNOoybq The result should be that the bars are stacked on top of one another.
Any idea why it doesn’t work?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Issue with x axis stacking for a stacked bar chart #5072 - GitHub
I'm trying to build a stacked bar chart based on a time series x axis. The chart doesn't seem to stack correctly on...
Read more >geom_area doesn't show data, supposedly because of x-axis ...
geom_area doesn't show data, supposedly because of x-axis data ... I want to create a stacked area plot based on a data frame....
Read more >Solved: Stacked column chart - Want to fill missing X-Axis...
Hi,. I'm having a problem in Power BI Desktop when trying to create a stacked column chart that has a relative date filter...
Read more >How do i make sure 'all' the x axis labels are displayed and ...
In the stacked column chart below, you can see that every bar doesn't have a corresponding label, how do I force TS to...
Read more >Customize X-axis and Y-axis properties - Power BI
To set the Y-axis values, from the Fields pane, select Sales > Last Year Sales and Sales > This Year Sales > Value....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AdeelK93 actually, Chart.js did support this functionality, which is one of the main reasons I explored the library further. But it seems like v2.5 introduced a regression breaking this functionality.
Example of the desired functionality using Chart.js v2.4: https://www.webpackbin.com/bins/-KfBFWirodI6k6U1b-bx
I’ll post this issue in the Chart.js repository. For now, the solution w/react-chartjs-2 is to use v2.4 of Chart.js as its peer dependency. So it’s okay to close this issue if you see fit.
EDIT: Posted at chartjs/Chart.js#4014
I believe it can be now. 😃 If there’s still troubles please reopen