Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support Chart.transform_filter(*predicates, **constraints) #3664

Merged
merged 28 commits into from
Nov 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5bdb33d
chore(typing): Add temporary alias for `filter`
dangotbanned Oct 30, 2024
2efd5f8
refactor: Make `empty` a regular keyword arg
dangotbanned Oct 30, 2024
d2868f8
refactor: Remove `**kwargs`
dangotbanned Oct 30, 2024
841e887
docs: Add note on `Predicate`
dangotbanned Oct 30, 2024
63de259
feat(DRAFT): Adds `_transform_filter_impl`
dangotbanned Oct 30, 2024
40146f7
Merge remote-tracking branch 'upstream/main' into transform-filter-pr…
dangotbanned Oct 30, 2024
c22ba58
feat: Adds `transform_filter` implementation
dangotbanned Oct 30, 2024
fc672bc
fix(DRAFT): Add temp ignore for `line_chart_with_cumsum_faceted`
dangotbanned Oct 30, 2024
8554a46
feat(typing): Widen `_FieldEqualType` to include `IntoExpression`
dangotbanned Oct 30, 2024
ff9d33f
fix: Try replacing `Undefined` first
dangotbanned Oct 31, 2024
b497039
test: Add `(*predicates, **constraints)` syntax tests
dangotbanned Oct 31, 2024
54d0cbc
Merge branch 'main' into transform-filter-predicates
dangotbanned Nov 2, 2024
a375ab5
Merge remote-tracking branch 'upstream/main' into transform-filter-pr…
dangotbanned Nov 3, 2024
7f6c188
docs: Use `*predicates` in "Faceted Line Chart with Cumulative Sum"
dangotbanned Nov 3, 2024
0d4ff86
Merge remote-tracking branch 'upstream/main' into transform-filter-pr…
dangotbanned Nov 4, 2024
be63d4e
refactor: Remove `_OrigFilterType`
dangotbanned Nov 4, 2024
7a0cc42
docs: Update `.transform_filter()` docstring
dangotbanned Nov 4, 2024
08a4207
docs: Minor corrections in examples
dangotbanned Nov 4, 2024
5fd4f5a
refactor(typing): Cast deprecated `filter` in one location
dangotbanned Nov 4, 2024
d640933
refactor: Remove `pred` assignment
dangotbanned Nov 4, 2024
2d57d6e
docs(typing): Update `_FieldEqualType`
dangotbanned Nov 4, 2024
01571dd
Merge branch 'main' into transform-filter-predicates
dangotbanned Nov 4, 2024
10f1d1d
Merge branch 'main' into transform-filter-predicates
dangotbanned Nov 5, 2024
860e6af
Merge branch 'main' into transform-filter-predicates
dangotbanned Nov 6, 2024
07c1f0f
Merge branch 'main' into transform-filter-predicates
dangotbanned Nov 11, 2024
e3ced3e
Merge branch 'main' into transform-filter-predicates
dangotbanned Nov 12, 2024
64dc7fd
Merge remote-tracking branch 'upstream/main' into transform-filter-pr…
dangotbanned Nov 13, 2024
3efc144
docs: Adapt examples for user guide
dangotbanned Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Minor corrections in examples
dangotbanned committed Nov 4, 2024
commit 08a4207eb5c8bea2632cef648acb75a535e1062d
4 changes: 2 additions & 2 deletions altair/vegalite/v5/api.py
Original file line number Diff line number Diff line change
@@ -3058,12 +3058,12 @@ def transform_filter(

chart.transform_filter(datum.year <= 1980)

We can also use parameter selections directly::
We can also use selection parameters directly::

selection = alt.selection_point(encodings=["color"], bind="legend")
chart.transform_filter(selection).add_params(selection)

Or using field predicates::
Or a field predicate::

between_1950_60 = alt.FieldRangePredicate(field="year", range=[1950, 1960])
chart.transform_filter(between_1950_60) | chart.transform_filter(~between_1950_60)