vizulyNovember 21, 2017 at 8:54 am #8104
I took a look at your code and debugged it and found the problem. But a few things first.
1) I recommend you refactor the code and remove all of the demo container items that came with the example as they are making things more confusing. Try reading our Basic Example article http://vizuly.io/basic-example/. If you strip out this extra code it will make things a LOT easier for you to debug.
2) You will need to make sure you have unique variables and functions for each viz, theme, data, and mouseover/out/click events. Like viz and viz1, theme and theme1, data and data1. onMouseClick, onMouseClick1 etc.. Right now you just have one set and they are operating on each other when the user clicks etc.
The issue you were having with the ‘r is undefined when calling viz1.toggleNode() is that you need to call update before doing that, so the tree has rendered.
So something like this:
It took me a little while to trace the problem, but if you do as I suggest above it should make things a lot easier.
You must be logged in to reply to this topic.
© 2021 — vizuly.io