I am trying to add React-Tooltip
to my React
app, and when I just statically add data-tip="hello world"
to an element, it is working, however, when I append the attribute to an element inside of svg
it is not. I see that the attribute is added inside html
:
But hovering over the element does not show the tooltip. I am using collapsible tree code:
And trying to make tooltip working like that:
node.attr("data-tip", "helloworld");
Any suggestions would be greatly appreciated.
I am trying to add React-Tooltip
to my React
app, and when I just statically add data-tip="hello world"
to an element, it is working, however, when I append the attribute to an element inside of svg
it is not. I see that the attribute is added inside html
:
But hovering over the element does not show the tooltip. I am using collapsible tree code:
https://bl.ocks/mbostock/4339083
And trying to make tooltip working like that:
node.attr("data-tip", "helloworld");
Any suggestions would be greatly appreciated.
Share Improve this question asked Jun 19, 2018 at 20:16 Nikita VlasenkoNikita Vlasenko 4,3528 gold badges54 silver badges96 bronze badges 1- this might help github./wwayne/react-tooltip/issues/306 – Paul Fitzgerald Commented Jun 19, 2018 at 20:23
2 Answers
Reset to default 3I have recently open-sourced react-svg-tooltip, a React ponent to create tooltips for SVG elements. It is still wet from birth, but maybe you still find it useful.
If you want to show tooltip inside SVG you can have look on following link: How to add a tooltip to an svg graphic?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744704050a4588947.html
评论列表(0条)