Light High Efficiency Graph Component
en

Qunee Developer Guide

Other properties and methods

Other properties and methods

Example

Exports the canvas to images, and displays at new webpage

function exportImage(graph, scale, clipBounds) {
    var imageInfo = graph.exportImage(scale, clipBounds);
    if (!imageInfo || !imageInfo.data) {
        return false;
    }
    var win = window.open();
    var doc = win.document;
    doc.title = "export image - " + imageInfo.width + " x " + imageInfo.height;
    var img = doc.createElement("img");
    img.src = imageInfo.data;
    doc.body.appendChild(img);
}