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

Flowchart edge labels placement #490

Closed
ZelphirKaltstahl opened this issue Mar 11, 2017 · 3 comments
Closed

Flowchart edge labels placement #490

ZelphirKaltstahl opened this issue Mar 11, 2017 · 3 comments

Comments

@ZelphirKaltstahl
Copy link

The placement of edge labels in flowcharts is unfortunate. For example:

graph TD
  A---|This is the text|B;

From the examples of the website already writes the text on the edge, instead of next to it. In horizontal flowcharts this is even worse and makes the text look like stroke through. On the other hand in sequence diagrams the text is at least placed above the edges, which is already an improvement. Desirable would be some integrated logic, which tries to avoid lines going over the the texts of labels and/or text, which breaks in an optimal way, so that it is not crossed by edges or nodes.

This might be difficult to implement, but is crucial to pretty diagrams.

@Rektis
Copy link

Rektis commented Jul 27, 2017

The manual shows that labels have a background colour. This would allow placement directly on the edge.

Judging by the changelog, this got broken before 7.0 and is fixed since then, but it still doesn't work in the live editor:
https://knsv.github.io/mermaid/live_editor/
Maybe the live editor is using an older version? I exclusively use the live editor to quickly make some diagrams. It'd be great if it could be updated.

@tylerlong
Copy link
Collaborator

I think it has been fixed.

https://mermaidjs.github.io/mermaid-live-editor/#/edit/Z3JhcGggTFIKICBBLS0tfFRoaXMgaXMgdGhlIHRleHR8QjsK

Feel free to reopen if you still have this issue.

@Rektis
Copy link

Rektis commented Sep 16, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants