I’ve got a visualization where I have already appended some svg path elements yet.
Then I perform some operations and I would like to append further svg path objects without overwriting the existing data.
How can I do that? If I just select all path elements and try to add the new elements, it does not work.
Cheers
DeepBlue
You must select the parent of the svg paths, usually a group element
gand use a key function to identify your data points, so theenter()method will add only the new data, and theupdate()method will update existing paths. There is an example of that in the article Object Constancy explain this mechanism and have example code.