-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Arrow through text in simple Flowchart #1420
Comments
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 |
I have this issue as well. Workarounds or fixes? |
Same here. Any updates from the team? |
This issue is in the Also, what would the expected fix be for this issue. Will we make the arrow go outwards then come back inwards to avoid overlapping the title? |
This still seems to be an issue, just wondering if there has been any ideas of how to work round this? |
You could change the orientation from top-down to left-right:
|
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. |
Hi, this is a bit "late to the party" for this thread, but better late than never! 🙌 This is a solution that worked fairly well for me, and it's fairly flexible in letting you "nudge" the labels around. If you add a style block like the one below, you should see some results in the rendered markdown! :) <style>
.cluster-label span {
background-color: red;
display: block;
margin-left: 250px;
}
</style> If you want a more "deep dive" in how I got to this solution: open the dev tools (ctrl + shift + c), and inspect the elements you want to apply your custom CSS to, note the class name, and it should work as long as the CSS is correct. |
Does the workaround described by @JulianNymark work for you guys? |
Hi, sorry I have not had a chance to explore this too far. Yes I expect it will in certain situations it will sort the problem :-), however the diagrams I work with are often changing, so one fixed repositioning of the title would not always work. So, very useful information but not a general fix. |
@JulianNymark workaround worked great for me, thanks!
flowchart TD
A --> B
subgraph mysubgraph
B--> C
end
C --> D
%% Styling
classDef subgraphstyle margin-right:3cm
class mysubgraph subgraphstyle
|
Unfortunately, this approach only works if all the label lengths are similar. If some subgraphs have longer labels than other, the structure of the diagram falls apart when hardcoding pixel distances. Is there any way to change the z index of the arrows and render them behind the labels? |
mermaid-js renders the arrow through the text "two" in this flowchart:
Describe the solution you'd like
One of these would work:
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.
The text was updated successfully, but these errors were encountered: