Когда я строю многоуровневую диаграмму, состоящую из двух групп линий, всплывающие подсказки в одном слое не отображаются. Это также происходит в редакторе VL. Любое понимание того, почему это происходит, будет высоко оценено.
Вот воспроизводимый пример, демонстрирующий проблему (на самом деле у меня больше строк в первом слое):
Альтаир версия 4.0.0
df=pd.DataFrame({'school_code': ['AQUI', 'Board'] * 5, 'y4_rate': [.1, .2, .3, .4, .5, .1, .2, .3, .4, .5],
'cohort_year': ['1', '1', '2', '2','3', '3', '4', '4', '5', '5']})
sch=alt.Chart(df).mark_line(point=True).encode(
x=alt.X('cohort_year', axis=alt.Axis(labels=False)),
y=alt.Y('y4_rate', axis=alt.Axis(format='.0%'), title='Percentage of Students'),
color=alt.Color('school_code', title=None, legend=alt.Legend(labelFontSize=15, titleFontSize=20)),
tooltip=[alt.Tooltip('y4_rate', title='percentage of students', format='.0%')]
).transform_filter(alt.datum.school_code != 'Board')
brd=alt.Chart(df).mark_line(point=True).encode(
x=alt.X('cohort_year', axis=alt.Axis(labels=False)),
y=alt.Y('y4_rate', axis=alt.Axis(format='.0%'), title='Percentage of Students'),
color=alt.Color('school_code', title=None, legend=alt.Legend(labelFontSize=15, titleFontSize=20),scale=alt.Scale(range=['black'])),
tooltip=[alt.Tooltip('y4_rate', title='percentage of students', format='.0%')]
).transform_filter(alt.datum.school_code == 'Board')
alt.layer(sch, brd).resolve_scale(color='independent').properties(width=700, height=400).interactive()