VegaFusion 2.0#
A new era: Building blocks for analyzing, accelerating, and scaling Vega visualizations:
By: Jon Mease
The VegaFusion team is excited to announce the release of VegaFusion 2.0. This major release represents a significant evolution in VegaFusion’s architecture and target audience. The focus has been on simplification - making VegaFusion easier to maintain and easier to integrate into larger Vega systems to accelerate and scale Vega visualizations.
Modernized Rust Core#
The core Rust implementation has been significantly simplified by taking advantage of modern DataFusion functionality:
- New - get_column_usage()utility function for analyzing the column dependencies of datasets in a Vega spec.
- Custom User Defined Functions (UDFs) have been largely replaced with DataFusion’s native capabilities. 
- Vega transforms are now implemented directly against the DataFusion DataFrame API, rather than using the circuitous SQL generation approach of VegaFusion 1. 
- Updated to DataFusion 43 and Arrow 52.3 for improved performance and bug fixes. 
JavaScript / WebAssembly#
The JavaScript integration has been simplified while maintaining full functionality:
- Removed the separate - vegafusion-embedpackage as the- vegafusion-wasmpackage now renders charts using vega-embed.
- The full VegaFusion runtime is now compiled to WebAssembly as part of the - vegafusion-wasmpacakge, making it possible to run VegaFusion entirely in the browser without requiring an external server.
- Connecting to external VegaFusion servers via gRPC-Web remains supported. 
Python: Removal of Upstreamed Vega-Altair Integration#
All the VegaFusion 1.x logic for integrating with Vega-Altair has been upstreamed into the Vega-Altair project itself. So this functionality has been removed in VegaFusion 2.0.
In particular:
- To use VegaFusion with Vega-Altair, activate the - "vegafusion"data transformer.
- The - vegafusion-jupyterpackage has been retired in favor of using Altair’s built-in- JupyterChartfor Altair charts and Vega-Lite specs. For Vega specs, the new AnyWidget-based- VegaFusionWidgetis included in the- vegafusionpackage.
- vf.enable()has been removed. Instead, use the- "vegafusion"data transformer along with any of Altair’s built-in renderers
- vf.save()has been removed. Instead, use Altair’s native- chart.save()method with the- "vegafusion"data transformer enabeld.
- vf.transformed_data()has been removed. Instead, use Altair’s native- chart.transformed_data()method.
Python: Enhanced DataFrame Compatibility#
VegaFusion 2.0 brings improved DataFrame compatibility:
- Support for any Narwhals-compatible DataFrame type as inline datasets. 
- Zero-copy sharing of Arrow data from Polars to VegaFusion’s DataFusion runtime is now supported thanks to the arro3 project.. 
- The DuckDB SQL connection has been removed, but DuckDB relations are now directly supported as inline datasets, with automatic column pruning prior to conversion to Arrow. 
- Reduced Python dependencies. VegaFusion now requires only - arrow3-core,- packaging, and- narwhals. In particular,- pyarrowand- pandasare no longer required dependencies.
New Documentation#
VegaFusion 2.0 launches with completely revamped documentation:
- New PyData Sphinx theme at vegafusion.io 
- Standalone examples in Python and Rust 
- Comprehensive support tables for Vega transforms and expressions 
Learn more#
Check out these resources to learn more: