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
    • ๐Ÿ’พ now relies on altair_saver for more flexibility (#1943).
    • New method replaces chart.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

    • Altair now uses black and flake8 for maintaining code quality & consistency.

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

    โœ… 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)
    interactive legend

    ๐Ÿ“ฑ Responsive chart width and height: (Example)
    dynamic width

    ๐Ÿ“ฑ Bins responsive to selections: (Example)
    ๐Ÿ“ฑ responsive bin

    ๐Ÿ†• 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:


    ๐Ÿ‘Œ 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, use{"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.