You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpandasaspdimportaltairasaltimportvegafusionasvfvf.enable_widget()
flights=pd.read_parquet(
"https://vegafusion-datasets.s3.amazonaws.com/vega/flights_1m.parquet"
)
brush=alt.selection(type='interval', encodings=['x'])
# Define the base chart, with the common parts of the# background and highlightsbase=alt.Chart().mark_bar().encode(
x=alt.X(alt.repeat('column'), type='quantitative', bin=alt.Bin(maxbins=20)),
y='count()'
).properties(
width=160,
height=130
)
# gray background with selectionbackground=base.encode(
color=alt.value('#ddd')
).add_selection(brush)
# blue highlights on the selected datahighlight=base.transform_filter(brush)
# layer the two charts & repeatchart=alt.layer(
background,
highlight,
data=flights
).transform_calculate(
"time",
"hours(datum.date)"
).repeat(column=["distance", "delay", "time"])
chart
With Altair 4.2, a selection on the distance histogram results in the following
But with Altair 5.0.0rc1, the background histograms for the distance and delay subplots disappears:
I haven't dug in yet to diagnose where the breakdown is.
The text was updated successfully, but these errors were encountered:
Consider the following example:
With Altair 4.2, a selection on the distance histogram results in the following
But with Altair 5.0.0rc1, the background histograms for the distance and delay subplots disappears:
I haven't dug in yet to diagnose where the breakdown is.
The text was updated successfully, but these errors were encountered: