Make vl-convert saving work when the data server is enabled
from .html import spec_to_html
+from ..vegalite.v5.data import data_transformers
def spec_to_mimebundle(
@@ -104,7 +105,11 @@ def _spec_to_mimebundle_with_engine(spec, format, mode, **kwargs):
# Compute VlConvert's vl_version string (of the form 'v5_2')
# from SCHEMA_VERSION (of the form 'v5.2.0')
vl_version = "_".join(SCHEMA_VERSION.split(".")[:2])
-
+ # Turn off the data transformer until the following issue is resolved
+ # https://github.com/vega/vl-convert/issues/31#
+ with (
+ data_transformers.enable("default") and data_transformers.disable_max_rows()
+ ):
if format == "vega":
vg = vlc.vegalite_to_vega(spec, vl_version=vl_version)
return {"application/vnd.vega.v5+json": vg}
