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

Feature request: straight lines #2817

Open
zejiran opened this issue Mar 12, 2022 · 6 comments
Open

Feature request: straight lines #2817

zejiran opened this issue Mar 12, 2022 · 6 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@zejiran
Copy link

zejiran commented Mar 12, 2022

I can't find a fast way to configurate straight lines. As shown in the picture, mermaid curve by default the arrows in diagrams.

Screen Shot 2022-03-12 at 1 06 01 PM

Other diagram editors, such as PlantUML, allow to add a code line like this skinparam linetype ortho for changing the shape of the lines.

Before:
VLHFRpir4BtxKomz8YKg7AiAjIHfnQ5GqQAAuyIUfWF-iupjg1NmWNhWW7hZcY-6OwtZhBE_tf9vRz_ClF7CbG_08HejlWelQB3hDP0LmlzEjWS6qnco2mtUFv4ABzstv-T2oFt_xf7GAkZ-55qtwwGpo9ASl-XMrypm9lukl7jsAihW1cRFc7Y9TgCTX1nIw2LJBsdtOHFm49Zi9YDaO8DjJAN_FzXGC_pY8p2vGodCwCRV

After:
VLG_R_j63DtlKwWP2zX8EmP1aTHsWWvfWoP5q97MCJRR-wFoxem4RJzGXWv5jj_gB_QZ1PtEafMCudjw91-Fl0eHE2Phr3TnYnQhnW0vfSAVv1fWi9KXX_6rmSfptFeZm99R60ZXYNJSLj-VdojL7xwhHqAdeVfRLTMighr5hic7YsfrpGolwj_CksUlKnrznsmOXIUq6-CXjY6DeMPgQjg_Em4U8fFRj0XPsE0ufkNx9nTB

@zejiran zejiran added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Mar 12, 2022
@KSR-Yasuda
Copy link

Relate with #2549.

@NielsCodes
Copy link

Yes please! Curved lines are okay for small diagrams, but once they become bigger, they all start looking like your example. Straight lines are a lot more readable.

@cristiandeschamps
Copy link

This is badly needed, my class diagram is unreadable without the curve line.. I don't want to switch to something else but I will have almost no choice :(

@sh-cau
Copy link

sh-cau commented Mar 7, 2024

Have you tried %%{ init: { 'flowchart': { 'curve': 'stepBefore' } } }%% or is this only applicable to flowcharts?

@zejiran
Copy link
Author

zejiran commented Mar 7, 2024

Have you tried %%{ init: { 'flowchart': { 'curve': 'stepBefore' } } }%% or is this only applicable to flowcharts?

Hello @sh-cau,

It looks like the %%{ init: { 'flowchart': { 'curve': 'stepBefore' } } }%% configuration is indeed specific to flowcharts in Mermaid. This means it won't work for other diagram types like class diagrams.

@phil-flip
Copy link

Maybe the new Elk renderer that can be used in flowcharts could help here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants