Forced directed layout - way to big

Hi
While using ForcedDirectedLayout, I have an issue that most of the diagrams look OK ,
but in some of them the links are so long that I have to scroll or zoom out for quite a few seconds before I can see the ends of it.

is there a way to limit the length of links?

Which version of GoJS are you using?

version 1.7.17 or 1.7.9, have to check a min, is there a fix between them?

it’s probably 1.7.9, but I can’t check for sure since it’s a minified file

Perhaps you can still evaluate go.version? I thought I remembered fixing some cases like what you describe, but in checking our source code history, I don’t see it. So perhaps the version number doesn’t matter (yet).

We’ll look into this.

where can I check go.version on an angular 4 app that is in prod mode?

I’ll wait for a replay regarding if you have it in ver 17

Have you set any parameters on the ForceDirectedLayout?

In general if you want nodes to be closer together you should decrease the ForceDirectedLayout.defaultElectricalCharge, perhaps to 50, and the ForceDirectedLayout.defaultSpringLength, perhaps to 10. Also it might help to decrease the ForceDirectedLayout.infinityDistance, perhaps to 200.

That doesn’t address the occasional extreme behavior that you are seeing, which I think is caused by some numerical instability in very specific situations.