Skip to main content

Legend

Use a special variable, d2-legend, to declare a legend.

api-1api-2postgresexternalapi-3 LegendMicroserviceDatabase Good relationship Bad relationship Tenuous

Hiding shapes

Since a -> b declares 3 things (1 connection and 2 shapes), 3 things will show up on the legend. If you only intended to show the connection in the legend, you can set the opacity of shapes to exclude them from the legend.

api-1api-2api-3 Legend Good relationship