-
Notifications
You must be signed in to change notification settings - Fork 2.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
flow chart support #593
Comments
All of the Graphviz generic shapes are available. Just create a Graphviz shapes: https://graphviz.gitlab.io/doc/info/shapes.html Have a look at the following issue comments for example code. Also have a look at html nodes: |
Here is the flowchart.js Demo 1 in this library. from diagrams import Diagram, Cluster, Node, Edge
cluster_attr = {
"label":"",
"bgcolor":"transparent",
"penwidth":"0",
}
with Diagram("\n\nflowchart.js Demo 1", direction="TB", show=False) :
""" """
with Cluster("1", graph_attr=cluster_attr):
start = Node(label="start a_pyflow_test", labelloc="c",
shape="rectangle", style="rounded", width="2", height="0.5", )
loopback = Node(label="", labelloc="c",
shape="plaintext", style="solid", width="0", height="0", )
operation = Node(label="do something", labelloc="c",
shape="rectangle", style="solid", width="2", height="0.5", )
condition = Node(label="Yes or No?", labelloc="c",
shape="diamond", style="solid", width="2", height="1", )
inputoutput = Node(label="output: something...", labelloc="c",
shape="parallelogram", style="solid", width="2.5", height="0.5", )
end = Node(label="end a_pyflow_test", labelloc="c",
shape="rectangle", style="rounded", width="2", height="0.5", )
with Cluster("2", graph_attr=cluster_attr):
subroutine = Node(label="<f0> |<f1>A Subroutine|<f2> ", labelloc="c",
shape="record", style="solid", width="2", height="0.5", )
subroutine_out = Node(label="", labelloc="c",
shape="plaintext", style="solid", width="0", height="0", )
(
start - Edge(tailport="s", headport="n",) -
loopback >> Edge(tailport="s", headport="n",) >>
operation >>
condition >> Edge(taillabel="yes") >>
inputoutput >>
end
)
(
condition >> Edge(taillabel="no", headport="f0", tailport="e", minlen="0",) >>
subroutine
)
(
subroutine - Edge(tailport="f2", minlen="0",) -
subroutine_out
)
(
subroutine_out -
loopback
) |
The text was updated successfully, but these errors were encountered: