I have a plotly.net graph with a lot of different shapes.
The X axis is a timeline and I would like to limit the display to a specific range of dates.
I could filter / clamp the data in each shape, etc but that seems like a lot of work compared to setting the display's range to specific values.
I can't find this in the plotly.net docs; does anyone know where that would be?
You do not specify if the range of dates should be continuous, so i'll just assume it.
You can simply use the
MinMax
argument of thewithXAxisStyle
function like this:As you can see, the dates range from 2025 untill 2026. although the original data goes until 2033.