Andy King
Andy King

Reputation: 23

NetChart does not automatically rearrange nodes when using addData

When we load our netchart, it displays a network where the user can then double-click on a node to expand the network further.

The original layout is fine - the chart fits the container perfectly (see netchart-original.png). When the user double-clicks and loads the additional data (using chart.addData()), the chart zooms out (over a period of about 20 seconds) and the node spacing is not correct (see netchart-expanded.png). We have called updateSize, paintNow, resetLayout and have even tried pausing before calling these functions but nothing seems to work.
Clicking on the "Rearrange Elements" toolbar button corrects the layout and node distancing and fits the chart within the container. netchart-original.png netchart-expanded.png

Upvotes: 1

Views: 47

Answers (1)

jancha
jancha

Reputation: 4977

you can try to use chart.zoom("overview") to reset the layout (use with a little timeout after adding the data).

however, this is not a normal scenario. please send sample js + data to [email protected] for additional help or share a jsfiddle with anonymous data.

thanks, Janis

Upvotes: 0

Related Questions