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

Manually set the initial position #7

Open
WYanChao opened this issue Jan 10, 2019 · 2 comments
Open

Manually set the initial position #7

WYanChao opened this issue Jan 10, 2019 · 2 comments

Comments

@WYanChao
Copy link

Hi,
Is it possible to have an API to set the initial position of each node? I understand that this d3-voronoi-treemap is based your previous d3-voronoi-map. The reason to add this API is that your current voronoi treemap is not suitable for dynamic hierarchical data.

My current solution is to set the .prng to a seedable PRNG for dynamic hierarchical data and generate them separately. I don't think it is an efficient way to update the voronoi treemap.

Thanks.

@Kcnarf
Copy link
Owner

Kcnarf commented Feb 21, 2019

I rephrase your first comment in order to be sure to well understand it.

Your use case is:

  1. you have n data, each with their own v value
  2. you compute a first Voronoï treemap
  3. you update the values of your data: you still have the same n data, but now each defining v' value

==> your need is to be able to update the already computed Voronoï treemap in order to reflect the new v' values
==> you propose to introduce an initial position API, so that you can compute a second Voronoï treemap by reusing the position of the first Voronoï treemap

Am I right?

@WYanChao
Copy link
Author

WYanChao commented Feb 21, 2019 via email

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