setCrosshair function not working

the cross hair doesn’t appear after the writing the code. I tried refreshing the code and even saved it multiple times still doesn’t appear.

This is the correct syntax to use setCrosshair:
setCrosshair(boolean); Boolean type
Crosshairs are thin vertical and horizontal lines centered on a data point in a chart. When you, as a chart creator, enable crosshairs in your charts, your users will then be able to target a single element. setCrosshair() function supports the following options as parameter- true, false. It is disabled (false) by default and this function should be called before the plotChart() function.

You may also check this link:

@rishabhgurung37 The crosshair is something that helps us to target a single cartesian coordinate. The function setCrosshair(boolean) did not work well for me too. I think there is some bug associated with it. You could easily make the setCrosshair(boolean) working if you change the type of graph and save it again, then reload the page. This will work . Then you can change the graph type to what you wanted at first and try it again. The Graph will show the crosshairs for your desired graph.

Note that : "The boolean should be set to true and you should write the command setCrosshair(true) before plotChart() function.

Thank You!!!

Hi,
if we want to specify the point then we use
setCrosshair(true); then in the output it will show the crosshair
setCrosshair(false); then output with no crosshair.

@jakkuprashanthreddy Crosshairs are thin vertical and horizontal lines centered on a data point in a chart. When you, as a chart creator, enable crosshairs in your charts, your users will then be able to target a single element. setCrosshair() function supports the following options as parameter- true, false. It is disabled (false) by default and this function should be called before the plotChart() function.

I have seen your project and there I can see that there were crosshairs. Following is the snippet:


For every data point pushed to the cloud you can see the X-axis and Y-axis’ co-ordinates and that is exactly what crosshair do

@vishalvats2000 thankyou for your information