WimYedema / dagviz

Visualization for DAGs
Apache License 2.0
32 stars 5 forks source link

Longer node labels. #7

Closed JonB451 closed 10 months ago

JonB451 commented 1 year ago

It's really helpful the way you've organised these DAGs so that each row is a node and can accommodate a node label of significant text.

In order to fit in even longer node labels, that are not curtailed by the size of the render, would it be possible to either:

A, decrease the font size? or B, wrap the text? or C, allow a wider render so that the text can be scrolled off to the right of the window?

WimYedema commented 1 year ago

Thanks for the report! I'll see what I can do. Ideally the render resizes to necessary size, but if that's not possible it should be possible to set the size.

WimYedema commented 1 year ago

Can you give me an example do you would like to see improved? I seem to be able to use long labels just fine, but maybe I misunderstand.

JonB451 commented 1 year ago

Thanks for looking at this! I will try to give an example.

image

With a DAG of only 1 edge, then i am left with about 60 characters for text to the right. In this image, the "311" and "314" are just the first 3 chars of this 60 for the two nodes.

Larger DAGs are wider and leave less space for text, eg 30 characters. While these are clearly long, it would be handy in some use cases to be able to have them continue for however long they are. Sorry if that shows a naivety about how the renders are done.

This seems to be independent of the browser's window size, or the screen resolution. Instead the render, and its font size, is scaled to the size of the window.

WimYedema commented 10 months ago

Sorry for the long delay. I've added some configurability in the font size and view port width you might want to try out. It's available in release 0.4 of dagviz.