react-d3-graph icon indicating copy to clipboard operation
react-d3-graph copied to clipboard

Tooltip for Nodes

Open jmreddy2106 opened this issue 3 years ago • 1 comments

Hi @danielcaldas I'm trying to enable tooltip for node on MousrOver. I'm unable to access the below URL.

sandbox example

If possible, can you enable it? Even after including the node configuration, the tooltip is not visible.

node: { showToolTip: true, tooltipProp: 'id', tooltipBackgroundColor: ' black', tooltipTextColor: 'white' }

Can you suggest me, how to attach tooltip onMouseOverNode? Thanks

jmreddy2106 avatar Oct 17 '22 22:10 jmreddy2106

You could create your own custom component using:

node: { ..., viewGenerator: generateCustomNode }

This would allow to do whatever you want with the Node

function generateCustomNode(node: any) {
        return node ? <PersonNode person={node} /> : null;
 }

michaelbdavid avatar Nov 04 '22 14:11 michaelbdavid