-
Notifications
You must be signed in to change notification settings - Fork 104
Description
First, thanks for your work on this, I think vega is brilliant.
I want to make it easy to share interactive versions of charts with coworkers. I am using altair to make charts. I could export as a static HTML, but that involves uploading and downloading files.
In your webui, you can get a shareable link to a chart by encoding the JSON spec into a LZ compressed string, which is then stored directly in the URL. Brilliant! I can share this URL with coworkers and it's super easy.
Currently, I can go through this flow:
- use
chart.to_json()from Altair - copy that json string manually into the webui
- use the webui to get the shareable link
I would like to make this more streamlined, so there is something like Chart.to_url() which gives me the link directly.
The problem is that the web UI uses a custom implementation of LZ compression, and while there is a python port it is outdated and doesn't work (doesn't decode from URI). So from python, I don't have a good way of encoding the JSON spec into the URL.
To make this work, I think we would need to:
- Get buy in from you that this is worthwhile
- Switch to have a more formal/portable URL encode/decode algorithm so other languages can write to it
- Ideally, formalize the URL API even more so you can choose options like "enter in fullscreen"
- Ideally, have an option to make the viewed chart super clean and minimal, even more minimal than fullscreen.
- Ideally, add this
.to_url()method toaltair.Chart. But I can write my own helper function for this, so not really needed.