Conforms to NSObject
Declared in TKChart.h

Overview

The methods declared by the TKChartDelegate protocol allow the adopting delegate to respond to messages from the TKChart class and thus respond to, and in some affect, operations such as panning, zooming and data animations.

Instance Methods

chart:animationForSeries:withState:inRect:

Creates an animation for particular series.

- (CAAnimation *__nullable)chart:(TKChart *__nonnull)chart animationForSeries:(TKChartSeries *__nonnull)series withState:(TKChartSeriesRenderState *__nonnull)state inRect:(CGRect)rect

Parameters

chart

The TKChart instance requesting this information.

series

The series to which the animation will be applied.

state

The series' visual state.

rect

The viewport of the plot area.

Declared In

TKChart.h

chart:attributedTextForAxis:value:atIndex:

Returns an attributed string representing the specified tick value.

- (NSAttributedString *__nullable)chart:(TKChart *__nonnull)chart attributedTextForAxis:(TKChartAxis *__nonnull)axis value:(id __nullable)value atIndex:(NSUInteger)index

Parameters

chart

The TKChart instance requesting this information.

axis

The axis.

value

The tick value.

index

The index of the tick value.

Declared In

TKChart.h

chart:didDeselectPoint:inSeries:atIndex:

Called when a point is deselected.

- (void)chart:(TKChart *__nonnull)chart didDeselectPoint:(id<TKChartData> __nonnull)point inSeries:(TKChartSeries *__nonnull)series atIndex:(NSInteger)index

Parameters

chart

The TKChart for which the selection change has occurred.

point

The data point that is deselected.

series

The series that contains the selected point.

index

The index of the data point within the series.

Declared In

TKChart.h

chart:didDeselectSeries:

Called when a series is deselected.

- (void)chart:(TKChart *__nonnull)chart didDeselectSeries:(TKChartSeries *__nonnull)series

Parameters

chart

The TKChart for which the selection change has occurred.

series

The series that is deselected.

Declared In

TKChart.h

chart:didSelectPoint:inSeries:atIndex:

Called on selecting a point.

- (void)chart:(TKChart *__nonnull)chart didSelectPoint:(id<TKChartData> __nonnull)point inSeries:(TKChartSeries *__nonnull)series atIndex:(NSInteger)index

Parameters

chart

The TKChart for which the selection change has occurred.

point

The data point that is selected.

series

The series that contains the selected point.

index

The index of the data point within the series.

Declared In

TKChart.h

chart:didSelectSeries:

Called on selecting series.

- (void)chart:(TKChart *__nonnull)chart didSelectSeries:(TKChartSeries *__nonnull)series

Parameters

chart

The TKChart for which the selection has occurred.

series

The series that is selected.

Declared In

TKChart.h

chart:didTapOnLegendItem:

Called when touch occured on a legend item.

- (void)chart:(TKChart *__nonnull)chart didTapOnLegendItem:(TKChartLegendItem *__nonnull)legendItem

Parameters

chart

The TKChart instance where the event occured.

legendItem

The legendItem responsible for the event.

Declared In

TKChart.h

chart:labelForDataPoint:property:inSeries:atIndex:

Returns TKChartPointLabel for specific data point.

- (TKChartPointLabel *__nullable)chart:(TKChart *__nonnull)chart labelForDataPoint:(id<TKChartData> __nonnull)dataPoint property:(NSString *__nullable)propertyName inSeries:(TKChartSeries *__nonnull)series atIndex:(NSUInteger)dataIndex

Parameters

chart

The TKChart instance requesting the label.

dataPoint

The data point for which a label will be returned.

propertyName

The property name.

series

The series of the data point.

dataIndex

The index of the data point.

Return Value

TKChartPointLabel instance that will be rendered for the data point.

Declared In

TKChart.h

chart:legendItemForSeries:atIndex:

Returns TKChartLegendItem instance for series.

- (TKChartLegendItem *__nullable)chart:(TKChart *__nonnull)chart legendItemForSeries:(TKChartSeries *__nonnull)series atIndex:(NSUInteger)index

Parameters

chart

The TKChart instance requesting this information.

series

The series for which a legend item is requested.

index

The legend item’s index.

Declared In

TKChart.h

chart:paletteItemForPoint:inSeries:

Returns an instance of TKChartPaletteItem used to draw a single point in chart based on the point index and the series.

- (TKChartPaletteItem *__nullable)chart:(TKChart *__nonnull)chart paletteItemForPoint:(NSUInteger)index inSeries:(TKChartSeries *__nonnull)series

Parameters

chart

The TKChart instance requesting this information.

index

The point index within the specified series.

series

The series where the point is contained.

Return Value

The instance of TKCahrtPaletteItem that contains style settings for specific point.

Declared In

TKChart.h

chart:paletteItemForSeries:atIndex:

