Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

In Barchart, options doesn't allow stacking over y-axis. #163

Open
ashutoshjha1409 opened this issue Nov 25, 2016 · 4 comments
Open

In Barchart, options doesn't allow stacking over y-axis. #163

ashutoshjha1409 opened this issue Nov 25, 2016 · 4 comments

Comments

@ashutoshjha1409
Copy link

Here is my code,

let chartData = { labels: ["January", "February", "March", "April", "May", "June", "July"], datasets: [ { label: "My First dataset", fillColor: "rgba(220,220,220,0.2)", strokeColor: "rgba(220,220,220,1)", pointColor: "rgba(220,220,220,1)", pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(220,220,220,1)", data: [12, 19, 3, 5, 2, 3] }, { label: "My Second dataset", fillColor: "rgba(151,187,205,0.2)", strokeColor: "rgba(151,187,205,1)", pointColor: "rgba(151,187,205,1)", pointStrokeColor: "#fff", pointHighlightFill: "#fff", pointHighlightStroke: "rgba(151,187,205,1)", data: [1, 10, 2, 9, 2, 13] } ] }; ![imageedit_2_2139895953](https://cloud.githubusercontent.com/assets/7542464/20626418/96a64246-b33f-11e6-91ba-eecf12673fa9.png) ![imageedit_2_2139895953](https://cloud.githubusercontent.com/assets/7542464/20626430/a300865a-b33f-11e6-8d2f-daaf65173289.png)
var chartOptions = { enabled:true, scales: { xAxes: [{ stacked: true }], yAxes: [{ stacked: true }] } }

And here is how I'm implementing JSX.
<Bar data={this.state.chartData} options={chartOptions} width="600" height="250" redraw/>

Issue is even though we set yAxes' stacked to true, it still shows bar groups. I want each dataset to stack over one another for a given interval in my case.

@sunlee-newyork
Copy link

+1

@PashaKoval
Copy link

The same problem

@PashaKoval
Copy link

Solved #160

@tomav
Copy link

tomav commented May 29, 2017

Thanks @PashaKoval!

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

No branches or pull requests

4 participants