I think it would also help the problem if you could set the viewportMaximum to greater than the last point on the chart.
I understand that you don’t want the user to zoom to an area without data points, but I think it makes more sense for the logic to be
viewportMinimum < last_plotted_point
rather than
viewportMaximum > last_plotted_point
Then, on zoom reset, I could set the viewportMaximum to (last_plotted_point + padding)
selecting this chart area would be trivial.