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.
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.