Example Flowchart is cut in display (Chrome).
See original GitHub issueIf I run the following code in chrome the area of “Round Rect” is only half visible and in Firefox the text is also not shown. The graph is cut there. What did I wrong?
<html lang="en">
<head>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.3.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/knsv/mermaid/6.0.0/dist/mermaidAPI.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/knsv/mermaid/6.0.0/dist/mermaid.forest.css" />
<script type="text/javascript">mermaidAPI.initialize({startOnLoad:false});</script>
<style type="text/css">div#page {display:block}</style>
</head>
<body>
<div id="mermaid3"></div>
<script type="text/javascript"><!--
// mermaid.initialize
$(function(){
var cb = function(svg){
document.querySelector("#mermaid3").innerHTML = svg;
};
mermaidAPI.render('mermaid3','graph LR\n A[Square Rect] -- Link text --> B((Circle))\n A --> C(Round Rect)\n B --> D{Rhombus}\n C --> D\n', cb);
});
//-->
</script>
</body>
</html>
Issue Analytics
- State:
- Created 7 years ago
- Comments:15
Top Results From Across the Web
Example Flowchart is cut in display (Chrome). #368 - GitHub
Hi,. The view is clipping the image. If you open my example's SVG directly in chrome it will display correctly unless your window...
Read more >How to create flowcharts and diagrams in G Suite
The following guide can show you how to create diagrams, charts, and flowcharts using Google Drawings and G Suite add-ons.
Read more >Create diagrams and flowcharts - Google Support
Diagrams and flowcharts make complex processes in your presentation easier to understand. All you have to do is add, combine, and edit shapes—no...
Read more >Creately - Diagrams & Collaboration
The easiest way to draw flowcharts, mind maps, UML, organizational charts, wireframes, network diagrams and 40+ other diagram types.
Read more >50 Of The Best Google Chrome Extensions For Teachers
Diagrams, flowcharts, organizational charts are some great examples of visual teaching tools. However, drawing them can be tricky. Lucidchart extension makes it ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I had the same problem. It’s really caused by having the same id for the
divand thesvgelements. I think this could be helped by documenting the fact that the id in therender()method is the id of the createdsvgelement not the targetdiv. [I know it should be obvious as the callback is what puts the svg into the DOM]fixed