You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if D2 supported style and other arbitrary properties for connections with a similar API as for shapes.
Why
Potential use cases are styling connection labels in different colors or text sizes, which can be useful for many applications in which connections model something important (such as transitions between states of a state machine).
Alternatives
The only workarounds I'm aware of if someone needs this feature are to either write code to output D2 connections themselves or to hack support for properties like styles into their own subclass of py-d2's D2Connection class like so:
Description
D2 supports properties like
style
for connections, same as it does for shapes (cf. e.g. the font color example). But py-d2 only seems to support them for shapes, with no constructor parameters available to set them for connections.It would be nice if D2 supported
style
and other arbitrary properties for connections with a similar API as for shapes.Why
Potential use cases are styling connection labels in different colors or text sizes, which can be useful for many applications in which connections model something important (such as transitions between states of a state machine).
Alternatives
The only workarounds I'm aware of if someone needs this feature are to either write code to output D2 connections themselves or to hack support for properties like styles into their own subclass of py-d2's
D2Connection
class like so:But it would be better if this was supported by py-d2 directly.
The text was updated successfully, but these errors were encountered: