You must be logged in to post your query.
Home › Forums › Chart Support › How to fix the tooltip when clicking on a datapoint?
Dear CanvasJS team,
As mentioned in the title.
I’d like to click on a datapoint and fix the tooltip so that I can click the hyperlink in it. And the second question is that is it possible to copy the text in the tooltip?
Please help me with it. Thanks in advance.
@james,
I’d like to click on a datapoint and fix the tooltip so that I can click the hyperlink in it
Please take a look at the second example on this page for adding hyperlinks in toolTip.
And the second question is that is it possible to copy the text in the tooltip?
You can add the below style to canvasjs-chart-tooltip class to enable the user selection for toolTip content.
canvasjs-chart-tooltip
.canvasjs-chart-tooltip * { pointer-events: auto !important; -webkit-user-select: auto !important; /* Safari 3.1+ */ -moz-user-select: auto !important; /* Firefox 2+ */ -ms-user-select: auto !important; /* IE 10+ */ user-select: auto !important; /* Standard syntax */ }
__ Priyanka M S Team CanvasJS
Dear Ms. Priyanka,
Sorry for making you misunderstand what I mean. Please check following link JSFiddle
The problem is that the tooltip moves constantly so that I’m not able to click the hyperlink on it. Do you have any advice for me?
You can add the below style to canvasjs-chart-tooltip class to enable the user selection for toolTip content. .canvasjs-chart-tooltip * { pointer-events: auto !important; -webkit-user-select: auto !important; /* Safari 3.1+ */ -moz-user-select: auto !important; /* Firefox 2+ */ -ms-user-select: auto !important; /* IE 10+ */ user-select: auto !important; /* Standard syntax */ }
Thank you for response, I’ll try this after I can fix the tooltip.
You can fix the toolTip on click of dataPoint by setting top and left for toolTip container as shown in this updated JSFiddle, which also allows you to select the tooTip content and click the link present in toolTip. __ Priyanka M S Team CanvasJS
Dear Ms Priyanka,
Thank you for taking the time to answer my question. This is exactly what I need, thank you so much.
You must be logged in to reply to this topic. Login/Register