You must be logged in to post your query.
Home › Forums › Chart Support › Controls the number of tooltips according to the number of availble – legends
Tagged: #ToolTip by Legend
I have a problem with my Tooltip Example: I have 3 visible series and 1 invisible. Can I only show 3 tooltip for 3 visible series? I don’t want to show all 4 series in this case?
@nguyentanson1996gmail-com,
You can hide the information related to hidden dataseries by setting toolTipContent of that particular dataseries to null. Please find the code-snippet below.
itemclick : function(e) { var content; if (typeof(e.dataSeries.visible) === "undefined" || e.dataSeries.visible) { e.dataSeries.visible = false; content = e.chart.data[e.dataSeriesIndex].toolTipContent; e.dataSeries.toolTipContent = null; } else { e.dataSeries.visible = true; e.dataSeries.toolTipContent = content; } chart.render(); }
Please take a look at this JSFiddle for complete code.
— Vishwas R Team CanvasJS
Thank you @Vishwas R so much. That’s exactly what I need in this case
We have just released CanvasJS Charts v3.7 with a few bug fixes related to tooltip & it’s content. Please refer to the release blog for more information. Do download the latest version from our download page and let us know your feedback.
— Vishwas R Team CanvaJS
You must be logged in to reply to this topic. Login/Register