hidden: Function

Sets the hidden event handler for axisX crosshair, which is triggered whenever axisX crosshair gets hidden.

Default: null
Example:
hidden: function(e) {
     alert(“Crosshair has been hidden”);
  },
Note:
  • hidden event handler can be used to sync crosshair across multiple charts in a page.
var chart = new CanvasJS.Chart("container",
{
 .
 .
 axisX: {
   .
   .
   crosshair: {
     enabled: true,
     hidden: function ( e ) {
       console.log("Crosshair has been hidden");  
     }
   },
   .
   .   
 },
 .
 .
});
chart.render();

Event Object

e:{
  chart: {},
  axis: {options}
}

Try Editing The Code

  Also See:    


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