Changelogs » Altair

PyUp Safety actively tracks 261,870 Python packages for vulnerabilities and notifies you when to upgrade.



- 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](
  - ``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)
  - Altair now uses [black]( and [flake8]( for maintaining code quality & consistency.

  It is the first version of Altair to drop Python 2 compatibility, and is tested
  on Python 3.5 and newer.
  - Support for interactive legends: ([Example](
  <img height="200" alt="interactive legend" src="">
  - Responsive chart width and height: ([Example](
  <img height="200" alt="dynamic width" src="">
  - Bins responsive to selections: ([Example](
  <img height="200" alt="responsive bin" src="">
  - New pivot transform: ([Example](
  <img height="200" alt="pivot" src="">
  - New Regression transform: ([Example](
  <img height="200" alt="regression" src="">
  - New LOESS transform: ([Example](
  <img height="200" alt="loess" src="">
  - New density transform: ([Example](
  <img height="200" alt="density" src="">
  - Image mark ([Example](
  <img height="200" alt="image" src="">
  - 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:
  - Support per-corner radius for bar marks: ([Example](
  <img height="300" alt="round-bar" src="">
  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
  - ``align``, ``center``, ``spacing``, and ``columns`` are no longer valid chart properties, but
  are moved to the encoding classes to which they refer.


*released Nov 27, 2019*
  Last release to support Python 2
  - Add inheritance structure to low-level schema classes (1803)
  - Add ``html`` renderer which works across frontends (1793)
  - Support Python 3.8 (1740, 1781)
  - Add ``:G`` shorthand for geojson type (1714)
  - Add data generator interface: ``alt.sequence``, ``alt.graticule``,
  ``alt.sphere()`` (1667, 1687)
  - Support geographic data sources via ``__geo_interface__`` (1664)
  Bug Fixes
  - Support ``pickle`` and ``copy.deepcopy`` for chart objects (1805)
  - Fix bug when specifying ``count()`` within ``transform_joinaggregate()`` (1751)
  - Fix ``LayerChart.add_selection`` (1794)
  - Fix arguments to ``project()`` method (1717)
  - Fix composition of multiple selections (1707)


Upgraded to Vega-Lite version 3.4 (See [Vega-Lite 3.4 Release Notes](
  Following are changes to Altair in addition to those that came with VL 3.4:
  - Selector values can be used directly in expressions (1599)
  - Top-level chart repr is now truncated to improve readability of error
  messages (1572)
  Bug Fixes
  - top-level ``add_selection`` methods now delegate to sub-charts. Previously
  they produced invalid charts (1607)
  - Unsupported ``mark_*()`` methods removed from LayerChart (1607)
  - New encoding channels are properly parsed (1597)
  - Data context is propagated when encodings are specified as lists (1587)
  Backward-Incompatible Changes
  - ``alt.LayerChart`` no longer has ``mark_*()`` methods, because they never
  produced valid chart specifications) (1607)




  - better handling of datetimes and timezones (1053)
  - all inline datasets are now converted to named datasets and stored at the
  top level of the chart. This behavior can be disabled by setting
  ``alt.data_transformers.consolidate_datasets = False`` (951 & 1046)
  - more streamlined shorthand syntax for window transforms (957)
  - update from Vega-Lite 2.4.3 to Vega-Lite 2.6.0; see vega-lite change-logs [2.5.0]( [2.5.1]( [2.5.2]( [2.6.0](
  Backward-incompatible changes
  - ``alt.SortField`` renamed to ``alt.EncodingSortField`` and
  ``alt.WindowSortField`` renamed to ``alt.SortField`` (923)
  Bug Fixes
  - Fixed serialization of logical operands on selections within
  ``transform_filter()``: (1075)
  - Fixed sphinx issue which embedded chart specs twice (1088)
  - Avoid Selenium import until it is actually needed (982)


  - add a ``scale_factor`` argument to ```` to allow the
  size/resolution of saved figures to be adjusted. (918)
  - add an ``add_selection()`` method to add selections to charts (832)
  - add ``chart.serve()`` and ``chart.display()`` methods for more flexiblity
  in displaying charts (831)
  - allow multiple fields to be passed to encodings such as ``tooltip``
  and ``detail`` (830)
  - make ``timeUnit`` specifications more succinct, by parsing them in a manner
  similar to aggregates (866)
  - make ``to_json()`` and ``to_csv()`` have deterministic filenames, so in json
  mode a single datasets will lead to a single on-disk serialization (862)
  Breaking Changes
  - make ``data`` the first argument for all compound chart types to match the
  semantics of ``alt.Chart`` (this includes ``alt.FacetChart``,
  ``alt.LayerChart``, ``alt.RepeatChart``, ``alt.VConcatChart``, and
  ``alt.HConcatChart``) (895).
  - update vega-lite to version 2.4.3 (836)
  - Only API change is internal: ``alt.MarkProperties`` is now ``alt.MarkConfig``
  - update vega to v3.3 & vega-embed to v3.11 in html output & colab renderer (838)


Nov 7, 2016
  Major additions
  - Update to Vega-Lite 1.2 and make all its enhancements available to Altair
  - Add `Chart.serve` method
  - Add `altair.expr` machinery to specify transformations and filterings
  - Add `Chart.savechart` method, which can output JSON, HTML, and (if Node
  is installed) PNG and SVG. See
  Bug Fixes
  - Countless minor bug fixes
  - Update to Vega-Lite 1.2.1 and add its supported features
  - Create website:
  - Set up Travis to run conda & pip; and to build documentation