Graph database Analysis of the Steam Network
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

  1. sigma.exporters.svg
  2. ========================
  3. Plugin by [Guillaume Plique](https://github.com/Yomguithereal).
  4. ---
  5. This plugin aims at providing an easy way to export a graph as a SVG file.
  6. *Basic usage*
  7. ```js
  8. // Retrieving the svg file as a string
  9. var svgString = sigInst.toSVG();
  10. // Dowload the svg file
  11. sigInst.toSVG({download: true, filename: 'my-fancy-graph.svg'});
  12. ```
  13. *Complex usage*
  14. ```js
  15. sigInst.toSVG({
  16. labels: true,
  17. classes: false,
  18. data: true,
  19. download: true,
  20. filename: 'hello.svg'
  21. });
  22. ```
  23. *Parameters*
  24. * **size** *?integer* [`1000`]: size of the svg canvas in pixels.
  25. * **height** *?integer* [`1000`]: height of the svg canvas in pixels (useful only if you want a height different from the width).
  26. * **width** *?integer* [`1000`]: width of the svg canvas in pixels (useful only if you want a width different from the height).
  27. * **classes** *?boolean* [`true`]: should the exporter try to optimize the svg document by creating classes?
  28. * **labels** *?boolean* [`false`]: should the labels be included in the svg file?
  29. * **data** *?boolean* [`false`]: should additional data (node ids for instance) be included in the svg file?
  30. * **download** *?boolean* [`false`]: should the exporter make the browser download the svg file?
  31. * **filename** *?string* [`'graph.svg'`]: filename of the file to download.