Home Forums Chart Support Can we define a tooltip click event? Reply To: Can we define a tooltip click event?

#15133

@shv22,

You can do so by placing any HTML element (div, button etc.) in the toolTipContent and attaching click event handler to it. Please refer below codesnippet for toolTipContent that can be provided for such scenario.

toolTipContent: "<div id='toolTipContent' onclick='clickHandler()'>{label}: {y}</div>",

Also, have a look at this JSFiddle for complete code.

Attaching Click Event to toolTipContent

___
Suyash Singh
Team CanvasJS