toPNG

exports data of a component to a PNG file

promise toPNG(string|object id, [string|object options] );
id
string|objectthe exported view or its id, or the id of any HTML element options
string|objectoptional, a set of configuration options or the name of the output PNG file
promisea "promise" object. The promise is resolved with the contents of a PNG file that is ready for downloading.

Example

webix.toPNG($$("myChart"),{/* config options */});

Related samples

Details

options for the method can include the following:

webix.toPNG($$("table"), "somefile");
// or
webix.toPNG($$("table"), {
    filename:"somefile"
});
webix.toPNG($$("table"), {
   download:false
}).then(function(blob){
   //process raw data
});
webix.toCSV($$("table"), {
    ignore: { "votes":true, "rating":true }
});
See also
  • API
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.