Home Forums Chart Support Strange margin at right on charts when working with a lot of data and rangebars

Strange margin at right on charts when working with a lot of data and rangebars

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

    Hello,

    I am experiencing a strange bug regarding rangeBar charts. It seems it adds some kind of random padding in aligned charts when working with a lot of data points.
    https://jsfiddle.net/mursang/wp6v4t2s/18/

    As you can see in the fiddle, just added 2 charts, one line and other rangebar.
    Added some functions to align Y axes and the other one to sync the crosshair.
    You can see the first chart adds a strange padding at the end although they have the same minimum and maximum.

    https://jsfiddle.net/mursang/2kz6qL54/

    Here you can check the same exact example, but working with a maximum of 25. Works like a charm.
    It seems like when adding more and more points, it randomly adds some kind of padding to the charts, that can’t be removed.

    Can you help me on this?
    Thank you!

    #45633

    Sorry, the fiddle with the working example is this one (maximum of 25 points)

    https://jsfiddle.net/mursang/2kz6qL54/3/

    #45646

    Jose,

    In your first example, the last axisX label(350,000) is automatically pushed inside the chart to ensure best fit, hence there will be some padding to the right of the chart. You can set labelAutoFit to false to override this default behavior which will remove any padding to the right, however the last label may get clipped.

    Please check this JSFiddle for a working example.


    Thangaraj Raman
    Team CanvasJS

    #45657

    Worked perfectly!
    Thank you very much!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.