https://github.com/vega/vega-lite/releases/tag/v4.0.0.
It is the first version of Altair to drop Python 2 compatibility, and is tested
on Python 3.5 and newer.
Enhancements
- Support for interactive legends: ([Example](http://altair-viz.github.io/gallery/interactive_legend.html#gallery-interactive-legend))
<img height="200" alt="interactive legend" src="https://user-images.githubusercontent.com/781659/70592444-aec9fb00-1b8e-11ea-8bf7-199a16810e0d.gif">
- Responsive chart width and height: ([Example](http://altair-viz.github.io/user_guide/customization.html#customization-chart-size))
<img height="200" alt="dynamic width" src="https://user-images.githubusercontent.com/781659/70593197-f782b380-1b90-11ea-8dcf-29282ea913b0.gif">
- Bins responsive to selections: ([Example](http://altair-viz.github.io/gallery/histogram_responsive.html#gallery-histogram-responsive))
<img height="200" alt="responsive bin" src="https://user-images.githubusercontent.com/781659/70596199-19346880-1b9a-11ea-9dec-f9739c2b055a.gif">
- New pivot transform: ([Example](http://altair-viz.github.io/user_guide/transform/pivot.html#user-guide-pivot-transform))
<img height="200" alt="pivot" src="https://user-images.githubusercontent.com/781659/70593369-a4f5c700-1b91-11ea-8655-9af0fbb3c149.gif">
- New Regression transform: ([Example](http://altair-viz.github.io/user_guide/transform/regression.html#user-guide-regression-transform))
<img height="200" alt="regression" src="https://user-images.githubusercontent.com/781659/70592667-78d94680-1b8f-11ea-999e-4b37725793a8.png">
- New LOESS transform: ([Example](http://altair-viz.github.io/user_guide/transform/loess.html#user-guide-loess-transform))
<img height="200" alt="loess" src="https://user-images.githubusercontent.com/781659/70592674-80005480-1b8f-11ea-99bf-9a36d5a50bd3.png">
- New density transform: ([Example](http://altair-viz.github.io/user_guide/transform/density.html#user-guide-density-transform))
<img height="200" alt="density" src="https://user-images.githubusercontent.com/781659/70592687-87bff900-1b8f-11ea-842b-0a68f666e26b.png">
- Image mark ([Example](http://altair-viz.github.io/user_guide/marks.html#image-mark))
<img height="200" alt="image" src="https://user-images.githubusercontent.com/781659/70592972-4b40cd00-1b90-11ea-93ca-81d49c196053.png">
- New default ``html`` renderer, directly compatible with Jupyter Notebook and
JupyterLab without the need for frontend extensions, as well as tools like
nbviewer and nbconvert, and related notebook environments such as Zeppelin,
Colab, Kaggle Kernels, and DataBricks. To enable the old default renderer, use:
alt.renderers.enable('mimetype')
- Support per-corner radius for bar marks: ([Example](http://altair-viz.github.io/gallery/bar_rounded.html#gallery-bar-rounded))
<img height="300" alt="round-bar" src="https://user-images.githubusercontent.com/781659/70592714-99090580-1b8f-11ea-9304-03d3967d600c.png">
Grammar Changes
- Sort-by-field can now use the encoding name directly. So instead of
alt.Y('y:Q', sort=alt.EncodingSortField('x_field', order='descending'))
you can now use::
alt.Y('y:Q', sort="-x")
- The ``rangeStep`` argument to :class:`Scale` and :meth:`Chart.configure_scale` is deprecated.
instead, use ``chart.properties(width={"step": rangeStep})`` or
``chart.configure_view(step=rangeStep)``.
- ``align``, ``center``, ``spacing``, and ``columns`` are no longer valid chart properties, but
are moved to the encoding classes to which they refer.