0

So I have a simple line XY Graph with integer values on the Y axis and dates on the X axis. What I would be like to be able to do is do a horizontal two-finger pinch and adjust the range dynamically. Eg, pinching in would give you a bigger range (mental model being that you're setting the start and end date shown to be further apart) and then pinching out would give you smaller time window.

Is there some stuff built in for this already? Reasonably new to CorePlot and the default finger stuff just zooms the graph itself, none of the values.

Would I need to put a gesture recgoniser on it? or does coreplot have stuff build into it for this?

Cheers

Sam Jarman
  • 7,277
  • 15
  • 55
  • 100

1 Answers1

1

This is how the built-in zoom features work. Use a plot space delegate to monitor changes to the plot space while zooming and make changes to the axis appearance as needed based on the changes. See my answer to your other question for more info.

Community
  • 1
  • 1
Eric Skroch
  • 27,381
  • 3
  • 29
  • 36
  • the interactionScale variable passed from the plotSpace:shouldScaleBy:interactionPoint doesnt seem to ever get below 0.97. That seems odd. I suspect its because the underlying guester is being reset after each pinch? – Sam Jarman Dec 02 '13 at 03:05
  • Yes. The scale factor is applied to the current value of the plot range, not where it started. – Eric Skroch Dec 02 '13 at 12:09