Expose "Export to PNG" to @finos/perspective_viewer

Author: tobilgCreated Nov 7, 2024Updated Apr 24, 2025

Feature Request

Description of Problem:

I had a look at the current implementation, and as it seems (I'm not a Rust expert), the export as PNG is not exposed to the JavaScript API. Whereas JSON, CSV and Arrow are (e.g. https://docs.rs/perspective-js/latest/perspective_js/struct.View.html#method.to_json).

export_screenshot

Ideally, also the export to HTML would be possible. The programatic PNG export would avoid having to do a screenshot of the component if one would like to store it etc.

Potential Solutions:

If possible, add the export to PNG (and HTML) to the JS API.

Source: perspective-dev/perspective