Altair v4.1.0 Release Notes
Release Date: 2020-04-01 // about 4 years ago-
- Minimum Python version is now 3.6
- ๐ Update Vega-Lite to version 4.8.1; many new features and bug fixes from Vega-Lite versions 4.1 through 4.8; see Vega-Lite Release Notes.
โจ Enhancements
strokeDash
encoding can now be used to control line styles (Example: Multi Series Line Chart- ๐พ
chart.save()
now relies on altair_saver for more flexibility (#1943). - New
chart.show()
method replaceschart.serve()
, and relies on altair_viewer to allow offline viewing of charts (#1988).
๐ Bug Fixes
- ๐ Support Python 3.8 (#1958)
- ๐ Support multiple views in JupyterLab (#1986)
- ๐ Support numpy types within specifications (#1914)
- ๐ Support pandas nullable ints and string types (#1924)
๐ง ##Maintenance
Previous changes from v4.0.0
-
๐ 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.