Home Forums Chart Support Detect Crosshair Position Change

Detect Crosshair Position Change

Viewing 2 posts - 1 through 2 (of 2 total)
  • #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 5 years, 4 months 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.