Home Forums Chart Support reverse stepLine

reverse stepLine

Viewing 3 posts - 1 through 3 (of 3 total)
  • #20324

    Hello,

    Im having a realtime stepline chart in angular,
    when I play data forward, chart looks fine,
    when I play data backward, line between points (stepline) is not the same as forward play

    example:
    1. {x:4,y:5} , {x:5,y:7} //(line go right and then go up)
    2. {x:5,y:7} , {x:4,y:5} //(line go left and then go down)

    is there a way to draw step line same in both examples? ( in example 2 , line should go down and then go left).

    Thank you,
    Larry

    #20331

    @Larry,

    Chart is rendered based on the sequence of datapoints given. If {x:5,y:7} is given first then {x:4,y:5}, it renders x:5 and then x:4. To avoid such issues, you can sort dataPoints before rendering the chart. Please take a look at this jsfiddle.

    ___________
    Indranil Deo,
    Team CanvasJS

    #20341

    Thanks:)

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

You must be logged in to reply to this topic.