alionel
December 14, 2021, 11:26am
1
how to access “nodeTitle” or any inner data out of svg chart when nodeMouseOver ? or how to show specific content of our data in parallel cell (synchronized) when “nodeMouseOver” is on ?
Is this what you’re looking for javascript - Unable to get node datum on mouseover in D3 v6 - Stack Overflow
To get access tp the node. I think you do something like this…
selection.on("eventType", function(event, d, node) { .... })
# d3-selection
Selections allow powerful data-driven transformation of the document object model (DOM): set [attributes](#selection_attr), [styles](#selection_style), [properties](#selection_property), [HTML](#selection_html) or [text](#selection_text) content, and more. Using the [data join](#joining-data)’s [enter](#selection_enter) and [exit](#selection_enter) selections, you can also [add](#selection_append) or [remove](#selection_remove) elements to correspond to data.
Selection methods typically return the current selection, or a new selection, allowing the concise application of multiple operations on a given selection via method chaining. For example, to set the class and color style of all paragraph elements in the current document:
```js
d3.selectAll("p")
.attr("class", "graf")
.style("color", "red");
```
This is equivalent to:
```js
const p = d3.selectAll("p");
p.attr("class", "graf");
p.style("color", "red");
```
This file has been truncated. show original