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

How to stretch line length #1152

Closed
wangdayong228 opened this issue Dec 21, 2019 · 3 comments · Fixed by #1176
Closed

How to stretch line length #1152

wangdayong228 opened this issue Dec 21, 2019 · 3 comments · Fixed by #1176
Assignees
Labels
Area: Development Status: Approved Is ready to be worked on Type: Enhancement New feature or request

Comments

@wangdayong228
Copy link

This is the graph made by mermaid.
屏幕快照 2019-12-21 下午6 26 46
I want enlarge the link line as follow, could mermaid do this work? Maybe use linkstyle or set a factor for stretch line length?
屏幕快照 2019-12-21 下午6 25 02
except replay, thank you guys.

@wangdayong228 wangdayong228 added Contributor needed Type: Other Not an enhancement or a bug labels Dec 21, 2019
@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Dec 21, 2019
@GDFaber
Copy link
Member

GDFaber commented Dec 28, 2019

AFAIK this cannot be adjusted in mermaid at the moment. According to this comment there are graph settings in dagreD3 which allow to set the distance between nodes. Perhaps these can be added to the flowchart config attributes and used for setGraph() in the flowchart renderer?

However, these settings would apply to the entire graph layout, not to a selection of nodes/connection lines.

@GDFaber
Copy link
Member

GDFaber commented Dec 28, 2019

dagrejs layout settings

@GDFaber
Copy link
Member

GDFaber commented Jan 2, 2020

The settings nodesep and ranksep can be used to put more space between the nodes (both 50 by default); as mentioned above, this is applied to all the nodes in the graph.

nodesep is the spacing value for nodes of the same rank, while ranksep holds the spacing value between ranks. In a top-down graph for example, "nodesep" could be seen as the horizontal spacing while "ranksep" does the vertical spacing.

I'm going to provide a PR to make the settings available in the flowchart configuration.

@klemmchr klemmchr changed the title I know we can use linkstyle to set link line width and color, I want to know is there a way to stretch line length like follow ? How to stretch line length Jan 6, 2020
@klemmchr klemmchr added Area: Development Status: Approved Is ready to be worked on Topic: Styling Type: Enhancement New feature or request and removed Contributor needed Status: Triage Needs to be verified, categorized, etc Type: Other Not an enhancement or a bug labels Jan 6, 2020
@knsv knsv closed this as completed in #1176 Jan 8, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: Development Status: Approved Is ready to be worked on Type: Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants