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

QUESTION: Nodes and links?? Size and Huge data. #42

Closed
doomsayer2 opened this issue Aug 18, 2017 · 1 comment
Closed

QUESTION: Nodes and links?? Size and Huge data. #42

doomsayer2 opened this issue Aug 18, 2017 · 1 comment

Comments

@doomsayer2
Copy link

Dear Sir,

I am from Austria and I am working as Junior Researcher at the university of applied sciences St. Pölten. Here we have a Data Visualization group where we specify on data visualization and all kinds of stuff and your libraries are like our holy grail. I would need you help to a very specific library and problem and question regarding this. I am using the old verison of sankey.js.

There for a specific project I would like to extend a existing everytime I load more nodes and links to the visualization and would like to base the svg height dynamically on the nodes. Therefore it would be necessary to set a minimum height for each node of 10px for example. I dunno how to exactly change the library or if I am allowed too in order to make the height based on the nodes.
Another problem we are facing is that we want overlays for the nodes in a form of another rectangle which is smaller that overlays each node source and target. I fixed this by simply adding every rectangle twice... Dunnno slight workaround. Anyway the other problem is the real thing I would need your help or the help of one of your great community members.

You can see this link for a shortvideo about the visualization and the problem occuring. It visualizes the flow of media transparency data for Austria.
https://drive.google.com/file/d/0B1xMwDuWYZI8dGxuei1UQ3JrTFk/view?usp=sharing

UPDATE:

I already found out how to set the minimum size and maximum size of the nodes, but now there is another problem. I tried to set the maximum and minimum size of each not to 10 and 500 px. You can guess it already, that the problem is now with the paths between them. Even if the paths are small there are sometimes too many and they are attached at the bottom of the node. Is there a way to let the paths start from the middle of the node?

@mbostock
Copy link
Member

mbostock commented Sep 1, 2019

This isn’t supported in the current version, sorry. The node heights are computed based on their value, and then scaled to fit within the specified viewport extent after computing the tallest column and taking into account padding. You can specify a minimum value for your nodes, but you can’t specify it in terms of pixel sizes (unless you know the tallest column and padding and want to work backward from that).

That said, perhaps in a future version this library could operate on fixed-height nodes rather than using values, but I think values are the common case.

@mbostock mbostock closed this as completed Sep 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants