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 it Yourself by Editing the Code below.


  Also See:    



In order to provide better support, we have closed the comments and switched completely to our Forums.
If you have any questions, please feel free to ask in our forums.