I am creating a panel plugin that displays paths onto a floor plan. Therefor I use SVG Paths and a circle element at the end of the path. Now i would like to display a tooltip above that cirlce with additional informations queried from the data source.
I already looked into the Tooltip Element from the Grafana UI but i think that isn’t working inside a svg element. Please, learn me better if this is wrong.
Given that I use Tippy over the Tooltip in grafana/ui, your example looks good to me. By “doesn’t work”, I assume you mean it’s not being displayed at all?
Here are a couple of examples how I’m using tooltips in my plugins:
the problem is that you cannot mix react and svg tags (or default html tags inside svg elements)
if you use d3, or native html you can do this using native listener for mouse events (i guess the react tooltip components do the same behind the scenes)
here you have examples using d3, but i guess i you haven’t used d3 so far you should use the native events