sChartDidFinishPanning Deprecated


#1

Hello,

I am in the process of updating one of my apps. I was using the delegates sChartIsPanning combined with sChartDidFinishPanning to detect if the chart is bouncing back after being panned outside its min/max range.

Both of those methods are marked deprecated now and replaced with didAlterRangeOnAxis.

How can I detect if the chart is bouncing back after being panned outside its min/max range using only the new delegate?

Thank you.


#2

Hi @cbolton,

In your sChart:didAlterRangeOnAxis: method you could compare the current axis range with the min/max range to determine whether the range is outside the min/max. If you need to know the pan direction (e.g. to determine whether the user is panning or the chart is bouncing back) you could store the previous range in a variable and compare the current and previous ranges.

You may also find the sChart:didFinishAnimatingAxis: method useful as it is called at the end of a bounce-back.

Please let us know if you need any further help.

Kind regards,

Alison


#3

Thank you. That combo of delegate methods made it an easy fix.