Skip to content

Exporting visualization for javascript #1084

Closed Answered by sehilyi
Ahmad-Abdou asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Ahmad-Abdou, thank you for leaving a question here!

Gosling supports JS API to export a PNG file (http://gosling-lang.org/docs/js-api#exportpng).

For example, you can use it like

<script type="module">
        import { embed } from 'gosling.js';
        const gosApi = embed(document.getElementById('gosling-container'), mySpec);
        gosApi.exportPng(true); // `true` for the transparent background
</script>

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ahmad-Abdou
Comment options

Answer selected by Ahmad-Abdou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants