Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tree node owerlap issue #167

Open
serkandemirel0420 opened this issue Dec 4, 2022 · 3 comments
Open

tree node owerlap issue #167

serkandemirel0420 opened this issue Dec 4, 2022 · 3 comments

Comments

@serkandemirel0420
Copy link

Is it possible to avoid overlap of nodes(vis.js). I see there are options available to push in visj.s documentation such as below I am not sure if it is possible to pass options to diagram.

This is such a joy to use! Thanks

https://visjs.github.io/vis-network/examples/network/layout/hierarchicalLayoutOverlapAvoidance.html

var options = {
  layout: {
    hierarchical: {
      direction: "UD",
      sortMethod: "directed",
    },
  },
  physics: {
    hierarchicalRepulsion: {
      avoidOverlap: +document.getElementById("avoid-overlap").value,
    },
  },
};
network = new vis.Network(container, data, options);

Thanks!

@hediet
Copy link
Owner

hediet commented Dec 5, 2022

This is not supported.
You could use the graphviz visualizer however.

@serkandemirel0420
Copy link
Author

Ah okay! I am not familiar with the codebase. Could you please point me a direction where and maybe how i should implement such a functionality. I would love to contribute and make a pull request. Thank you!

@hediet
Copy link
Owner

hediet commented Dec 6, 2022

I don't see a good way for how this can be implemented at the moment...
You could create an entirely new visualization that has these options, but that doesn't make sense to be bundled with the extension by defaulft.

I have to think about this from an architectural point of view.
Maybe visualizations/data extractors can declare properties in form of a JSON schema and these properties can be configured in the visualization view.
It is a ton of work and the impact would be unclear.

Maybe custom visualizations could help here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants