hide()

Hides the crosshair of respective axis.

Note:
  • Chart should be rendered before you can use hide method.
  • hide method can be used to sync crosshair across multiple chart in a page.
  • If you interact with chart after hiding, crosshair shows up again. So, the hiding is not permanent.
var chart = new CanvasJS.Chart("container",
{ 
 .
 .
   axisX: {
     crosshair: {
       enabled: true
     },
     .
   },
 .
 .
});
chart.render();

chart.axisX[0].crosshair.hide();

Try Editing The Code


If you have any questions, please feel free to ask in our forums.Ask Question