You must be logged in to post your query.
Home › Forums › Report Bugs › Canvas chart resizes
Tagged: Column chart; width
Hi,
I create a bar chart with a fixed with. Sometimes the width of the chart changes when refreshing it with new data, sometimes its a few pixels, sometimes its the half of the chart. I don’t change anything on the settings, only the datapoints values. The amount of datapoints keeps the same.
How can I fix this?
Thanks! Sen
@s-verleysen,
Can you please create a jsfiddle reproducing the issue so that we can understand it better and help you out.
___________ Indranil Deo, Team CanvasJs
When you run this jsFiddle https://jsfiddle.net/e5e7zbde/34/ and changes the number in the last textbox from 150 to 151 the chart width changes. When you change the number back to 150, the chart resizes again to the original width. This doesn’t only work with this numbers, when you change the other numbers it can also happen…
Thanks.
The chart gets resized as the axisY labelFormatter formats labels and returns labels with 14 digit decimal value. Setting the precision to 2 digits after the decimal point should work fine in this case. Please take a look at this updated jsfiddle.
___________ Indranil Deo, Team CanvasJS
You must be logged in to reply to this topic. Login/Register