Chart.js-RangeSlider
Chart.js-RangeSlider copied to clipboard
RangeSlided chart size is huge compared to regular
Hi,
When I use the regular new Chart(), my chart has a 'normal' size, but when I use the new RangeSliderChart() with the same chart options, it's a lot taller and spaced out. What could be the cause?
Best regards, Tom
I'm not sure, are you able to post a codependent/jsfiddle to demonstrate both the erroneous effect and the correct one?
On 15 Nov. 2017 10:30 pm, "Tom Muylle" [email protected] wrote:
Hi,
When I use the regular new Chart(), my chart has a 'normal' size, but when I use the new RangeSliderChart() with the same chart options, it's a lot taller and spaced out. What could be the cause?
Best regards, Tom
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/schme16/Chart.js-RangeSlider/issues/10, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHFca3ydL_jyS1mE12t27F3ASQrjPM4ks5s2tlJgaJpZM4Qe2nX .
I started from the demo fiddle on your readme, and ended up with this one: https://jsfiddle.net/ut1d21mx/
I had to change the options a little to reflect what I need in my project, and it's those that cause the difference in rendering apparently.
Well, it's because "maintainAspectRatio" causes everything to increase in size because of the slider bar having a forced width, thereby increasing the width of the canvas, or something. But even when I set it to false, the canvas is still wider than what is set in the html attribute...
@Lambik: Thanks for that, I'll try and have a fix rolled out soon, and push it to bower and npm when I do
Any news about this? I could still use it :-) But don't want to push you or anything