How to highlight a bar by datetime value with Altair
问题 Similar to : https://altair-viz.github.io/gallery/bar_chart_with_highlighted_bar.html, is it possible to highlight a bar based on a specific date time value? I can't quite seem to make it work. import pandas as pd import altair as alt import datetime df = pd.DataFrame( { "year": [2019, 2019, 2019], "month": [1, 3, 7], "day": [1, 1, 1], "value": [5, 7, 9], } ) df["Mth"] = pd.to_datetime(dict(year=df["year"], month=df["month"], day=df["day"])) df.drop( ["year", "month", "day"], axis=1, inplace