SChartAnnotationZooming Class Reference

Inherits from SChartAnnotation : UIView
Declared in SChartAnnotation.h
Availability Premium
Related samples

Overview

An SChartAnnotationZooming object is pinned between two points on each axis in the chart and will scale according to the current range of the axis. It is pinned between xValue and xValueMax on the x axis, and yValue and yValueMax on the y axis.

This kind of annotation is useful for highlighting areas of data, etc. As we zoom in on a range of data, the zooming annotation will also zoom so that it covers the same range of data on the chart axes. Due to this, it will not maintain its aspect ratio as the chart is zoomed.

Tasks

Positioning and zooming

Drawing the annotation

Properties

stretchToBoundsOnX

Causes the annotation to be stretched to cover the whole width of the chart plot area.

@property (nonatomic) BOOL stretchToBoundsOnX

Discussion

This defaults to NO.

Declared In

SChartAnnotation.h

stretchToBoundsOnY

Causes the annotation to be stretched to cover the whole height of the chart plot area.

@property (nonatomic) BOOL stretchToBoundsOnY

Discussion

This defaults to NO.

Declared In

SChartAnnotation.h

xValueMax

The upper limit of the annotation on the x axis.

@property (nonatomic, retain, nullable) id xValueMax

Discussion

A nil value will cause the view to be displayed with its original width.

Declared In

SChartAnnotation.h

yValueMax

The upper limit of the annotation on the y axis.

@property (nonatomic, retain, nullable) id yValueMax

Discussion

A nil value will cause the view to be displayed with its original height.

Declared In

SChartAnnotation.h

Instance Methods

updateViewWithCanvas:

Positions the annotation on the chart plot area and zooms according to the axis ranges.

- (void)updateViewWithCanvas:(SChartCanvas *)canvas

Discussion

Override this method to provide custom updating of the annotation while it is being positioned on the chart.

Declared In

SChartAnnotation.h