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

Handle Vega and Vega-Lite media types when unbundling #32

Open
nokome opened this issue Mar 14, 2021 · 1 comment
Open

Handle Vega and Vega-Lite media types when unbundling #32

nokome opened this issue Mar 14, 2021 · 1 comment

Comments

@nokome
Copy link
Member

nokome commented Mar 14, 2021

In the unbundle method we handle Plotly JSON:

jupita/src/index.ts

Lines 449 to 455 in a4b5757

public unbundle(bundle: Record<string, any>): schema.Node {
const plotly = bundle['application/vnd.plotly.v1+json']
if (plotly !== undefined) {
// A Plotly, interactive image.
// A `contentUrl` is required and using an empty string can cause
// problems elsewhere. So we use a placeholder which also tells the user
// if there were issues rendering the Plotly data.

This should be expanded to handle other visualization JSON formats, specifically application/vnd.vega.v3+json and application/vnd.vegalite.v2+json (and their other versions).

@nokome
Copy link
Member Author

nokome commented Mar 22, 2021

To do this we may have to alt.renderers.enable('mimebundle'), see https://altair-viz.github.io/user_guide/display_frontends.html#altair-s-renderer-framework

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

1 participant