You must be logged in to post your query.
Home › Forums › Chart Support › Can we define a tooltip click event?
Tagged: tooltip
Hi, I am using different properties of tooltip like cornerRadius, animationEnabled, shared, contentFormatter. Is there any property which helps us to define click event on tooltip also?
@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.
___ Suyash Singh Team CanvasJS
Thanks for the fiddle. This helps me a lot.
You must be logged in to reply to this topic. Login/Register