Skip to content

Commit

Permalink
Remove unneeded dedicated Colab/Kaggle html renderer (#205)
Browse files Browse the repository at this point in the history
* Remove dedicated Colab and Kaggle renderers. They work fine with HTML
  • Loading branch information
jonmmease authored Jan 1, 2023
1 parent 1eb904d commit a8dad6f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
2 changes: 0 additions & 2 deletions python/vegafusion/vegafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ def enable_mime(mimetype="vega", embed_options=None):
:param mimetype: Mime type. One of:
- "vega" (default)
- "html"
- "html-colab" or "colab"
- "html-kaggle" or "kaggle
- "svg"
- "png": Note: the PNG renderer can be quite slow for charts with lots of marks
:param embed_options: dict (optional)
Expand Down
25 changes: 0 additions & 25 deletions python/vegafusion/vegafusion/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,6 @@ def vegafusion_mime_renderer(spec, mimetype="vega", embed_options=None):
embed_options=embed_options
)
return {"text/html": html}
elif mimetype == "html-colab" or mimetype == "colab":
html = spec_to_html(
tx_vega_spec,
mode="vega",
vega_version="5",
vegalite_version=altair_vl_version(),
vegaembed_version="6",
fullhtml=True,
requirejs=False,
output_div="altair-viz",
embed_options=embed_options
)
return {"text/html": html}
elif mimetype == "html-kaggle" or mimetype == "kaggle":
html = spec_to_html(
tx_vega_spec,
mode="vega",
vega_version="5",
vegalite_version=altair_vl_version(),
vegaembed_version="6",
fullhtml=False,
requirejs=True,
embed_options=embed_options
)
return {"text/html": html}
elif mimetype == "svg":
import vl_convert as vlc
svg = vlc.vega_to_svg(tx_vega_spec)
Expand Down

0 comments on commit a8dad6f

Please sign in to comment.