Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

Bar Chart is not stacking

Open BenMic opened this issue 10 years ago • 5 comments

Bar Chart is not stacking when specifying scales.xAxes.stacked=true The bars all start from x=0, and are drawn on top of each other.

image

BenMic avatar Sep 13 '16 11:09 BenMic

Did you try to stack the y axis?

options: {
    scales: {
        yAxes: [{
            stacked: true
        }]
    }
}

simonbrunel avatar Sep 13 '16 13:09 simonbrunel

Yes, this results in side-by-side bars

image

BenMic avatar Sep 13 '16 13:09 BenMic

I think you need both, but can you create a fiddle to showcase that issue?

simonbrunel avatar Sep 13 '16 13:09 simonbrunel

Yes, both are needed.

etimberg avatar Sep 13 '16 16:09 etimberg

Closing as answered

etimberg avatar Sep 17 '16 02:09 etimberg