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.
  1. var chart = new CanvasJS.Chart("container",
  2. {
  3. .
  4. .
  5. axisX: {
  6. .
  7. .
  8. crosshair: {
  9. enabled: true,
  10. hidden: function ( e ) {
  11. console.log("Crosshair has been hidden");
  12. }
  13. },
  14. .
  15. .
  16. },
  17. .
  18. .
  19. });
  20. chart.render();

Event Object

  1. e:{
  2. chart: {},
  3. axis: {options}
  4. }

Try Editing The Code

  Also See:    


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