Igor a610223309 Improve student view | há 5 anos atrás | |
---|---|---|
.. | ||
README.md | há 5 anos atrás | |
sigma.exporters.svg.js | há 5 anos atrás |
Plugin by Guillaume Plique.
This plugin aims at providing an easy way to export a graph as a SVG file.
Basic usage
// Retrieving the svg file as a string
var svgString = sigInst.toSVG();
// Dowload the svg file
sigInst.toSVG({download: true, filename: 'my-fancy-graph.svg'});
Complex usage
sigInst.toSVG({
labels: true,
classes: false,
data: true,
download: true,
filename: 'hello.svg'
});
Parameters
1000
]: size of the svg canvas in pixels.1000
]: height of the svg canvas in pixels (useful only if you want a height different from the width).1000
]: width of the svg canvas in pixels (useful only if you want a width different from the height).true
]: should the exporter try to optimize the svg document by creating classes?false
]: should the labels be included in the svg file?false
]: should additional data (node ids for instance) be included in the svg file?false
]: should the exporter make the browser download the svg file?'graph.svg'
]: filename of the file to download.