Repository navigation
Releases
Version 6.3.0
What's Changed
See below for details on what is new in this release. A special compatibility note is that this release drops support for Python 3.10 (which is reaching end of life in Oct).
Enhancements
- feat: Allow signals/params to be passed to alt.datum[...] by @joelostblom in #3990
- You can now write
alt.datum[xcol_param]in addition tof'datum[{xcol_param.name}]'as in this example in the docs.
- You can now write
Bug Fixes
- fix: raise TypeError for invalid property setter arguments by @suzunn in #4068
- Previously, these would be silently discarded but now an error would be raised instead, e.g. the second argument in
alt.X("field:Q").scale(["a", "b"], ["#1FC3AA", "#8624F5"])
- Previously, these would be silently discarded but now an error would be raised instead, e.g. the second argument in
- fix: Expression objects not working in alt.value() by @genrichez in #4083
- You can now write
alt.value(alt.expr.scale("x", alt.datum.c1)in addition toalt.value(alt.expr("scale('x', datum.c1)")).
- You can now write
- fix: report missing anywidget for JupyterChart by @dk3yyyy in #4089
Documentation
- docs: add date input gallery example by @Kato-MT in #4088
- docs: add number input to date input example by @SR0725 in #4091
- docs: remove altair_data_server references by @youdie006 in #4074
- chore: Fix two typos in datasets module by @maxtaran2010 in #4081
- docs: document lookup key compatibility by @SR0725 in #4094
- docs: Insert relevant "Learn more" links in gallery examples by @joelostblom in #4002
Maintenance
- build: Drop support for Python 3.10 by @joelostblom in #4029
- ci: Change timing to actually be only twice a month by @joelostblom in #4073
- build: Handle mistune expression signature tokens by @joelostblom in #4076
- ci: Note that docs are now automatically built by @joelostblom in #4075
- chore(typing): Remove PEP 728 type ignores by @MarcoGorelli in #4080
- ci: bump actions/checkout from 6 to 7 in the github-actions-version-updates group by @dependabot[bot] in #4079
- build: Keep tagless forks compatible with sphinxext-altair's altair>=4 requirement by @joelostblom in #4097
- ci: Gate release tags on approval by @joelostblom in #4099
- ci: Improve wording and format of release message by @joelostblom in #4101
- chore: Update ty, ruff and mypy type-checker version by @alec-bike in #4098
- ci: Allow overriding the release bump type by @mattijn in #4103
- ci: Group security updates by @joelostblom in #4115
- ci: Group all non-major updates together and clarify names by @joelostblom in #4123
- ci: bump the github-actions group with 2 updates by @dependabot[bot] in #4124
- ci: Group dependabot correctly by @joelostblom in #4130
- build: bump the uv-minor-date group with 5 updates by @dependabot[bot] in #4131
- build: bump the uv-minor group across 1 directory with 19 updates by @dependabot[bot] in #4132
- build: bump the uv-security group across 1 directory with 2 updates by @dependabot[bot] in #4133
- ci: Fix generation script and ci check by @joelostblom in #4136
- build: Remove dead doc-build code and deprecated attribute access by @joelostblom in #4122
New Contributors
- @youdie006 made their first contribution in #4074
- @maxtaran2010 made their first contribution in #4081
- @genrichez made their first contribution in #4083
- @suzunn made their first contribution in #4068
- @dk3yyyy made their first contribution in #4089
- @Kato-MT made their first contribution in #4088
- @SR0725 made their first contribution in #4094
Full Changelog: v6.2.2...v6.3.0
Version 6.2.2
What's Changed
Bug Fixes
- fix: Avoid layered concat view name collisions by @joelostblom in #4066
- fix: Include layered concat views in selection params by @joelostblom in #4069
Documentation
- docs: Add an Andrews curves example to the gallery by @kyo5uke in #4049
- docs: Add an interactive bin-size example to the gallery by @kyo5uke in #4050
- docs: Validate docs publish clone by @joelostblom in #4064
- docs: Fix broken example and sync with VL by @joelostblom in #4010
Maintenance
- ci: Make warning for doc preview page more prominent by @joelostblom in #4048
- ci: Check uv lockfile by @joelostblom in #4052
- ci: Run docs build only for docs-related changes and don't duplicate builds on PRs by @joelostblom in #4053
- build: Update dependencies from dependabot alerts by @joelostblom in #4055
- ci: Upload docs build artifact for PR preview by @joelostblom in #4056
- build: Reduce dependabot PRs by @joelostblom in #4028
- ci: Correctly resolve docbuild worflow number from PR number by @joelostblom in #4060
- ci: Group major GitHub Actions updates by @joelostblom in #4061
- ci: Rename docbuild job from 'build' to 'docbuild' by @joelostblom in #4062
- ci: Schedule release drafts twice monthly by @joelostblom in #4057
- ci: Publish official docs after release is published by @joelostblom in #4054
- ci: Document how local versioning works and add base tag by @joelostblom in #4051
- ci: Disambiguate workflow naming by @joelostblom in #4063
- ci: enable partial Python 3.14t coverage by @axelray-dev in #4038
New Contributors
Full Changelog: v6.2.1...v6.2.2
Version 6.2.1
What's Changed
Bug Fixes
- fix: Write dataset cache files atomically by @joelostblom in #4034
Maintenance
- ci: Prevent uv from dirtying worktree during publish by @joelostblom in #4045
- ci: Clarify release review instructions by @joelostblom in #4046
Full Changelog: v6.2.0...v6.2.1
Version 6.2.0
This is the first release in an effort to have smaller, more frequent releases going forward. By making the release process more convenient, we aim to more quickly push out fixes and features that already landed on the main branch to a released version of Altair.
What's Changed
Enhancements
- feat: Add ty type-check support by @alec-bike in #4015
- feat: Update olli integration to v3 by @jonathanzong in #4025
Bug Fixes
Maintenance
- chore: π§ Bump versions for release by @joelostblom in #4009
- chore: update pandas-stubs pin for where typing fix by @axelray-dev in #4027
- ci: Label PRs based on semantic title prefix by @joelostblom in #4031
- ci: Label perf PRs as enhancements by @joelostblom in #4032
- build: Derive version from VCS via versioningit by @joelostblom in #4030
- chore: Mark v6.1.0 tag as reachable by @joelostblom in #4040
- ci: Semi-automate releases by @joelostblom in #4036
- ci: Speed up and harden release draft workflow by @joelostblom in #4041
- ci: Use Cocogitto action v4.2 install-only mode by @joelostblom in #4042
- ci: Use only tag, not commit, for releases by @joelostblom in #4043
- chore: Fix git push command for tagging release by @joelostblom in #4011
- chore: Bump version to 6.2.0dev by @joelostblom in #4012
- chore: Update mypy and ruff type/lint checkers by @alec-bike in #4022
- ci: Fix label typo by @joelostblom in #4033
New Contributors
- @jonathanzong made their first contribution in #4025
- @axelray-dev made their first contribution in #4027
Full Changelog: v6.1.0...v6.2.0
Version 6.1.0
What's Changed
There are many exciting improvements in this release! Read on for details and a big thanks to everyone who contributed π
Enhancements
- feat: Update to Vega-Lite 6.4.1 by @joelostblom in #4005. See the Vega-Lite Release Notes for details; a few highlights:
- Newlines are now supported in tooltips.
- The default stack order of marks like bars and areas is now aligned with the color domain.
- Interactive charts automatically change the cursor to pointer to indicate they can be interacted with.
- feat: auto hoist facet encodings in layer by @thomascamminady in #3965
- This allows layering of simple faceted charts that define the same facet variables, instead of requiring that layering happens before faceting.
- feat: Accept ZoneInfo(key='UTC') by @JackKelly in #3944
- feat: add pandas 3 compatibility and fix CI (drop Python 3.9, pin polars <1.38) by @mattijn in #3950
- feat: add ensure_ascii option to to_json() with default False by @RamiNoodle733 in #3952
Bug Fixes
- fix: unique view names per concat cell and correct param.views by @mattijn in #3974
- fix: Compute unique hashes for identical specs that use different data by @joelostblom in #3982
- fix: preserve polars datetime timezones during serialization by @kjgoodrick in #3922
- fix: type issues with Chart save methods. by @alec-bike in #3934
- fix: type issues with Chart mark methods. by @alec-bike in #3936
- fix: improve api.py typing by @alec-bike in #3955
- fix: typing issues for mypy 1.18 and above. by @alec-bike in #3966
Documentation
- docs: Highlight new examples in the gallery by @joelostblom in #3999
- It's now easier to find which examples have been recently added to the Altair gallery and the page looks more visually appealing overall.
- docs: add WASM / Pyodide installation instructions by @ArnavTomar18 in #3932
- docs: Correct some grammar issues by @star1327p in #3942
- docs: add identity line (x=y diagonal) example to rule mark docs by @stbiadmin in #3969
- docs: Correct tooltip field for faceted choropleth example by @Sparlitu in #3920
- docs: wrong tooltip variable id -> county_id by @thomascamminady in #3924
- docs: a HConcatChart -> an HConcatChart by @star1327p in #3917
- docs: Substitute field strings correctly so that points in theme display chart show up by @joelostblom in #3984
- docs: Change the lead size to fit on two rows by @joelostblom in #3980
- docs: Make the first page title fit on one row by @joelostblom in #3979
- docs: Fix broken density example by @joelostblom in #3985
- docs: Simplify inline expr syntax by @joelostblom in #3996
Other Changes
- build: Speed up doc build time for faster local development by @joelostblom in #3997
- build: Add watch option to automatically rebuild docs upon detected changes by @joelostblom in #3998
- build: Create docs CLI to facilitate different build combinations by @joelostblom in #4000
- chore: bump dev version to 6.1.0dev by @mattijn in #3913
- style: Make chained chart methods work with type checkers other than pyright by @hamdanal in #3933
- ci: bump actions/checkout from 5 to 6 in the github-actions group by @dependabot[bot] in #3928
- build(deps): bump urllib3 from 2.5.0 to 2.6.3 by @dependabot[bot] in #3939
- build(deps): bump virtualenv from 20.31.2 to 20.36.1 by @dependabot[bot] in #3940
- build(deps): bump cryptography from 45.0.5 to 46.0.5 by @dependabot[bot] in #3953
- build: update lock file by @mattijn in #3963
- chore(typing): Ignore
duckdbimports by @dangotbanned in #3971 - ci(uv): Remove
polars<1.38pin by @dangotbanned in #3973 - chore: Move pytest
addoptstotestpathsby @dangotbanned in #3972 - chore: bump
narwhals>=2.4.0by @dangotbanned in #3970 - build: unpin duckdb and geopandas for py3.14 by @mattijn in #3975
- chore: Simplify
ruffconfig, fix minor type issues by @alec-bike in #3967 - fix: update ruff target-version to py310 by @alec-bike in #3977
- build(deps): bump pygments from 2.19.2 to 2.20.0 by @dependabot[bot] in #3988
- build(deps): bump requests from 2.32.5 to 2.33.0 by @dependabot[bot] in #3986
- build(deps): bump cryptography from 46.0.5 to 46.0.6 by @dependabot[bot] in #3987
- build(deps): bump cryptography from 46.0.6 to 46.0.7 by @dependabot[bot] in #4003
- build(deps): bump tornado from 6.5.4 to 6.5.5 by @dependabot[bot] in #3978
- build(deps): bump uv from 0.10.4 to 0.11.6 by @dependabot[bot] in #4004
- ci: harden prerelease workflow by @mattijn in #4008
New Contributors
- @Sparlitu made their first contribution in #3920
- @kjgoodrick made their first contribution in #3922
- @hamdanal made their first contribution in #3933
- @ArnavTomar18 made their first contribution in #3932
- @alec-bike made their first contribution in #3934
- @JackKelly made their first contribution in #3944
- @RamiNoodle733 made their first contribution in #3952
- @stbiadmin made their first contribution in #3969
Full Changelog: v6.0.0...v6.1.0
Version 6.0.0
Release v6.0.0
The Vega-Altair team is pleased to announce the release of version 6.0.0. Firstly, we are grateful for the many returning contributors (@franzhaas, @dangotbanned, @dsmedia, @joelostblom, @tempdata73, @mattijn, @jonmmease, @eitanlees, @kurtmckee, @MarcoGorelli), and a special shoutout to all the new contributors (@JasonnnW3000, @edmundmiller, @jannisko, @stanmart, @star1327p, @baldwint, @daizutabi, @azjps, @joaopalmeiro, @bobot). You are all awesome!
In short what is included with the version 6 release of Altair.
- we now compile against Vega-Lite version 6 (to be specific, version 6.1.0) and provide support for Python 3.14.
- we have a new datasets module,
altair.datasets, lazily access to datasets from https://github.com/vega/vega-datasets. - we are now thread-safe, altair specifications should be stable after re-running.
- we improved docs and included new examples, eg. this faceted choropleth of habitat species across geographical counties https://altair-viz.github.io/gallery/maps_faceted_species.html.
- we improved the typing experiences.
- we migrated to
uvas part of the infrastructure modernization and now have automated weekly builds.
We test all changes thoroughly, but nevertheless, if you encounter any issue or like to start a discussion. Please feel free!
Full details are available in the complete changelog below.
Breaking
- feat: Bump
vega-lite>=6by @franzhaas in #3831
Enhancements
- feat: Show python types in
ValidationErrormessages by @dangotbanned in #3735 - feat: Update
vega-liteto5.21.0by @dangotbanned in #3761 - feat: Show
user_rowsinMaxRowsErrormessage by @dangotbanned in #3768 - feat: Allow numpy scalars in altair expressions by @stanmart in #3827
- feat: adds altair.datasets by @mattijn in #3848
- feat: preserve the empty property for the three operators (&, |, ~) by @mattijn in #3853
- feat: hashing of parameter and view names by @mattijn in #3851
- feat: Allow opening the editor without validating the spec by @joelostblom in #3869
- feat: require minimal vegafusion 2 and revert #3857 by @mattijn in #3885
- feat: add warning for deduplications by @mattijn in #3902
Bug Fixes
- fix(typing): Resolve LSP violation for
ChartType.databy @dangotbanned in #3740 - fix: Replace circular import in
schemapi.pyby @dangotbanned in #3751 - fix: Include
*(Datum|Value)inSchemaValidationErrorby @dangotbanned in #3750 - fix: Resolve multiple
sphinxwarnings by @dangotbanned in #3787 - fix(typing): overload in
eval_blockincorrectly showedTrueas the default forstrictby @MarcoGorelli in #3855 - fix: import TypedDict from typing from python 3.15 by @mattijn in #3877
- fix: update typing_extensions dependency for Python < 3.15 by @daizutabi in #3881
- fix: Make
.changedproperty optional inJupyterChart#3868 by @azjps in #3871 - fix(types): Change the height and width types of
alt.Chart()frominttofloatby @joaopalmeiro in #3888 - fix: Repair vega export by @bobot in #3889
Documentation
- docs: Update LICENSE, fix copyright license year by @JasonnnW3000 in #3726
- docs: Add altair-upset link by @edmundmiller in #3786
- docs(example): Adds Confidence Interval Ellipses by @dangotbanned in #3747
- docs: Resolve
geopandas.read_file(...)warnings by @dangotbanned in #3795 - docs: bump
pyscript==2025.2.2by @dangotbanned in #3797 - docs: fix broken links by @jannisko in #3802
- docs(example): Add Faceted map using Species Habitat dataset by @dsmedia in #3809
- docs: Add documentation for initial interval selection date ranges by @dsmedia in #3815
- docs: Update the waterfall_chart.py colors by @eitanlees in #3830
- docs: Clarify how
orderandonin the param section by @joelostblom in #3629 - docs: Improved docs on Transforms by @tempdata73 in #2655
- docs: More clearly illustrate parameter compositions by @joelostblom in #3628
- docs: new dataset source, from vega_dataset to altair.dataset by @mattijn in #3859
- docs: Correct some typos by @star1327p in #3904
- docs: improve docs how to return chart as html by @mattijn in #3849
- docs: Update the Lightning Viz link by @star1327p in #3839
- docs: Iris to penguins by @baldwint in #2231
- docs: docbuild warnings by @mattijn in #3850
- docs: Make the Code of Conduct link clickable by @star1327p in #3852
- docs: note within geoshape mark page to spatial data section by @mattijn in #3892
- docs: Remove whitespace after '*' so that text is rendered italic. by @thomascamminady in #3882
- docs: fix broken external reference URLs in examples by @dsmedia in #3898
Other Changes
- chore: Bump version to 5.6.0dev by @jonmmease in #3700
- ci: Temporal examples in
vegafusionby @dangotbanned in #3702 - refactor(ruff): Apply
TC006fixes by @dangotbanned in #3706 - chore: fix
ruff,mypywarnings by @dangotbanned in #3717 - ci: Switch from
hatch,piptouvin GitHub Actions by @dangotbanned in #3719 - ci(typing): Add bundled stubs to
pyright.ignoreby @dangotbanned in #3724 - ci: bump astral-sh/setup-uv from 4 to 5 in the github-actions group by @dependabot[bot] in #3727
- chore(ruff): Fix ruff warnings by @dangotbanned in #3736
- chore(typing): fix
mypy>=1.14.0warnings by @dangotbanned in #3739 - chore(ruff): Fix
UP006warnings during codegen by @dangotbanned in #3746 - refactor: Centralize
Vegaproject versioning by @dangotbanned in #3720 - ci: Unpin
pillow, allow>=10.0.0by @dangotbanned in #3764 - chore(ruff): Update to
0.9.0by @dangotbanned in #3766 - chore(ruff): Fix
0.9.2lints by @dangotbanned in #3771 - chore: Add
needs-triageto new bug reports by @dangotbanned in #3769 - test: Make
skip_requires_pyarrowcompatible w/pytest.paramby @dangotbanned in #3772 - build: Migrate from
hatchtouvby @dangotbanned in #3723 - ci(typing): Disable
mypy[annotation-unchecked]on examples by @dangotbanned in #3775 - ci(uv): Remove dynamic version from
uv.lockby @dangotbanned in #3776 - ci(uv): bump
mypy==1.15.0by @dangotbanned in #3790 - ci: bump
narwhals>=1.25.1by @dangotbanned in #3792 - ci(uv): bump
ruff==0.9.5by @dangotbanned in #3799 - ci: bump
narwhals>=1.26.0by @dangotbanned in #3800 - ci: bump
narwhals>=1.27.1by @dangotbanned in #3807 - chore: Remove deprecated
nw.from_native(..., strict=True)by @dangotbanned in #3811 - chore(typing): Follow-up fix
_from_array_likeby @dangotbanned in #3812 - ci(ruff): move
excludetoextend-excludeby @dangotbanned in #3813 - chore: Add numfocus sponsor link by @joelostblom in #3814
- chore: Use organization-wide FUNDING.yml by @joelostblom in #3816
- chore: Bump
vega-embed==7by @franzhaas in #3829 - chore: Run
typosandcodespellagainst the codebase by @kurtmckee in #3840 - ci: bump astral-sh/setup-uv from 5 to 6 in the github-actions group by @dependabot[bot] in #3834
- ci: fix outdated
ipython[kernel]dependency by @dangotbanned in #3861 - test: update test_datasets.py by @mattijn in #3857
- ci: add nightly builds system by @mattijn in #3858
- ci: fix mypy unused-ignore in tests by @m...
Version 5.5.0
Release 5.5.0
The Vega-Altair team is pleased to announce the release of version 5.5.0. This version introduces several exciting new features and enhancements including a revamped theme system, a new renderer optimized for screen readers, and numerous type system updates that improve auto-completion and make it easier to integrate Altair into larger typed programs.
This release adds Python 3.13 and removes Python 3.8 support. It also includes a variety of documentation improvements and a range of important bug fixes.
Thanks to our maintainers (@binste, @dangotbanned, @joelostblom, @mattijn, and @jonmmease), returning contributors (@MarcoGorelli, @daylinmorgan, and @dsmedia), and first time contributors (@jpn--, @davidgroves, and @apoorvkh) for these improvements.
What's Changed
Deprecation
alt.themes
This release deprecates the alt.themes ThemeRegistry object and replaces it with an improved theme API in the new alt.theme module.
See the updated Chart Themes documentation for more information.
Note
Usage of the legacy alt.themes registry will be supported until version 6, but will now display a warning on first use.
- Refactor
alt.themes->alt.themeby @dangotbanned in #3618 - Adds
@alt.theme.registerdecorator by @dangotbanned in #3526 - Adds
ThemeConfig(TypedDict) by @dangotbanned in #3536
Example of registering a custom theme
import altair as alt
import pandas as pd
data = pd.DataFrame({'x': [5, 3, 6, 7, 2],
'y': ['A', 'B', 'C', 'D', 'E']})
@alt.theme.register("my_little_theme", enable=True)
def custom_theme():
return alt.theme.ThemeConfig(
config={
"bar":{"color":"black"}
}
)
chart = alt.Chart(data).mark_bar().encode(
x='x',
y='y',
)
chart # enable default using `alt.theme.enable("default")`
Example of instant feedback while you define a theme config through Pylance in VSCode
Enhancements
Olli Renderer
This release integrates the Olli project to provide a chart renderer that augments chart visualizations with a keyboard-navigable structure accessible to screen readers.
- Add 'olli' renderer to generate accessible text structures for screen reader users by @binste in #3580
Example of olli renderer:
import altair as alt
from vega_datasets import data
alt.renderers.enable("olli")
cars = data.cars.url
chart = alt.Chart(cars).mark_bar().encode(
y='Cylinders:O',
x='mean_acc:Q'
).transform_aggregate(
mean_acc='mean(Acceleration)',
groupby=["Cylinders"]
)
chart
Expressions and Selections
Several improvements were made to Altair's expression and selection APIs:
- Generate
exprmethod signatures, docs by @dangotbanned in #3600 - Support
&,|,~on all...Predicateclasses by @dangotbanned in #3668 - Support
datetime.(date|datetime)inExpression(s) by @dangotbanned in #3654 - Support
datetime.(date|datetime)as aSchemaBaseparameter by @dangotbanned in #3653 - Add missing
floattoIntoExpressionalias by @dangotbanned in #3611
Example of combining predicates within .transform_filter
import altair as alt
from vega_datasets import data
source = data.population.url
chart = alt.Chart(source).mark_line().encode(
x="age:O",
y="sum(people):Q",
color="year:O"
).transform_filter(
~alt.FieldRangePredicate(field='year', range=[1900, 1960])
& (alt.datum.age <= 70)
)
chartExample of using Python datetime.date for value in alt.selection_interval()
import datetime
import altair as alt
from vega_datasets import data
source = data.unemployment_across_industries.url
dt_values = [datetime.date(2005, 1, 1), datetime.date(2009, 1, 1)]
brush = alt.selection_interval(
encodings=['x'],
value={"x": dt_values}
)
base = alt.Chart(source).mark_area(
color='goldenrod',
opacity=0.3
).encode(
x='yearmonth(date):T',
y='sum(count):Q',
)
background = base.add_params(brush)
selected = base.transform_filter(brush).mark_area(color='goldenrod')
background + selected
Multiple predicates and constraints in Chart.transform_filter
- Support
Chart.transform_filter(*predicates, **constraints)by @dangotbanned in #3664
Example of using keyword-argument constraints to simplify filter compositions:
import altair as alt
from vega_datasets import data
source = data.population.url
chart = alt.Chart(source).mark_area().encode(
x="age:O",
y="sum(people):Q",
color="year:O"
).transform_filter(year=2000, sex=1)
chart
Bug Fixes
- Resolve multiple
@utils.use_signatureissues by @dangotbanned in #3565 - Relax
dictannotations inchannels.pyby @dangotbanned in #3573 - Set charset=UTF-8 in HTML templates. by @davidgroves in #3604
- Replace unsafe
locals()manipulation inChart.encodeby @dangotbanned in #3637 - Revise generated annotation order by @dangotbanned in #3655
- Resolve
alt.bindingsignature/docstring issues by @dangotbanned in #3671 - Add missing
@skip_requires_pyarrow(requires_tzdata=True)by @dangotbanned in #3674 - Don't materialise Ibis table to PyArrow if using vegafusion data transformer by @MarcoGorelli in #3566
mypy1.12.0 errors by @dangotbanned in #3632- Resolve warnings in
test_api.pyby @dangotbanned in #3592
Documentation
Several new examples were added to the documentation
Example of using alt.when().then().otherwise()
import altair as alt
from vega_datasets import data
source = data.cars()
brush = alt.selection_interval()
chart = alt.Chart(source).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color=alt.when(brush).then("Origin").otherwise(alt.value("lightgray"))
).add_params(
brush
)
chart
Example of using luminance in an expression to dynamically colorize text
import altair as alt
from vega_datasets import data
source = data.barley()
base = alt.Chart(source).encode(
x=alt.X('sum(yield):Q').stack('zero'),
y=alt.Y('site:O').sort('-x'),
text=alt.Text('sum(yield):Q', format='.0f')
)
bars = base.mark_bar(
tooltip=alt.expr("luminance(scale('color', datum.sum_yield))")
).encode(
color='sum(yield):Q'
)
text = base.mark_text(
align='right',
dx=-3,
color=alt.expr("luminance(scale('color', datum.sum_yield)) > 0.5 ? 'black' : 'white'")
)
bars + text
- Unstack area to render cumulative chart correctly by @joelostblom in #3558
- Change remote nick to
originand capitalize version commit by @joelostblom in #3559 - Update releasing notes to reflect that main branch is now protected by @binste in #3562
- Split interactive docs section into subpages by @joelostblom in #3561
- Update docs to use correct init value for
selection_pointby @jpn-- in #3584 - Add example with overlapping bars in a grouped bar chart by @mattijn in #3612
- Bar chart with labels coloured by measured luminance by @mattijn in #3614
- Adds example Calculate Residuals by @dangotbanned in #3625
- Adds Vega-Altair Theme Test by @dangotbanned in #3630
- adds info with step size/independent scale by @daylinmorgan in #3644
- Fix "Layered chart with Dual-Axis" (Method syntax) by @dangotbanned in #3660
- Fix inaccurate
selection_intervalsignatur...
Version 5.4.1
What's Changed
Enhancements
- feat(typing): Generate
Literalaliases inchannelsoverload(s) by @dangotbanned in #3535 - feat(typing): Generate
Literal(s) using"const"by @dangotbanned in #3538
Bug Fixes
- fix: Raise informative error message if a non-existent column name is passed by @MarcoGorelli in #3533
- revert: Remove
sphinxversion constraint by @dangotbanned in #3541 - fix: Pass native dataframe to data transformers by @MarcoGorelli in #3550
- fix: Resolve
ThencopyTypeErrorby @dangotbanned in #3553
Documentation
Other Changes
- ci: bump
ruff>=0.6.0by @dangotbanned in #3539 - ci: Remove
m2rfrommypy.overridesby @dangotbanned in #3540 - refactor: Simplify
SchemaBase.copyby @dangotbanned in #3543 - fix(typing): Resolve misc type ignores in
schemapi.pyby @dangotbanned in #3545 - test: Rename test to more specific
chart_error_example__four_errors_hide_fourthby @dangotbanned in #3546 - test: Shorten
test_chart_validation_errorstest ids by @dangotbanned in #3551 - refactor: Replace an indirect
SchemaBaseimport by @dangotbanned in #3556 - test: Fix deprecation warning from
ipywidgetsby @dangotbanned in #3557
Full Changelog: v5.4.0...v5.4.1
Version 5.4.0
What's Changed
Enhancements
- Update Vega-Lite from version 5.17.0 to version 5.20.1; see Vega-Lite Release Notes. By @binste in #3479 and #3525
- Remove several dependencies to make the package more lightweight:
- feat: make pandas and NumPy optional dependencies, don't require PyArrow for plotting with Polars/Modin/cuDF by @MarcoGorelli in #3452
- Remove
toolzdependency by @dangotbanned in #3426
- feat: Improve the syntax for conditions with multiple predicates. See the documentation of
alt.whenfor examples by @dangotbanned in #3427 and #3492 - feat: Reimplement
alt.expras a class that is understood by IDEs by @dangotbanned in #3466 - feat: Support a wider range of iterables, i.e. many places in Altair now accept not only lists but
np.array,pd.Series,tuples, etc. by @dangotbanned in #3501 - feat: Adds 4 new
carbonthemes, provide autocomplete for themes by @dangotbanned in #3516 - perf: Fix issues with
Chart|LayerChart.encode, 1.32x speedup toinfer_encoding_typesby @dangotbanned in #3444
Various typing improvements:
- feat(typing): Adds public
altair.typingmodule by @dangotbanned in #3515 - feat(typing):
@deprecatedversioning, IDE highlighting by @dangotbanned in #3455 - feat: Adds
ChartTypetype and type guardis_chart_type. Change PurePath to Path type hints by @dangotbanned in #3420 - feat(typing): adds
Mapalias forMapping[str, Any]by @dangotbanned in #3458 - feat(typing): Ban
typing.Optionalimport usingruffby @dangotbanned in #3460 - feat(typing): Further simplify generated
Literalaliases by @dangotbanned in #3469 - feat(typing): Fully annotate
api.pyby @dangotbanned in #3508
Bug Fixes
- fix(typing): Resolve
mypy==1.11.0issues inplugin_registryby @dangotbanned in #3487 - fix: solve mypy errors which are due to same object names in core.py and channels.py by @binste in #3414
- fix: remove remapped
ruffrulePLR1701by @dangotbanned in #3453 - fix(docs):
@utils.use_signatureformatting by @dangotbanned in #3450 - fix(typing): Ignore
[arg-type]error in_deduplicate_enum_errorsby @dangotbanned in #3475 - fix: Restrict static & runtime top-level imports by @dangotbanned in #3482
- fix: Avoid
sphinxerror "Code Execution failed:NameError: name 'format_locale' is not defined" by @dangotbanned in #3503 - fix: replace deprecated
sphinxdefault by @dangotbanned in #3512 - fix(ruff): Bump
ruff, fixRUF031by @dangotbanned in #3529
Documentation
- docs: Versioning policy by @dangotbanned in #3488
- docs: Add example of reordering stacked bars by @joelostblom in #3395
- docs: Add example of how to create polar bar charts by @joelostblom in #3428
- docs: Add example of cumulative line chart with facet by @dsmedia in #3440
- docs: Add example with hover path and search box by @dsmedia in #3459
- docs: Add example for Bar Chart with Highlighting on Hover and Selection on Click by @dangotbanned in #3485
- docs: Link to
Vega Theme Testin user guide by @dangotbanned in #3528 - docs: Fix and improve
alt.Optionaldoc by @dangotbanned in #3449 - docs: Fix camel case of fillOpacity channel by @timtroendle in #3465
- docs: Fix
CONTRIBUTING.mdphrasing by @dangotbanned in #3477 - docs: Reduce number of items in header to 4 by @binste in #3401
- docs: Link to project board for roadmap by @joelostblom in #3404
- docs: Use raw strings with escape sequences by @joelostblom in #3411
- docs: Update
hatchguidance by @dangotbanned in #3461 - docs: Add
emptyas a explicitconditionkwarg by @dangotbanned in #3490 - docs: Undoc deprecated functionality by @dangotbanned in #3509
- docs: Remove reference to
altair_saverinsaveby @dangotbanned in #3510 - docs: Update link to Altair Ally by @sebp in #3517
Maintenance
- chore: Remove CoC link in templates since it's displayed by default by @joelostblom in #3390
- chore: Update org name from altair-viz to vega by @binste in #3400
- build: pin upperlimit geopandas by @mattijn in #3421
- ci: remove again geopandas pin and disable flaky test by @binste in #3422
- ci: Remove references to archived altair_viewer and altair_saver in ci, docs, and tests. Uninstall anywidget and vl-convert-python during one test run by @binste in #3419
- ci: prepare for
numpy 2by @dangotbanned in #3438 - ci: Add a Dependabot config to auto-update GitHub action versions by @kurtmckee in #3437
- ci: Update dependabot.yaml to include prefix by @mattijn in #3442
- ci: Bump the github-actions group with 2 updates by @dependabot in #3439
- chore: avoid pandas warning for
freq='H'in test_utils.py by @MarcoGorelli in #3446 - refactor: Add
ruffrules, improve type annotations, improve ci performance by @dangotbanned in #3431 - style: Remove outdated comments about the use of the former _Parameter protocol by @binste in #3448
- chore: fixup ruff-mypy CI job due to Ruff change by @MarcoGorelli in #3463
- refactor(typing): Reuse generated
Literalaliases inapiby @dangotbanned in #3464 - ci: remove
toolzfrom[[tool.mypy.overrides]]by @dangotbanned in #3474 - refactor: Simplify
SchemaBaserepr by @dangotbanned in #3472 - refactor: remove dead
_get_channels_mappingcode by @dangotbanned in #3467 - ci: bump
ruff>=0.5.3forPLW1514fix by @dangotbanned in #3484 - test: skip
ibistest on unsupportedpythonversion by @dangotbanned in #3486 - refactor(typing): reduce type ignores in
api.pyby @dangotbanned in #3480 - fix: remove unsupported
sphinxtheme option'footer_items'by @dangotbanned in #3489 - refactor: Rename and move
is_undefined,OneOrSeqby @dangotbanned in #3491 - refactor(docs, ruff): Add
pydocstylerules by @dangotbanned in #3493 - ci: include optional dependencies for Polars backend in ibis-framework install by @MarcoGorelli in #3494
- ci: Add
python-version=="3.9"to github action by @dangotbanned in #3498 - ci(ruff): Remove stale
docstring-code-formatcomment by @dangotbanned in #3496 - ci: relax
numpy<=2.0.0constraint by @dangotbanned in #3504 - refactor: replace archived
m2rwith updatedmistuneby @dangotbanned in #3506 - build: Add
ipykerneloptional dependency todevgroup by @dangotbanned in #3507 - refactor(ruff): Organize imports w/ (
I001,TID252) rules by @dangotbanned in #3513 - ci: Bump
sphinx,vl-convert-pythonby @dangotbanned in #3527 - chore: Remove filterwarnings from tests for cross-version pandas compatibility by @MarcoGorelli in #3522
- ci(ruff): Enforce the default
C901complexity by @dangotbanned in #3531 - refactor: Simplify unreachable compound chart cases by @dangotbanned in #3520
- feat: Adds
vega-themes.jsonusingvl_convertby @dangotbanned in #3523
New Contributors
- @dangotbanned made their first contribution in #3420
- @kurtmckee made their first contribution in #3437
- @dependabot made their first co...
Version 5.3.0
The Vega Project is happy to announce the release of version 5.3.0 of the Vega-Altair Python visualization library. This release has been 4 months in the making and includes enhancements, fixes, and documentation improvements from 11 contributors.
What's Changed
- Update Vega-Lite from version 5.16.3 to version 5.17.0; see Vega-Lite Release Notes
Enhancements
-
Add integration of VegaFusion and JupyterChart to enable scaling many interactive Vega-Altair charts to millions of rows. See VegaFusion Data Transformer for more information. Here is an example of histogram cross filtering with a 1 million row dataset.
vegafusion_widget.mov
-
Add
"browser"renderer to support displaying Vega-Altair charts in an external web browser. See Browser Renderer for more information (#3379).browser_renderer.mov
-
Support opening charts in the Vega editor with
chart.open_editor()(#3358)open_editor.mov
- Add
"jupyter"renderer which uses JupyterChart for rendering (#3283). See Displaying Altair Charts for more information. - Add
embed_optionsargument to JupyterChart to allow customization of Vega Embed options (#3304) - Add offline support for JupyterChart and the new
"jupyter"renderer. See JupyterChart - Offline Usage for more information. - Add a new section to documentation on dashboards which have support for Altair (#3299)
- Support restrictive FIPS-compliant environment (#3291)
- Simplify type-hints to improve the readability of the function signature and docstring (#3307)
- Support installation of all optional dependencies via
python -m pip install altair[all]andconda install altair-all -c conda-forge(#3354) - Add privacy friendly web-analytics for the documentation (#3350)
- Additional gallery examples and documentation clarifications (#3233, #3266, #3276, #3282, #3298, #3299, #3323, #3334, #3324, #3340, #3350, #3353, #3357, #3362, #3363), including the following:
-
altair-ex-2024-03-12_10.16.49.mp4
Bug Fixes
- Fix error when
embed_optionsareNone(#3376) - Fix type hints for libraries such as Polars where Altair uses the dataframe interchange protocol (#3297)
- Fix anywidget deprecation warning (#3364)
- Fix handling of Date32 columns in arrow tables and Polars DataFrames (#3377)
Backward-Incompatible Changes
- Changed hash function from
md5to a truncatedsha256non-cryptograhic hash (#3291) - Updated
chart.show()method to invoke the active renderer rather than depend onaltair_saver(Which was never updated for use with Altair 5) (#3379).
New Contributors
- @franzhaas made their first contribution in #3278
- @ccravens made their first contribution in #3291
- @thomascamminady made their first contribution in #3323
- @d-trigo made their first contribution in #3350
- @RobinL made their first contribution in #3383
Release notes by pull requests
Click to view all 44 PRs merged in this release
- perf: Improve performance of
Chart.from_dictby @RobinL in #3383 - feature: Add browser renderer to open charts in external browser and update chart.show() to display chart by @jonmmease in #3379
- fix: Don't error when embed_options are None by @jonmmease in #3376
- fix: Handle Date32 columns in Arrow tables and Polars DataFrames by @jonmmease in #3377
- fix: Support falling back to pandas when pyarrow is installed but too old by @jonmmease in #3387
- docs: Remove release notes and fully capture them in GitHub Releases by @binste in #3380
- Update save.py to use utf-8 instead of None per default by @franzhaas in #3278
- Consolidate governance documents in Vega Organization by @domoritz in #3277
- doc: histogram with gradient color by @mattijn in #3282
- Update for FIPS Compliance by @ccravens in #3291
- Docs: Fix link to project governance docs by @binste in #3298
- Fix type checker errors for libraries such as Polars where Altair uses dataframe interchange protocol by @binste in #3297
- Integrate VegaFusion into JupyterChart by @jonmmease in #3281
- Add "jupyter" renderer based on JupyterChart by @jonmmease in #3283
- Docs: Add section on displaying Altair charts in dashboards by @binste in #3299
- Validate version of vegafusion-python-embed by @jonmmease in #3303
- Add embed_options to JupyterChart and pass them through in "jupyter" renderer by @jonmmease in #3304
- Add offline support to JupyterChart and "jupyter" renderer by @jonmmease in #3305
- Type hints: Simplify to improve user experiences by @binste in #3307
- Adding missing interpolation methods to Line example by @thomascamminady in #3323
- Docs: Link to new section on Altair in Plotly docs by @binste in #3324
- Docs: Mark completed items in roadmap by @binste in #3326
- Docs: Mention Marimo in Dashboards section by @binste in #3334
- Relax type hint for 'indent' in to_json method by @binste in #3342
- MAINT: Reformat codebase with new style of ruff 0.3.0 by @binste in #3345
- Docs: Add another version of the 'Multiline Tooltip' exmaple which uses the standard tooltip by @binste in #3340
- Docs: Add privacy-friendly web analytics with plausible by @binste in #3346
- Docs: Modifying scale of "multiple interactions" example and adding legend adjustments by @d-trigo in #3350
- Add example of how to update titles based on a selection parameters by @joelostblom in #3353
- Add
alldependency group by @jonmmease in #3354 - Add timeseries filtering example to illustrate subsetting of columns from selector values by @joelostblom in #3357
- Fix anywidget deprecation warning by @jonmmease in #3364
- Clarifications to the interactive docs by @joelostblom in #3362
- Open charts in the default browser with
open_editormethod by @joelostblom in #3358 - Change "mouse" to "pointer" everywhere by @joelostblom in #3363
- doc: update numpy-tooltip-images.rst by @mattijn in #3233
- Change a couple of more additional occurences of pointer over by @joelostblom in #3368
- [Doc] Fix Chart and MarkDef language by @ChiaLingWeng in #3266
- Add remaining changelog entries for 5.3 by @joelostblom in #3369
- Upgrade to Vega-Lite 5.17.0 by @binste in #3367
- Add a few 5.3 changelog entries by @jonmmease in #3372
- Add note about conda "all" installation and how to install without optional dependencies by @joelostblom in #3373
- Update README badges to reflect updated tool chain by @mattijn in #3374
- chore: Add templates for PRs and automated release notes by @joelostblom in https://github.com/altair-vi...


