mermaid
mermaid copied to clipboard
Title support for every diagram
Is your feature request related to a problem? Please describe. Titles are really important when sharing diagrams because they give a strong context about what the person is seeing.
Describe the solution you'd like It would be amazing if all memaid diagrams supported a standard title or "name", so, when sharing just the diagram, it would always be clear what the diagram is about.
Describe alternatives you've considered The same way we declare the diagram type as the first instruction, if we could declare the diagram name, it would be really cool. Something like this would also be interesting: graph LR (My Beautiful Graph)
Hi @italomaia-bk, we should definitely add support for diagram titles. Issue #556 is also about this topic but only mentions flowcharts. We might as well add this as a common feature for all chart types while we're at it.
@GDFaber Maybe this could be added to the new rendering engine. Then it would only be in one place for all dagre based diagrams.
Workaround using subgraph Title end https://github.com/mermaid-js/mermaid/issues/556#issuecomment-579706603
Are there any updates on this issue? plantuml allows adding a title and header to any graph.
Any Update? This feature has been requested for 5 years
@GianlucaVeschi unless I'm misunderstanding something, the PR associated with this issue was merged in late 2022: https://github.com/mermaid-js/mermaid/pull/3706
You can now specify Title
for all diagrams.
If someone reached here by googling: you just need to add a "yaml frontmatter" to your diagram code with a title
property.
Here's a super basic example:
---
title: My Super Cool Title
---
flowchart LR
id
---
title: My Super Cool Title
---
flowchart LR
id