SChartGestureManager Class Reference

Inherits from NSObject
Declared in SChartGestureManager.h
Availability
Related samples

Overview

The gesture manager contains all of the gestures used by a ShinobiChart, along with gesture-related properties which enable certain gestures.

Properties

animateBoxGesture

When set to YES the zoom resulting from a box gesture will animate to the new zoom level

@property (nonatomic) BOOL animateBoxGesture

Discussion

By default, this property is set to YES.

Declared In

SChartGestureManager.h

animateZoomGesture

When set to YES the zoom resulting from a pinch gesture will animate to the new zoom level

@property (nonatomic) BOOL animateZoomGesture

Discussion

By default, this property is set to YES.

Declared In

SChartGestureManager.h

boxGesture

The box gesture recognizer - by default this triggers the ‘box zoom’ functionality on the chart.

@property (nonatomic, strong, readonly) UIGestureRecognizer *boxGesture

Discussion

NOTE: This recognizer is only enabled if the chart is not a pie/donut chart and `panType` is set to `SChartGesturePanTypeBoxDraw`.

Declared In

SChartGestureManager.h

doubleTapEnabled

When set to YES the double-tap gesture is enabled, and its behaviour obeys the gestureDoubleTapResetsZoom property.

@property (nonatomic) BOOL doubleTapEnabled

Discussion

Otherwise, if set to NO the chart’s double tap gesture recognizer will be disabled.

By default, this property is set to YES.

Declared In

SChartGestureManager.h

doubleTapGesture

The double tap gesture - by default this triggers zooming in / reset zoom functionality.

@property (nonatomic, strong, readonly) UITapGestureRecognizer *doubleTapGesture

Discussion

NOTE: This recognizer is only enabled if the chart is not a pie/donut chart and `doubleTapEnabled` is set to true.

Declared In

SChartGestureManager.h

doubleTapResetsZoom

When set to YES the double-tap gesture will reset the zoom level to default

@property (nonatomic) BOOL doubleTapResetsZoom

Discussion

Otherwise, if set to NO the chart will zoom in a set amount.

By default, this property is set to NO.

Declared In

SChartGestureManager.h

longPressGesture

The long press gesture - by default this triggers the crosshair functionality.

@property (nonatomic, strong, readonly) UILongPressGestureRecognizer *longPressGesture

Discussion

NOTE: This recognizer is only enabled if the chart is not a pie/donut chart and at least one of the series has a crosshair enabled.

Declared In

SChartGestureManager.h

panType

Set the method for zooming the chart

@property (nonatomic) SChartGesturePanType panType

Discussion

  • SChartGesturePanTypeNone: This property disables pan gestures on the chart.
  • SChartGesturePanTypePanPinch: Configures the chart to use pinch zoom gestures.
  • SChartGesturePanTypeBoxDraw: Configures the chart to use touch gestures to generate a box on the chart. The chart will animate the zoom level to display the area marked by the box.

Defaults to SChartGesturePanTypePanPinch

Declared In

SChartGestureManager.h

pinchAndPanGesture

The pinch and pan gesture recognizer - by default this triggers panning and zooming on the chart.

@property (nonatomic, strong, readonly) UIPanGestureRecognizer *pinchAndPanGesture

Discussion

NOTE: This recognizer is only enabled if the chart is not a pie/donut chart and `panType` is set to `SChartGesturePanTypePanPinch`.

Declared In

SChartGestureManager.h

pinchAspectLock

When set to YES all of the axis will zoom the same amount

@property (nonatomic) BOOL pinchAspectLock

Discussion

The chart will maintain its aspect ratio regardless of the type or orientation of gesture.

Declared In

SChartGestureManager.h

radialRotationEnabled

When set to YES the radial-chart rotation gesture is enabled

@property (nonatomic) BOOL radialRotationEnabled

Discussion

Otherwise, if set to NO the radial chart’s rotation gesture recognizer will be disabled.

By default, this property is set to YES.

In order for radial series to respond to rotation gestures, they must also have their gesturePanningEnabled property set to YES. See SChartDonutSeries for documentation on this property.

Declared In

SChartGestureManager.h

radialRotationGesture

The radial rotation gesture - by default this triggers rotating pies/donuts.

@property (nonatomic, strong, readonly) UIPanGestureRecognizer *radialRotationGesture

Discussion

NOTE: This recognizer is only enabled if the chart is a pie/donut chart and `radialRotationEnabled` is set to true.

Declared In

SChartGestureManager.h

radialTapEnabled

When set to YES the radial-chart single tap gesture is enabled

@property (nonatomic) BOOL radialTapEnabled

Discussion

Otherwise, if set to NO the radial chart’s tap gesture recognizer will be disabled.

By default, this property is set to YES.

Declared In

SChartGestureManager.h

radialTapGesture

The radial tap gesture - by default this triggers selection of pie/donut slices.

@property (nonatomic, strong, readonly) UITapGestureRecognizer *radialTapGesture

Discussion

NOTE: This recognizer is only enabled if the chart is a pie/donut chart and `radialRotationEnabled` is set to true.

Declared In

SChartGestureManager.h

singleTapGesture

The single tap gesture - by default this triggers selection functionality.

@property (nonatomic, strong, readonly) UITapGestureRecognizer *singleTapGesture

Discussion

NOTE: This recognizer is only enabled if the chart is not a pie/donut chart and any of the series are selectable or have the crosshair enabled.

Declared In

SChartGestureManager.h

Instance Methods

gestures

A convenience method which returns all gestures on the chart

- (NSArray<UIGestureRecognizer *> *)gestures

Declared In

SChartGestureManager.h