A Livebook smart-cell to render diagrams powered by Kroki.
Add it as a dependency in your notebook with:
Mix.install([:kino_kroki])
Paste the diagram source in the editor and select the diagram type.
You may also render from a variable with:
graph = """
digraph G { bgcolor="purple:pink" label="agraph" fontcolor="white"
fontname="Helvetica,Arial,sans-serif"
node [fontname="Helvetica,Arial,sans-serif"]
edge [fontname="Helvetica,Arial,sans-serif"]
subgraph cluster1 {fillcolor="blue:cyan" label="acluster" fontcolor="white" style="filled" gradientangle="270"
node [shape=box fillcolor="red:yellow" style="filled" gradientangle=90]
anode;
}
}
Kino.Kroki.new(graph, :graphviz)
Copyright (c) 2022 Dimitris Zorbas, MIT License. See LICENSE.txt for further details.