To export data from datatable or treetable into a PNG file, you need to call the toPNG method. The method takes the following parameters:
For example, if you want to export a datatable to a PNG file, you need to initialize a datatable:
{
view:"datatable",
id: "myDataTable",
// datatable configuration
...
}
and then call the toPNG() method with the datatable id as its parameter:
webix.toPNG($$("myDataTable"));
You can customize the default export settings in the following way:
webix.toPNG($$("table"), {
download:false
}).then(function(blob){
//process raw data
});
webix.toPNG($$("table"), {
ignore: { "votes":true, "rating":true }
});
Back to top