Abdullah Mallik
Abdullah Mallik

Reputation: 817

ChartJS multiple dataset issue. second dataset gets over 1st instead of overlaying

Please check this image.. currently there is two dataset.. but i can have more... the main issue is that why it gets out of boundery and over another dataset?

Link http://codepen[dot]io/anon/pen/womMmR

PS. i could not post the codepen link directly better editing will be appreciated

Upvotes: 0

Views: 52

Answers (1)

xnakos
xnakos

Reputation: 10206

You should remove stacked: true from your y-axis configuration. stacked: true is for stacking each dataset on top of the previous dataset. In other words, this is for drawing each chart above the previous chart, as if the previous chart defined y = 0. That is why the height of the stacked chart becomes greater than max, although all values across all datasets are lower than max.

Upvotes: 1

Related Questions