Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
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.
 
 
jrtechs 2b6228fe59 Added the steam graph project website in this repo. 6 years ago
..
README.md Added the steam graph project website in this repo. 6 years ago
sigma.renderers.snapshot.js Added the steam graph project website in this repo. 6 years ago

README.md

sigma.renderers.snapshot

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

  • format ?string [png]: file format of the image. Supported: png, jpg, gif, tiff.
  • background ?string: whether you want to specify a background color for the snapshot. Transparent if none specified.
  • labels ?boolean [true] : do we want the labels on screen to be displayed on the snapshot?
  • download ?boolean [false] : whether you want the graph image to be downloaded by the browser.
  • filename ?string [graph.png] : full filename for the file to download.