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.

Backwards arrow direction

See original GitHub issue

Is your feature request related to a problem? Please describe. Sometimes it is useful to have a single arrow pointing in the opposite direction (and not the whole graph).

Describe the solution you’d like Simply the option to specify the backwards arrow (like <--).

Describe alternatives you’ve considered You can try to do something similar using subgraphs, but it is very cumbersome (and not really comparable).

Additional context In Graphviz they do using the dir attribute ([dir=back]).

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:5
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
ajh0912commented, Oct 4, 2022

An example with flowchart

flowchart LR
%% Currently have to use no arrows
A <--> B --- C

%% Proposed syntax to allow left arrow
%% D <--> E <-- F
flowchart LR
%% Currently have to use no arrows
A <--> B --- C

%% Proposed syntax to allow left arrow
%% D <--> E <-- F

mermaid.live link

Proposed render: image

1reaction
daniporrcommented, Oct 9, 2022

@daniporr could you please add an example with current behaviour (simple code and rendered image) and maybe an assumed code with a sketch of changed version? It would help with an implementation and quick testing I think

The point is exactly that you cannot achieve that.

Assume you have this graph:

graph TD
    A --> B

And now you want to add a new node C and an edge from B to C with the arrow pointing to B.

You could do something like this:

graph TD
    A --> B
    C --> B

But this puts C at “the same level” of A, but here you are interested in having an edge from B to C just with the arrow in the opposite direction. Something like this: (which obviously does not compile at the moment)

graph TD
    A --> B
    B <-- C

Just to show something, it should be like this one:

graph TD
    A --> B
    B --- C

but with an arrow on the B -- C edge pointing towards B (exactly how @ajh0912 has shown in https://github.com/mermaid-js/mermaid/issues/3208#issuecomment-1267495095).

@mitcom is this small example clear enough?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Arrow Pointing Backwards Vector Images (over 4,200)
The best selection of Royalty Free Arrow Pointing Backwards Vector Art, Graphics and Stock Illustrations. Download 4200+ Royalty Free Arrow Pointing ...
Read more >
Arrow, backward, direction icon - Iconfinder
Download this arrow, backward, direction, down, guidance, guide, movement icon in solid style from the Tourism, hotels & hospitality category.
Read more >
↓ Arrow Symbols: Left, Right, Up and Down Arrow
Lists of arrow symbols, arrow signs, arrow emojis down arrow, up arrow, right and left arrows and all kind of arrows with their...
Read more >
Changing an Arrow's Direction (Reversing Paths)
That's right, paths have “direction” — from start to end — and InDesign lets you reverse it by choosing Object > Path >...
Read more >
Arrow cursor. Arrows forward backward, direction symbols ...
Arrow cursor. Arrows forward backward, direction symbols group. Illustration about backward, line, cursor, forward, curve, pictogram, round, sign, shape, ...
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