Home Forums Report Bugs Canvas chart resizes

Canvas chart resizes

Viewing 4 posts - 1 through 4 (of 4 total)
  • #19713

    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

    #19720

    @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

    #19725

    Hi,

    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.

    #19733

    @s-verleysen,

    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

    • This reply was modified 6 years, 2 months ago by Indranil.
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.