Env Functions
svg_settings
env VISUALS.svg_settings(
top: 'f64' = 40.0,
left: 'f64' = 10.0,
right: 'f64' = 30.0,
bottom: 'f64' = 10.0,
deltax: 'f64' = 10.0,
deltay: 'f64' = 10.0,
fontsize: 'f64' = 8.0
)
Arguments:
top: 'f64' = 40.0=>left: 'f64' = 10.0=>right: 'f64' = 30.0=>bottom: 'f64' = 10.0=>deltax: 'f64' = 10.0=>deltay: 'f64' = 10.0=>fontsize: 'f64' = 8.0=>
Generate the margins for the SVGs
Network Functions
set_nodesize_attrs
network VISUALS.set_nodesize_attrs(
attrs: '& [f64]',
minsize: 'f64' = 4.0,
maxsize: 'f64' = 12.0
)
Arguments:
attrs: '& [f64]'=> Attribute values to use for size scalingminsize: 'f64' = 4.0=> minimum size of the nodemaxsize: 'f64' = 12.0=> maximum size of the node
Set the node size of the nodes based on the attribute value
svg_save
network VISUALS.svg_save(
outfile: '& Path',
label: 'Template' = Template { parts: [Variable(TemplateVar { name: "NAME", optional: false, format: None })], positions: [1], original: "{NAME}" },
width: 'Option < f64 >',
height: 'Option < f64 >',
bgcolor: 'Option < String >',
settings: 'Settings' = Settings { top: 40.0, bottom: 10.0, right: 30.0, left: 10.0, deltax: 10.0, deltay: 10.0, fontsize: 8.0 }
)
Arguments:
outfile: '& Path'=>label: 'Template' = Template { parts: [Variable(TemplateVar { name: "NAME", optional: false, format: None })], positions: [1], original: "{NAME}" }=>width: 'Option < f64 >'=>height: 'Option < f64 >'=>bgcolor: 'Option < String >'=>settings: 'Settings' = Settings { top: 40.0, bottom: 10.0, right: 30.0, left: 10.0, deltax: 10.0, deltay: 10.0, fontsize: 8.0 }=>
Exports the network as a svg
svg_ts_blocks
network VISUALS.svg_ts_blocks(
outfile: '& Path',
label: 'Template',
ts_name: 'String',
width: 'f64',
arr_width: 'f64',
bgcolor: 'Option < String >',
settings: 'Settings' = Settings { top: 40.0, bottom: 10.0, right: 30.0, left: 10.0, deltax: 10.0, deltay: 10.0, fontsize: 8.0 }
)
Arguments:
outfile: '& Path'=> Output SVG filelabel: 'Template'=> label to put for nodests_name: 'String'=> Name of the timeserieswidth: 'f64'=> Width of the SVGarr_width: 'f64'=> width of the arrowsbgcolor: 'Option < String >'=> Background colorsettings: 'Settings' = Settings { top: 40.0, bottom: 10.0, right: 30.0, left: 10.0, deltax: 10.0, deltay: 10.0, fontsize: 8.0 }=>