Prevents the range selector from going out of the charts bounds

We've added a new method which accepts an SChartRange and then returns
a new version which has been fixed to ensure that it lies within the
boundaries of the chart. This optionally fixes the span of the selector.

This method is then called once a new range has been calculated.