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

Bar Chart - barValueSpacing

Open Dergonic opened this issue 10 years ago • 2 comments

Hi

first of all, I'd like to thanks for this module. this is a huge work and so easy to use for "noobs" like me.

The my point. I use a bar chart (a Stacked bar chart in fact) which is responsive. It works really good ! image

In a design matter, I'd like to lower the bar width. I've found the barValueSpacing that does it quite well. image

But the fact is that it looks like a pixel value. That means I lost the responsive part of the graph. And in little screens, it look like this image

My question is .. Is there any way to set this value in procent or at least in a relative way ?

thanks a lot Dergonic

Dergonic avatar Jan 15 '16 11:01 Dergonic

@Dergonic this has been addressed in version 2 (currently in beta). You can specify the spacing as a percentage. To do this in v1 you'd need to modify the library yourself.

V2 documentation is available at http://nnnick.github.io/Chart.js/docs-v2/

etimberg avatar Jan 15 '16 12:01 etimberg

Thanks for your quick reply. I'll have a look on updating to V2 ASAP

Dergonic avatar Jan 15 '16 13:01 Dergonic