I have a dashboard, in which you can select several datasets using a widget. I am using the Altair library in Python to make classical line graphs from these datasets with both x-and y-axis starting at zero. The displayed data are normalized data, meaning all datasets start at the y-value=1 by definition. As the datasets represent different parameters the y-axis changes dynamically from dataset to dataset. The graph is coded roughly like the following:
chart = alt.Chart(df_datapoints).mark_line().encode(
x=alt.X('X-Value',axis=alt.Axis(title='X-Values', tickCount=10)),
y=alt.Y('Y-Value', axis=alt.Axis(title='Normalized to Baseline')),
color=alt.Color('Test ID', legend=None)
)
The graph looks then like this:
Now I would like to have the x-axis starting at y-value=1 to better see which values increase or decrease from the starting point. Is there a possibility to shift the starting point of the x-axis in this simple line graph from from zero to 1? I haven't found anything in the Altair Documentation. Or would it be possible to add a strong line at Y=1 to see the normalized baseline?

