Home forums Using CanvasJS Detect Crosshair Position Change

This topic contains 1 reply, has 2 voices, and was last updated by  Shashi Ranjan 4 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25761

    I want to detect when the position of the vertical crosshair line is changed in a chart where the vertical crosshair line snaps to the xAxis values (using snapToDataPoint: true). For example, in this pen, the positionchanged event is used in amCharts. Is there something similar in CanvasJS?

    I ran across this Fiddle which could be used to detect a change in vertical crosshair position (i.e. a changed in the “selectedValue”), but it seems inefficient as it is performing the computations on the firing of each mousemove event. Is there a more efficient way?

    • This topic was modified 4 months, 2 weeks ago by  bfailing.
    #25769

    @bfailing,

    I want to detect when the position of the vertical crosshair line is changed in a chart where the vertical crosshair line snaps to the xAxis values (using snapToDataPoint: true). For example, in this pen, the positionchanged event is used in amCharts. Is there something similar in CanvasJS?

    Sorry, this feature is not available as of now.

    I ran across this Fiddle which could be used to detect a change in vertical crosshair position (i.e. a changed in the “selectedValue”), but it seems inefficient as it is performing the computations on the firing of each mousemove event. Is there a more efficient way?

    This is a workaround to achieve the above requirement.


    Shashi Ranjan
    Team CanvasJS

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

You must be logged in to reply to this topic.