Range Slider on Time Series: change mode (add markers) when range changes (when zoomed in)

When configuring a line chart with a range slider and time series on the x-axis (as in Range Slider and Selector | JavaScript | Plotly), is it possible to add markers to the chart only when zoomed in to a maximum time frame? For example, when looking at an x-axis range of more than a week, the mode of the chart should be ‘lines’ but when zoomed in such that the x-axis’s range spans 7 days or less, the mode should be ‘lines+marker’.

I’m not certain the best language to ask the question, but I’m seeking a way to find a “hook” into the chart’s x-axis range. Since I’ve not defined the range (it’s managed instead via the range slider), how do I get my javascript to say “if the range changes, do X [X in this case being to change the trace’s mode and update the chart”.

Thanks in advance!