question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Arrow through text in simple Flowchart

See original GitHub issue

mermaid-js renders the arrow through the text “two” in this flowchart:

graph TD
  subgraph one
     A
  end
  subgraph two
     B
  end
  A --> B;

Describe the solution you’d like

One of these would work:

  • Render the text on top of the arrow with a semi-transparent background over the arrow (same color as the box) to “dim” the arrow,
  • Render the text twice, once as an outline (2-3px thick, same color as the box) and on top of the arrow,
  • Add an option to move the text into a corner of the box (or do that automatically if you can). For example: subgraph one [title] v> for bottom right, ^> for top right, v< for bottom left or define default CSS classes that one could refer to.

The first solution is probably the most simple to implement, the second one will look nicer (boxes around text tend to look uneven). The third is most effort but most flexible.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
scootybootscommented, Oct 22, 2020

Hi @digulla @knsv

I’m new to svelte and open source, but I’m interested in giving this issue a shot.

Out of curiosity is there a reason this was filed under mermaid-js/mermaid as opposed to mermaid-js/mermaid-live-editor ? I ask because it looks to me like the issue would need to be fixed in the mermaid live editor.

0reactions
jpadfieldcommented, Jul 8, 2022

Thanks, this option can work sometimes but not always - I was also going to explore css options to try and force the subgraph label to be above the arrow with a semi transparent background - but I have not had the time to explore yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tikz pgf - Breaking an arrow with text in a flowchart - TeX
is there a way to "break" a vertical arrow by text going through it in a flowchart? I just need a gap in...
Read more >
Work with Flow Lines (Connectors) - BreezeTree Software
In flowcharting, an arrow from one process step to the next is often called a "Connector", a "Flow Line", or simply an "Arrow"....
Read more >
Flowchart Symbols & Meaning - Complete Guide 2022
Terminal Symbol indicates the beginning or end of a flowchart. This symbol usually has the text “Start” or “End”. 3. Flowline Symbol: Flowline...
Read more >
How to create a flow chart in Microsoft Word using ... - YouTube
You will learn how to use lines, arrows and flow chart shapes to create a flow chart. I used a diagram from a...
Read more >
Creating a Simple Flowchart in Diagrams.net (Draw.io) Tutorial
Learn how to create a simple flowchart in Diagrams.net (Draw.io), and what each of the most commonly used symbols in a flowchart represent....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found