Returns an instance of TKChartPaletteItem based on the specified series and index.

- (TKChartPaletteItem *__nullable)chart:(TKChart *__nonnull)chart paletteItemForSeries:(TKChartSeries *__nonnull)series atIndex:(NSInteger)index

Parameters

chart

The TKChart instance requesting this information.

series

The series of the palette item that is being requested.

index

The item index for the series.

Return Value

The instance of TKChartPaletteItem that contains style settings for specific series.

Declared In

TKChart.h

chart:pointLabelRenderForSeries:withRender:

Returns a render for point labels.

- (TKChartPointLabelRender *__nullable)chart:(TKChart *__nonnull)chart pointLabelRenderForSeries:(TKChartSeries *__nonnull)series withRender:(TKChartSeriesRender *__nonnull)render

Parameters

chart

The TKChart instance requesting this information.

series

The series for which labels will be rendered.

render

The series render.

Return Value

TKChartPointLabelRender instance.

Declared In

TKChart.h

chart:shapeForSeries:atIndex:

Returns a shape for a specified series and index.

- (TKShape *__nullable)chart:(TKChart *__nonnull)chart shapeForSeries:(TKChartSeries *__nonnull)series atIndex:(NSUInteger)index

Parameters

chart

The TKChart instance requesting the shape.

series

The series of the palette item that is being requested.

index

The index of the series item.

Return Value

An instance of TKChartPaletteItem that contains style settings for a specific series.

Declared In

TKChart.h

chart:textForAxis:value:atIndex:

Returns a string representing the specified tick value.

- (NSString *__nullable)chart:(TKChart *__nonnull)chart textForAxis:(TKChartAxis *__nonnull)axis value:(id __nullable)value atIndex:(NSUInteger)index

Parameters

chart

The TKChart instance requesting this information.

axis

The axis.

value

The tick value.

index

The index of the tick value.

Declared In

TKChart.h

chart:textForLabelAtPoint:property:inSeries:atIndex:

Returns a string representing the specified point.

- (NSString *__nullable)chart:(TKChart *__nonnull)chart textForLabelAtPoint:(id<TKChartData> __nonnull)dataPoint property:(NSString *__nullable)propertyName inSeries:(TKChartSeries *__nonnull)series atIndex:(NSUInteger)dataIndex

Parameters

chart

The TKChart instance requesting this information.

dataPoint

The data point for which a label is being created.

propertyName

The property name.

series

The series of the data point.

dataIndex

The index of the data point.

Return Value

A string for the point label.

Declared In

TKChart.h

chart:trackballDidHideSelection:

Called when the trackball hides.

- (void)chart:(TKChart *__nonnull)chart trackballDidHideSelection:(NSArray *__nonnull)selection

Parameters

chart

The TKChart instance displaying the content.

selection

The array of TKChartSelectionInfo

Declared In

TKChart.h

chart:trackballDidTrackSelection:

Called on trackball moved

- (void)chart:(TKChart *__nonnull)chart trackballDidTrackSelection:(NSArray *__nonnull)selection

Parameters

chart

The TKChart for which the crosshair moved

selection

The array of TKChartSelectionInfo

Declared In

TKChart.h

chart:trackballLabelForDatapoint:inSeries:

Called when the trackball is about to be displayed to request a string representation for the corresponding data point.

- (NSString *)chart:(TKChart *__nonnull)chart trackballLabelForDatapoint:(id<TKChartData> __nonnull)point inSeries:(TKChartSeries *)series

Parameters

chart

The TKChart instance displaying the content.

point

The TKChartData implementation for which to display the content.

series

The TKChartSeries instance displaying the content.

Declared In

TKChart.h

chart:updateLegendItem:forSeries:atIndex:

Called when legend item’s styles should be updated.

- (void)chart:(TKChart *__nonnull)chart updateLegendItem:(TKChartLegendItem *__nonnull)item forSeries:(TKChartSeries *__nonnull)series atIndex:(NSUInteger)index

Parameters

chart

The TKChart instance requesting this information.

item

The legend item that will be updated.

series

The legend item’s series.

index

The legend item’s index.

Declared In

TKChart.h

chartDidPan:

Tells the delegate that the TKChart pan factor changed.

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

Parameters

chart

The TKChart instance displaying the content.

Declared In

TKChart.h

chartDidZoom:

Tells the delegate that the TKChart zoom factor changed.

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

Parameters

chart

The TKChart instance displaying the content.

Declared In

TKChart.h

chartWillPan:

* Tells the delegate when the TKChart is about to start panning the content.

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

Parameters

chart

The TKChart instance displaying the content.

Declared In

TKChart.h

chartWillZoom:

Tells the delegate when the chart view is about to start zooming the content.

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

Parameters

chart

The TKChart instance displaying the content.

Declared In

TKChart.h