VEuPathDB / plot.data

1 stars 0 forks source link

Positioning node labels #257

Open asizemore opened 5 months ago

asizemore commented 5 months ago

Right now our label placement will be just wherever. That's okay maybe but certainly not great.

For some layouts, like the circle layout, we can calculate where the label should be on the frontend. For others, like force-directed, we can't if the backend is doing the laying-out.

In order to place the labels nicely, I've seen a trick that basically does a force layout but pretends the nodes and node labels are all nodes in a fake graph with links only between a node and it's label (code).

We should think about implementing this in plot.data and returning positions of node labels to the frontend.

asizemore commented 5 months ago

Doesn't have to be for phase 1. We can do something okay-ish for now.