Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export graph after creating visual #571

Open
jsbasra opened this issue Jan 5, 2023 · 6 comments
Open

Export graph after creating visual #571

jsbasra opened this issue Jan 5, 2023 · 6 comments

Comments

@jsbasra
Copy link

jsbasra commented Jan 5, 2023

Create a button to export a snapshot as a image or pdf. I don't currently see any way to export visualization after it is made. Please add this functionality.

@danmarshall
Copy link
Contributor

Hello, you can use this code:

const sdcanvas = document.querySelector('.sanddance-gl canvas');
const base64PNGDataUrl = sdcanvas.toDataURL('image/png');

@danmarshall
Copy link
Contributor

Related: #198

@jsbasra
Copy link
Author

jsbasra commented Jan 13, 2023

@danmarshall , thank you for your reply. However, I don't really see how to use that code inside the Azure Data Studio / VSCode extension. Would I somehow connect it to the webapp, and use this javascript code in a console?

@danmarshall
Copy link
Contributor

Ok, it wasn't clear that you were in an ADS/VSCode context. Can I ask if you are using the Snapshots feature? If so, the snapshots created only use a thumbnail of the chart, and are meant to re-hydrate an interactive visualization. Are you able to take a screenshot with your device? Perhaps you can explain your scenario and detail the feature request.

@jsbasra
Copy link
Author

jsbasra commented Jan 14, 2023

Yes, I am able to take a snapshot, and I can see optoins to cut/copy/paste but it doesn't allow me to paste an image outside. I was hoping there was a button to export the snapshot as a pdf/image for adding to a report. It could be that I am missing the option somewhere in the UI.

@danmarshall
Copy link
Contributor

Related: #614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants