You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Can you clarify the use case for this? There is already a prominent button (as you note), and if this were to be added it would still require the entire UI code to be loaded, attached to the DOM and visible to work.
Thanks for the response @texodus. The use case is for my project https://sql-workbench.com which uses Perspective v3 in a React app.
I provide the possibility of passing SQL queries and visualization configuration via the URL, so that users can share their work with others.
I‘d like to trigger those generations programatically, e.g. via a cron schedule on a server, that call a specific route only rendering the Graph result instead of the whole page.
Also, I could automatically start downloading the Graph as PNG if this would be exposed as API once the rendering is complete, w/o user interaction. Currently the user would need multiple clicks.
Additionally, this would also enable browser automation e.g. with Puppeteer. I haven’t found a way to simulate the clicks on the Perspective component to trigger the PNG saving.
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).
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.
The text was updated successfully, but these errors were encountered: