Home › forums › Report Bugs › Canvas chart resizes
Tagged: Column chart; width
This topic contains 3 replies, has 2 voices, and was last updated by Indranil Deo 7 months, 4 weeks ago.
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?
Can you please create a jsfiddle reproducing the issue so that we can understand it better and help you out.
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…
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.
You must be logged in to reply to this topic.