Altair v4.0.0 Release Notes
Release Date: 2019-12-11 // over 4 years ago-
๐ Altair Version 4.0.0 release
๐ Version 4.0.0 is based on Vega-Lite version 4.0, which you can read about at
๐ 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)
๐ฑ Responsive chart width and height: (Example)
๐ฑ Bins responsive to selections: (Example)
๐ฑ๐ New pivot transform: (Example)
๐ New Regression transform: (Example)
๐ New LOESS transform: (Example)
๐ New density transform: (Example)
Image mark (Example)
๐ 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,
0๏ธโฃ Colab, Kaggle Kernels, and DataBricks. To enable the old default renderer, use:alt.renderers.enable('mimetype')
๐ Support per-corner radius for bar marks: (Example)
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, usechart.properties(width={"step": rangeStep})
or
๐งchart.configure_view(step=rangeStep)
.align
,center
,spacing
, andcolumns
are no longer valid chart properties, but
๐ are moved to the encoding classes to which they refer.