Home › forums › Chart Support › line chart shared tooltip
Tagged: line chart shared tooltip contentFormatter
I have line chart with the tooltip shared as true. The default tooltip is great. The first line is the value of the x-axis and the rest of the lines are each key name in the key color and the y value. Again perfect. All I want to do is have first line, the x-axis value, be in a html link. I realize I can use the contentFormatter, but I don’t know how to get the exact content and format of the default tooltip. I hope this makes sense. Any help appreciated. Dave
You can use contentFormatter to format the content of the toolTip. Please refer the toolTip documentation page for defining custom color for each entry in toolTip. Also kindly check this JSFiddle for an example.
Perfect, thank you very much. The only change I had to make was to change e.entries.dataPoint.x to e.entries.dataPoint.label.
You must be logged in to reply to this topic.