Home Forums Chart Support Detect Crosshair Position Change Reply To: Detect Crosshair Position Change

#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