我有一个时间序列的成本值,我想获得一系列选定日期的成本总和。间隔选择工作正常,但如何访问所选日期?
brush = alt.selection(type='interval', encodings=['x'])
chart = alt.Chart(forecast).mark_bar().encode(
x='dates:T',
y='costs:Q',
color='type:N',
).add_selection(
brush
)
Run Code Online (Sandbox Code Playgroud)