I want to use 'tooltip' to show information depending on the type of point in the plot. I noticed that 'tooltip' accepts 'condition'. Therefore, I'm trying to use 'tooltip' together with 'alt.condition', but without success. Below is my attempt: import altair as alt from vega_datasets import data source = data.cars() chart = alt.Chart(source).mark_circle(size=60).encode( x='Horsepower', y='Miles_per_Gallon', color='Origin', tooltip=alt.condition( alt.datum.Origin == 'EUA', ['Name', 'Horsepower'], ['Name', 'Miles_per_Gallon'] ) ) chart.save('tooltip.html') Is there any solution for this? Continue reading...