ErikGartner / dTree

A library for visualizing data trees with multiple parents, such as family trees. Built on top of D3.
https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7
MIT License
521 stars 139 forks source link

How to get custom id of the data when clicked? #85

Closed FingersKey closed 5 years ago

FingersKey commented 5 years ago
nodeClick: function(name, extra, id) {
   console.log(name);
   console.log(id);
}

This id is the serial number is not in my data.

ErikGartner commented 5 years ago

If you've added your own id in your data. Store it under the "extra" field to have access to it through the extra argument.

/Erik