Inherits from NSObject
Declared in TKChartSeries.h

Overview

Represents a base class for all TKChart series. It is a grouping container for data points of given types. Different kinds of series represent different kinds of charts:

Properties

index

The series index in a chart.

@property (nonatomic, assign, readonly) NSUInteger index

Discussion

Index represents the current order of the chart series. It is automatically assigned and refreshed as series get added and removed.

Declared In

TKChartSeries.h

items

The items collection associated with this series.

@property (nonatomic, strong, readonly) NSArray *items

Declared In

TKChartSeries.h

reuseIdentifier

The series unique identifier.

@property (nonatomic, readonly, copy) NSString *reuseIdentifier

Declared In

TKChartSeries.h

selection

The new selection mode. (Created to match the android selection behavior.)

@property (nonatomic, assign) TKChartSeriesSelection selection

Declared In

TKChartSeries.h

selectionMode

The series' selection mode of type TKChartSeriesSelectionMode

@property (nonatomic, assign) TKChartSeriesSelectionMode selectionMode

Discussion

The selection modes are defined as follows:

typedef enum { TKChartSeriesSelectionModeNone, // No selection. TKChartSeriesSelectionModeSeries, // Selects a whole series. TKChartSeriesSelectionModeDataPoint, // Selects a data point. } TKChartSeriesSelectionMode;

Declared In

TKChartSeries.h

sortMode

The series' sort mode of type TKChartSeriesSortMode

@property (nonatomic, assign) TKChartSeriesSortMode sortMode

Discussion

The sort modes are defined as follows:

typedef enum { TKChartSeriesSortModeNone, // Series points are presented as they appear in the items collection. TKChartSeriesSortModeXAxis, // Sorts series items by using the dataXValue property and the corresponding axis. TKChartSeriesSortModeYAxis, // Sorts series items by using the dataYValue property and the corresponding axis. } TKChartSeriesSortMode;

Declared In

TKChartSeries.h

stackInfo

The series stack information.

@property (nonatomic, strong) TKChartStackInfo *stackInfo

Declared In

TKChartSeries.h

style

The series style.

@property (nonatomic, strong, readonly) TKChartSeriesStyle *style

Declared In

TKChartSeries.h

tag

The series tag. You can use it as a way to recognize a series.

@property (nonatomic, assign) NSInteger tag

Declared In

TKChartSeries.h

title

The series title. Used by the legend.

@property (nonatomic, copy) NSString *title

Declared In

TKChartSeries.h

visiblePoints

Returns a list containing the visible points.

@property (nonatomic, strong, readonly) NSArray *visiblePoints

Declared In

TKChartSeries.h

visiblePointsInternal

The series' visible data points related to series axes pan and zoom values.

@property (nonatomic, strong, readonly) NSArray *visiblePointsInternal

Declared In

TKChartSeries.h

xAxis

The associated x-axis.

@property (nonatomic, strong) TKChartAxis *xAxis

Declared In

TKChartSeries.h

yAxis

The associated y-axis.

@property (nonatomic, strong) TKChartAxis *yAxis

Declared In

TKChartSeries.h

Instance Methods

dataPointAtIndex:

Returns an idTKChartData data point at the given index.

- (id<TKChartData> __nullable)dataPointAtIndex:(NSUInteger)dataIndex

Parameters

dataIndex

The data point index.

Declared In

TKChartSeries.h

initWithItems:

Initializes the series with items.

- (instancetype __nonnull)initWithItems:(NSArray *__nonnull)items

Parameters

items

The array of items that obeys the TKChartData protocol.

Declared In

TKChartSeries.h

initWithItems:forKeys:

Initializes the series with items with specific key value paths.

- (instancetype __nonnull)initWithItems:(NSArray *__nonnull)items forKeys:(NSDictionary *__nonnull)keys

Parameters

items

The items that supply data for the series.

keys

The items key path.

Discussion

You could use your own classes by specifying their keys as data values

series = [TKChartSeries alloc] initWithItems:array forKeys:@{@“dataXValue”:@“id”, @“dataYvalue”:@“salary”}];

Declared In

TKChartSeries.h

initWithItems:forKeys:reuseIdentifier:

Initializes the series with items with specific key value paths.

- (instancetype __nonnull)initWithItems:(NSArray *__nonnull)items forKeys:(NSDictionary *__nonnull)keys reuseIdentifier:(NSString *__nonnull)reuseIdentifier

Parameters

items

The items that supply data for the series.

keys

The items key path.

reuseIdentifier

The unique identifier used when series are reused.

Declared In

TKChartSeries.h

initWithItems:reuseIdentifier:

Initializes the series with items.

- (instancetype __nonnull)initWithItems:(NSArray *__nullable)items reuseIdentifier:(NSString *__nonnull)reuseIdentifier

Parameters

items

The array of items that obeys the TKChartData protocol.

reuseIdentifier

The unique identifier used when series are reused.

Declared In

TKChartSeries.h

initWithItems:xValueKey:yValueKey:

Initializes the series with items with specific key value paths for dataXValue and dataYValue.

- (instancetype __nonnull)initWithItems:(NSArray *__nonnull)items xValueKey:(NSString *__nonnull)xValueKey yValueKey:(NSString *__nonnull)yValueKey

Parameters

items

The items that supply data for the series.

xValueKey

The key path to the dataXValue property.

yValueKey

The key path to the dataYValue property.

Declared In

TKChartSeries.h

pointIsSelected:

Returns trye if the point at the specified index is selected

- (BOOL)pointIsSelected:(NSInteger)index

Parameters

index

The point index.

Declared In

TKChartSeries.h

prepareForReuse

Prepares the series for being reused.

- (void)prepareForReuse

Declared In

TKChartSeries.h

renderForChart:

Creates a renderer for the partical series.

- (TKChartSeriesRender *__nonnull)renderForChart:(TKChart *__nonnull)chart

Parameters

chart

The chart.

Declared In

TKChartSeries.h

visiblePointsForAxis:

Returns a list containing the visible points according to the specified axis.

- (NSArray *__nonnull)visiblePointsForAxis:(TKChartAxis *__nonnull)axis

Parameters

axis

the axis.

Declared In

TKChartSeries.h