gsdot-svg

1.0.13 • Public • Published

Converts Graph Stack Text dot model to SVG

ES module that exports a single function, gsdot_svg.

Pass Dot lines, header, and ID of div to layout and draw SVG.

Dot lines are just Graphviz lines formatted with classes via model_to_dots. The header can include Graphviz options for nodes, edges, and graph. If "default" is passed as a value, this value is used:

digraph {
    esep=".20"
    overlap=false
    splines=true
    charset="utf-8"
    graph [fontname="Arial"]
    edge [penwidth="2" arrowsize="0.5" arrowtail="vee" arrowhead="vee" color="#bbbbbb" fontname="Arial"]
    node [penwidth="2" margin=".1,0" fontname="Arial"]

gsdot_svg returns the svg in addtion to setting the div

Licenses for D3 and hpcc-js/wasm-graphviz are in dist

Color scheme is from Paul Tol

Readme

Keywords

none

Package Sidebar

Install

npm i gsdot-svg

Weekly Downloads

24

Version

1.0.13

License

CC0-1.0

Unpacked Size

831 kB

Total Files

8

Last publish

Collaborators

  • acodrst