Inherits from NSObject
Declared in TKChartAnnotation.h

Overview

The base class for annotations.

Properties

hidden

Indicates whether the annotation is visible.

@property (nonatomic, assign) BOOL hidden

Declared In

TKChartAnnotation.h

zPosition

Gets or sets a value which determines the z-order position of the annotation. Every annotation can be positioned below or above the series collection.

@property (nonatomic, assign) TKChartAnnotationZPosition zPosition

Discussion

The z-order modes are defined as follows:

typedef enum { TKChartAnnotationZPositionBelowSeries, // The annotation is rendered below the series (default). TKChartAnnotationZPositionAboveSeries // The annotation is rendered above the series. } TKChartAnnotationZPosition;

Declared In

TKChartAnnotation.h

Instance Methods

annotationWasAddedToChart:withLayer:

Tells the annotation that it was added to the chart.

- (void)annotationWasAddedToChart:(TKChart *__nonnull)chart withLayer:(CALayer *__nonnull)layer

Parameters

chart

The TKChart instance that owns this annotation.

layer

The layer where the annotation will be rendered.

Declared In

TKChartAnnotation.h

annotationWillBeRemovedFromChart:

Tells the annotation that it will be removed from the chart.

- (void)annotationWillBeRemovedFromChart:(TKChart *__nonnull)chart

Parameters

chart

The TKChart instance that owns this annotation.

Declared In

TKChartAnnotation.h

drawInContext:

Draws the annotation by using the specified drawing context.

- (void)drawInContext:(CGContextRef __nonnull)context

Parameters

context

The drawing context to use when rendering the annotation.

Declared In

TKChartAnnotation.h

layoutInRect:forChart:inLayer:

Lays out the annotation within the chart plot area.

- (void)layoutInRect:(CGRect)bounds forChart:(TKChart *__nullable)chart inLayer:(CALayer *__nonnull)layer

Parameters

bounds

The bounds of the chart plot area.

chart

The chart where this annotation will be rendered.

layer

The layer where this annotation will be rendered.

Declared In

TKChartAnnotation.h

locationOfValue:withAxis:inBounds:

The axis coordinate of the specified value by using the specified bounds and axis.

- (CGFloat)locationOfValue:(id __nonnull)value withAxis:(TKChartAxis *__nonnull)axis inBounds:(CGRect)bounds

Parameters

value

The value to locate.

axis

The axis where the value is located.

bounds

The bounds of the plot area to use.

Return Value

A numeric value which specifies the axis coordinate.

Declared In

TKChartAnnotation.h