Inherits from NSObject
Declared in TKChartPointLabel.h

Overview

Represents a point label.

Properties

dataPoint

The corresponding data point.

@property (nonatomic, strong, readonly) id<TKChartData> __nullable dataPoint

Declared In

TKChartPointLabel.h

series

Point label’s style.

@property (nonatomic, strong, readonly) TKChartSeries *series

Declared In

TKChartPointLabel.h

text

Point label’s text.

@property (nonatomic, copy) NSString *text

Declared In

TKChartPointLabel.h

Instance Methods

drawInContext:inRect:forVisualPoint:color:

Draws the point label in specified rect.

- (void)drawInContext:(CGContextRef __nonnull)ctx inRect:(CGRect)bounds forVisualPoint:(TKChartVisualPoint *__nullable)visualPoint color:(UIColor *__nullable)paletteTextColor

Parameters

ctx

CGContext instance.

bounds

Point label’s rect.

visualPoint

Point label’s corresponding visual point.

paletteTextColor

The text color to be used.

Declared In

TKChartPointLabel.h

initWithPoint:series:text:

Initializes the point label with a data point, style and text.

- (instancetype __nonnull)initWithPoint:(id<TKChartData> __nonnull)point series:(TKChartSeries *__nonnull)series text:(NSString *__nonnull)text

Parameters

point

The corresponding data point.

series

The series to which the point belongs.

text

Point label’s text.

Declared In

TKChartPointLabel.h

sizeThatFits:

Returns the point label’s width and height.

- (CGSize)sizeThatFits:(CGSize)size

Parameters

size

The size available for the point label.

Declared In

TKChartPointLabel.h