Home forums Using CanvasJS How to secondary draggable line-chart?

This topic contains 2 replies, has 2 voices, and was last updated by  KUmemura 4 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #21902

    KUmemura
    Member

    Hi CanvasJS Support Forum,

    I want to be able to drag a secondary line-chart.
    The main line-chart was made to be able to drag.

    jsFiddle

    Thanks,

    #21969

    sonerb
    Member

    You must change dataSeries index on your functions.

    line 152:
    chart.data[0].dataPoints[selected].y = yValue;

    line 163:
    chart.data[0].dataPoints[selected].y = yValue;

    line 170:
    chart.data[0].set("cursor", "n-resize");

    line 172:
    chart.data[0].set("cursor", "default");

    line 187:
    var dps = chart.data[0].dataPoints;

    I tried something with using data mouseover events. Maybe you can improve this method.

    http://jsfiddle.net/y3xvo7uc

    #21977

    KUmemura
    Member

    Hi @sonerb

    Thank you for the reply.
    I’ll try this one.

    Thanks.

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

You must be logged in to reply to this topic.