Igor a610223309 Improve student view | před 5 roky | |
---|---|---|
.. | ||
README.md | před 5 roky | |
sigma.renderers.snapshot.js | před 5 roky |
Plugin by Guillaume Plique.
This plugin makes the retrieval of an image version of the graph rendered with canvas or webgl as easy as a stroll in a park.
Basic usage
// Retrieving a dataUrl of the rendered graph
var dataUrl = myRenderer.snapshot();
// Download the rendered graph as an image
myRenderer.snapshot({download: true});
Complex usage
myRenderer.snapshot({
format: 'jpg',
background: 'white',
labels: false
});
Parameters
png
]: file format of the image. Supported: png
, jpg
, gif
, tiff
.true
] : do we want the labels on screen to be displayed on the snapshot?false
] : whether you want the graph image to be downloaded by the browser.graph.png
] : full filename for the file to download.