如何在 altair 中添加不同比例的新轴(与 y 轴平行)

how add a new axis with differenct scale (parallel with y axis) in altair

base = alt.Chart(df).encode(alt.X('monthdate(date):O'))
line = base.mark_line(color='red').encode(y = 'something:Q')
bar = base.mark_bar().encode(y = 'otherthing:Q')
(line+bar)

我试图在每个日期绘制两个变量,问题是 "something" 和 "otherthing" 的比例不同(一个变化 1-100,另一个变化 1-2000000000)所以我可以'在图表中看到其中一个的变化(其中一个变成了一条平滑的线) 我能做什么?

与 y 轴平行的第三轴和其他刻度是一个很好的解决方案我该怎么做?

使用

(line + bar).resolve_scale(y='independent')

更多信息请见Altair: Scale and Guide Resolution