Open samuira opened 2 years ago
@samuira the node's data is included in the onClick
method. This data object has a convenience attribute called __dataNode
which includes links to all the children
and parent
nodes. By iterating over the parent link chain you'll be able to extract all the stack until the root, giving you what you're looking for.
How can I get the tooltip value when we clicked on any node? can you show a example code? function clicked(d){ if (d.children){ sunburst_chart.focusOnNode(d) }else { // get the tooltip value like ( A -> B -> C) }
}