小编Nat*_*ate的帖子

在 Altair 中获取总和

我有一个时间序列的成本值,我想获得一系列选定日期的成本总和。间隔选择工作正常,但如何访问所选日期?

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)

在此处输入图片说明

python altair

2
推荐指数
1
解决办法
636
查看次数

标签 统计

altair ×1

python ×1