Comments (11)
Example .dot text included to assist troubleshooting
This .dot file was generated using the Python Diagrams module, using the following Python code;
from diagrams import Diagram
from diagrams.aws.compute import EC2
from diagrams.aws.database import RDS
from diagrams.aws.network import ELB
with Diagram("Grouped Workers", show=True, outformat="dot", direction="TB"):
ELB("lb") >> [EC2("worker1"),
EC2("worker2"),
EC2("worker3"),
EC2("worker4"),
EC2("worker5")] >> RDS("events")
from graphviz2drawio.
Ouch, got the same here; reduced testcase causes the same crash:
strict digraph CDD {
splines="true"
labelloc="t"
label="CDD"
// sep=.5
Hello [label="/aa/bb\nHello"]
World [shape=box, color=blue, fontcolor=blue, tooltip=aaaa]
Hello -> { World }
}
Removing the tooltip attribute makes the conversion work
from graphviz2drawio.
@hbmartin could you possibly take a look into this for us? Much love and thanks!!
from graphviz2drawio.
just came across this really interesting repo -> @hbmartin THANK YOU for sharing!
@markthompson94 : i'll probably try to fix this over the weekend if it's still not working and get back to you.
from graphviz2drawio.
The SVG file produced by graphviz via the Diagram lib (using the python code you provided) looks something like:
...
<!-- 1st g tag -->
<g id="edge3" class="edge">
<title>94a1a24258c54e028e3b9cb0054dadc9->739289249c574bffb2ed3d49b021b1da</title>
<path fill="none" stroke="#7b8894" d="M338.5,-406.81C338.5,-406.81 338.5,-363.22 338.5,-363.22"/>
<!-- this has a polygon tag -->
<polygon fill="#7b8894" stroke="#7b8894" points="342,-363.22 338.5,-353.22 335,-363.22 342,-363.22"/>
</g>
...
<!-- 2nd g tag -->
<g id="node5" class="node">
<title>2c1229f79a9141eea4b8ef297492ec26</title>
<image xlink:href="does-not-matter/.local/lib/python3.8/site-packages/resources/aws/compute/ec2.png" width="101px" height="101px" preserveAspectRatio="xMinYMin meet" x="432" y="-335"/>
<text text-anchor="middle" x="482.5" y="-219.6" font-family="Sans-Serif" font-size="13.00" fill="#2d3436">worker4</text>
<!-- this does NOT hava a polygon tag -->
</g>
...
As we can see above, the 1st <g ...>
tag HAS a <polygon .../>
tag, while the 2nd g tag DOES NOT have a <polygon .../>
tag, instead it has an <image ... />
tag.
Conclusion (might be wrong, I had just a quick look):
The problem is that this lib needs to have EITHER a <polygon .../>
OR an <ellipse.../>
in every <g ...>
tag (see corresp. code below) and the python Diagrams returns an <image ...>
tag instead, which is not supported.
@hbmartin Could you please just confirm -> yes/no?
graphviz2drawio/graphviz2drawio/mx/NodeFactory.py
Lines 55 to 60 in 7519935
from graphviz2drawio.
@hbmartin would you possibly be able to take a look at this? It'd be fantastic to have the ability to integrate Custom nodes from Python Diagrams in the graphviz2drawio module
from graphviz2drawio.
Was anyone able to workaround this issue?
from graphviz2drawio.
Think we need @hbmartin to help us out there
from graphviz2drawio.
Hi @hbmartin, when you have any time would you be able to look into this at all?
thanks so much!!
from graphviz2drawio.
Related Issues (20)
- deterministic output HOT 3
- Shapes are still not working
- multiple calls to convert fail HOT 1
- Make output file and stdout mutually exclusive
- Reorganize packages
- Convert cubic bezier in SVG to curved edges in Mx
- Generate documentation HOT 2
- raven HOT 4
- Crahses when open .dot file on Python 3.7 HOT 1
- Convetration error HOT 1
- Edge labeling HOT 1
- TypeError if charset is in handle of dot file HOT 1
- Support for compound=true HOT 1
- Subgraph conversion HOT 1
- fillcolor not refrected HOT 2
- Pip install pygraphviz fails on mac M1 HOT 1
- conversion fails on .dot file created by graphviz with python with a `path` shape HOT 1
- Exception in MxGraph.add_mx_geo_with_points HOT 3
- Python 3.4 circular imports HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphviz2drawio.