Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ points = alt.Chart(source).mark_point().encode(
x='Horsepower',
y='Miles_per_Gallon',
color=alt.condition(brush, 'Origin', alt.value('lightgray'))
).add_parameter(
).add_params(
brush
)

Expand Down
2 changes: 1 addition & 1 deletion altair/examples/airport_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
from_=lookup_data
).transform_filter(
(alt.datum.state != "PR") & (alt.datum.state != "VI")
).add_parameter(
).add_params(
select_city
)

Expand Down
2 changes: 1 addition & 1 deletion altair/examples/dot_dash_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Configure the options common to all layers
brush = alt.selection(type='interval')
base = alt.Chart(source).add_parameter(brush)
base = alt.Chart(source).add_params(brush)

# Configure the points
points = base.mark_point().encode(
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/histogram_responsive.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
),
base.encode(
alt.X('time:Q', bin=alt.Bin(maxbins=30)),
).add_parameter(brush)
).add_params(brush)
)
2 changes: 1 addition & 1 deletion altair/examples/interactive_brush.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
x='Horsepower:Q',
y='Miles_per_Gallon:Q',
color=alt.condition(brush, 'Cylinders:O', alt.value('grey')),
).add_parameter(brush)
).add_params(brush)
2 changes: 1 addition & 1 deletion altair/examples/interactive_cross_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
).properties(
width=550,
height=200
).add_parameter(pts)
).add_params(pts)

alt.vconcat(
rect + circ,
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/interactive_layered_crossfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# gray background with selection
background = base.encode(
color=alt.value('#ddd')
).add_parameter(brush)
).add_params(brush)

# blue highlights on the transformed data
highlight = base.transform_filter(brush)
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/interactive_legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
alt.Y('sum(count):Q', stack='center', axis=None),
alt.Color('series:N', scale=alt.Scale(scheme='category20b')),
opacity=alt.condition(selection, alt.value(1), alt.value(0.2))
).add_parameter(
).add_params(
selection
)
2 changes: 1 addition & 1 deletion altair/examples/interval_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@

lower = base.properties(
height=60
).add_parameter(brush)
).add_params(brush)

upper & lower
2 changes: 1 addition & 1 deletion altair/examples/multiline_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

points = base.mark_circle().encode(
opacity=alt.value(0)
).add_parameter(
).add_params(
highlight
).properties(
width=600
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/multiline_tooltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
selectors = alt.Chart(source).mark_point().encode(
x='x:Q',
opacity=alt.value(0),
).add_parameter(
).add_params(
nearest
)

Expand Down
8 changes: 4 additions & 4 deletions altair/examples/multiple_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
slider_selection = alt.selection_point(bind=year_slider, fields=['Release_Year'], name="Release Year_")


filter_year = base.add_parameter(
filter_year = base.add_params(
slider_selection
).transform_filter(
slider_selection
Expand All @@ -52,7 +52,7 @@
genre_dropdown = alt.binding_select(options=genres)
genre_select = alt.selection_point(fields=['Major_Genre'], bind=genre_dropdown, name="Genre")

filter_genres = base.add_parameter(
filter_genres = base.add_params(
genre_select
).transform_filter(
genre_select
Expand All @@ -66,7 +66,7 @@
alt.Color('MPAA_Rating:N', legend=None),
alt.value('lightgray'))

highlight_ratings = base.add_parameter(
highlight_ratings = base.add_params(
rating_select
).encode(
color=rating_color_condition
Expand All @@ -81,7 +81,7 @@
alt.Size('Hundred_Million_Production:Q')
)

budget_sizing = base.add_parameter(
budget_sizing = base.add_params(
checkbox_selection
).encode(
size=size_checkbox_condition
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/scatter_linked_brush.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
base = alt.Chart(source).mark_point().encode(
y='Miles_per_Gallon',
color=alt.condition(brush, 'Origin', alt.ColorValue('gray')),
).add_parameter(
).add_params(
brush
).properties(
width=250,
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/scatter_linked_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
x='Horsepower:Q',
y='Miles_per_Gallon:Q',
color=alt.condition(brush, 'Cylinders:O', alt.value('grey'))
).add_parameter(brush)
).add_params(brush)

# Base chart for data tables
ranked_text = alt.Chart(source).mark_text().encode(
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/scatter_with_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
).properties(
width=300,
height=300
).add_parameter(pts)
).add_params(pts)

# build the chart:
alt.hconcat(
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/scatter_with_layered_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
base = alt.Chart(source).properties(
width=250,
height=250
).add_parameter(selector)
).add_params(selector)

points = base.mark_point(filled=True, size=200).encode(
x=alt.X('mean(height):Q', scale=alt.Scale(domain=[0,84])),
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/scatter_with_minimap.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
minimap = (
alt.Chart(source)
.mark_point()
.add_parameter(zoom)
.add_params(zoom)
.encode(
x="date:T",
y="temp_max:Q",
Expand Down
4 changes: 2 additions & 2 deletions altair/examples/seattle_weather_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
).properties(
width=550,
height=300
).add_parameter(
).add_params(
brush
).transform_filter(
click
Expand All @@ -48,7 +48,7 @@
brush
).properties(
width=550,
).add_parameter(
).add_params(
click
)

Expand Down
2 changes: 1 addition & 1 deletion altair/examples/select_detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
base = alt.Chart(data).properties(
width=250,
height=250
).add_parameter(selector)
).add_params(selector)

points = base.mark_point(filled=True, size=200).encode(
x='mean(x)',
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/select_mark_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
)

brush = alt.selection_interval(encodings=['x'])
background = base.add_parameter(brush)
background = base.add_params(brush)
selected = base.transform_filter(brush).mark_area(color='goldenrod')

background + selected
2 changes: 1 addition & 1 deletion altair/examples/selection_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
x='Horsepower:Q',
y='Miles_per_Gallon:Q',
color=alt.condition(brush, 'Origin:N', alt.value('lightgray'))
).add_parameter(
).add_params(
brush
)

Expand Down
2 changes: 1 addition & 1 deletion altair/examples/selection_layer_bar_month.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
x='month(date):O',
y='mean(precipitation):Q',
opacity=alt.condition(brush, alt.OpacityValue(1), alt.OpacityValue(0.7)),
).add_parameter(
).add_params(
brush
)

Expand Down
4 changes: 2 additions & 2 deletions altair/examples/slider_cutoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
})

slider = alt.binding_range(min=0, max=100, step=1)
cutoff = alt.parameter(bind=slider, value=50)
cutoff = alt.param(bind=slider, value=50)

alt.Chart(df).mark_point().encode(
x='xval',
Expand All @@ -25,6 +25,6 @@
alt.datum.xval < cutoff,
alt.value('red'), alt.value('blue')
)
).add_parameter(
).add_params(
cutoff
)
2 changes: 1 addition & 1 deletion altair/examples/us_population_over_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
).properties(
width=20,
title="U.S. Population by Age and Sex"
).add_parameter(
).add_params(
select_year
).transform_calculate(
"sex", alt.expr.if_(alt.datum.sex == 1, "Male", "Female")
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/us_population_pyramid_over_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
select_year = alt.selection_point(name='year', fields=['year'],
bind=slider, value={'year': 2000})

base = alt.Chart(source).add_parameter(
base = alt.Chart(source).add_params(
select_year
).transform_filter(
select_year
Expand Down
2 changes: 1 addition & 1 deletion altair/examples/us_state_capitals.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
points = base.mark_point().encode(
color=alt.value('black'),
size=alt.condition(~hover, alt.value(30), alt.value(100))
).add_parameter(hover)
).add_params(hover)

background + points + text
Loading