Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Title To the Graph #556

Closed
vikram-rawat opened this issue Aug 4, 2017 · 10 comments
Closed

Add Title To the Graph #556

vikram-rawat opened this issue Aug 4, 2017 · 10 comments
Assignees

Comments

@vikram-rawat
Copy link

There should be a way to add title to the graph right from Flowchart diagram. I am really sorry if you have one that I didn't find anywhere.

@alexkli
Copy link

alexkli commented Feb 5, 2018

Here is a little workaround for adding a fake title to the top down flowchart (TD):

View in Mermaid Live Editor

graph TD

title[<u>My Title</u>]
title-->FirstStep
style title fill:#FFF,stroke:#FFF
linkStyle 0 stroke:#FFF,stroke-width:0;

FirstStep-->...

Add this to the top immediately after the graph TD definition.

This defines a box, styles its text with underscore (<u>, YMMV) and makes the box fill & stroke blank (style title) and links it to the real first step/box (FirstStep) so it appears on top, while making the link hidden using linkStyle 0.

@tylerlong
Copy link
Collaborator

@alexkli that is a brilliant idea! It could be used as a nice workaround before we add official support

@nqb
Copy link

nqb commented Aug 3, 2018

Any update on that feature ?

@gakonst
Copy link

gakonst commented Jun 28, 2019

@alexkli does not work for Sequence Diagrams unfortunately.

@elin-y
Copy link

elin-y commented Aug 8, 2019

good idea but it also doesn't apply to the left-to-right graphs unfortunately.

@pothitos
Copy link

Until this issue is resolved, this is another workaround that applies to the left-to-right graphs too.

graph LR
  subgraph This is my caption
    A --> B
  end

which uses a subgraph to display something like

Graph with caption

@sommmen
Copy link

sommmen commented Apr 14, 2020

Any updates on this?

@GDFaber
Copy link
Member

GDFaber commented Apr 14, 2020

Not yet, but I've got it on my list.

@sommmen
Copy link

sommmen commented Apr 14, 2020

Not yet, but I've got it on my list.

I see, Thanks for the.. update? i gues 'working on it' is still a status update in my book ;)

@GDFaber
Copy link
Member

GDFaber commented May 28, 2020

I'm closing this issue in favour of #1433, please refer to the new issue for future updates. This is still one of the tasks I want to work on once I get the time, so it does not change priorities to close this one :)

@GDFaber GDFaber closed this as completed May 28, 2020
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants