How change position of anotation according to zoom?


#1

Good Morning,

I am unable to reset value of anotation on zoom in event. So please let me know how can I set postion of anotation according to zoom?

So that user can easily see anotation on each zoom in event.

Thanks

Ram


#2

Hi Ram,

In ShinobiCharts for iOS the delegate has methods which are notified as the user interacts with the chart. In your case you’ll be interested in the following:

- (void)sChartDidStartZooming:(ShinobiChart *)chart
- (void)sChartIsZooming:(ShinobiChart *)chart
- (void)sChartIsZooming:(ShinobiChart *)chart withChartMovementInformation:(const SChartMovementInformation *)information
- (void)sChartDidFinishZooming:(ShinobiChart *)chart

Since you want to be notified as the zooming is taking place, you should probably implement sChartIsZooming:withChartMovementInformation: Then, within this method you can update the positions of your annotations. This is similar to the functionality of the ‘Tour De France’ chart in ShinobiPlay.

Hope that helps

_sam


#3

sam

Hi Ram,

In ShinobiCharts for iOS the delegate has methods which are notified as the user interacts with the chart. In your case you’ll be interested in the following:

- (void)sChartDidStartZooming:(ShinobiChart *)chart
- (void)sChartIsZooming:(ShinobiChart *)chart
- (void)sChartIsZooming:(ShinobiChart *)chart withChartMovementInformation:(const SChartMovementInformation *)information
- (void)sChartDidFinishZooming:(ShinobiChart *)chart

Since you want to be notified as the zooming is taking place, you should probably implement sChartIsZooming:withChartMovementInformation: Then, within this method you can update the positions of your annotations. This is similar to the functionality of the ‘Tour De France’ chart in ShinobiPlay.

Hope that helps

_sam

Thanks for support.

Can u tell me in details How can I set minimum zoom level is equal to 2 and maximim is 5?

And How pass data point value in below method?

- (void)sChartIsZooming:(ShinobiChart *)chart withChartMovementInformation:(const SChartMovementInformation *)information

#4

Hi all,

I want to to set this max/min zoom limits, but xcode shows me that those delegate methods are deprecated (they have a red strikethrough when sugested methods appears).

Can I still use them? Are there some alternative methods in the current version of ShinobiCharts?


#5

Hi Tati,

There is a zoomInLimit and zoomOutLimit property available on SChartNumberAxis entirely for this purpose. Setting these should achieve what you’re after.

Kind regards,

Matt / iOS Developer