0
votes

Is there any way to get the legend "icon" in tooltip? I need to show the legend "icon" in the tooltip so i can identify what series I'm referring to.

I'll try to explain it better.

When you create a chart, in the legend, next to the name of the series, there is a "mini" line, that represent the line of the series, the color, and the style.

That what I need to show in the tooltip.

I'm not referring to the dot marker but the small lines that appears in the legend.

Is that possible?

Edit: I'm using the formatter that the tooltip api provides. There I have a reference of the point that I'm hovering on, and all the data associated to that point. I can get the value, the chart, the series, the series to which it belongs, que point marker, almost everything.

But I can't figure how to get the little coloured line that appears next to every series name in the legend.

I guess is as simple as get one of the values that appears in the point data, but I don't know what I should look for, there are a lot of properties.

1
Can I suggest to improve your question adding also what you tried so far? This should be useful for people trying to help you. - iGian
Thanks! I added some extra information. - Alwork

1 Answers

0
votes

I found a solution. You can look for the point.series.legendLine. There you have all the info required for the legend svg, even you can get the outerHTML and paste directly to show the legend icon.