toPNG

exports data of a component to a PNG file

object toPNG(string|object id, [string|object options] );

Parameters

idstring|objectthe exported view or its id, or the id of any HTML element
optionsstring|objectoptional, a set of configuration options or the name of the created PNG file

Returns

objecta "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

See also
Back to top