Hello
I’ve done a stacked chart with 4 informations.
It workd really good on all devices (responsive:true)
But on reallly small screens (phone, …) the legend take 4 lines and then more than 2/3 of the canvas size and let a really little place for the chart itself
I did not find any option to hide the legend for small screens (like the bootstrap ‘hidden-xs’)
Could it be a new improvement for next Chart.js v2.1 ?
Thanks
Dergonic
Yes, this is an alternative idea
That’s what I’ve done
For those who are interested in here is one solution (but sure not the best 😀 )
Hello again,
I found how to get what I wanted 🙂
I set the following options :
{ responsive: true, maintainAspectRatio: false, [...] }
I added a div around the canvas :
And I control the div’s height
.chart-container
in CSS with media queries.It’s perfect 🙂
Just wanted to say thank you to @mlegait for their fix. It’s most definitely not fixed in the latest versions, so this is still required to not squash them on mobile.