allow connections between any 2 characters in a diagram
Author: GavinPenCreated Jun 6, 2025Updated Aug 11, 2026
Would it be possible to add the ability to draw arrows between any 2 characters in a diagram? This would make diagrams much more versatile.
It'd be useful for adding connectors, eg to source code:
- between a call to a function and its definition
- between a variable and a comment relating to it (code annotation diagram)
- between a line of code and its output
(GraphViz allows connectors between table cells in a couple of different ways, including via the 'port' tag, eg https://graphviz.org/doc/info/shapes.html#recreating-the-record-example Maybe d2 could use a similar approach?)
Source: terrastruct/d2