SChartDiscontinuousDateTimeAxis Class Reference

Inherits from SChartDateTimeAxis : SChartAxis : NSObject
Declared in SChartDiscontinuousDateTimeAxis.h
Availability Premium
Related samples

Overview

  • An SChartDiscontinuousDateTimeAxis is a subclass of SChartDateTimeAxis
  • designed to work with NSDates, skipping over specified time periods.

Instance Methods

addExcludedRepeatedTimePeriod:

Adds an SChartRepeatedTimePeriod to the skipping algorithm. This causes the axis to skip over a time period repeatedly, anchored at a certain starting point.

- (void)addExcludedRepeatedTimePeriod:(SChartRepeatedTimePeriod *)period

Parameters

period

A new repeat-time period to exclude

Discussion

This starting date may be anywhere, including outside the current axis range. The axis will calculate the correct in-range start for you.

You must reload the chart when new skips are added.

Declared In

SChartDiscontinuousDateTimeAxis.h

addExcludedTimePeriod:

Adds an SChartTimePeriod to the list of date-periods to skip over. You must reload the chart when new skips are added.

- (void)addExcludedTimePeriod:(SChartTimePeriod *)period

Parameters

period

A new time period to exclude

Declared In

SChartDiscontinuousDateTimeAxis.h

cacheCount

Returns the cache count for time-skips. Called when a new cache is required, for example, on a new zoom level.

- (NSUInteger)cacheCount

Discussion

This may be overridden if you wish to trade memory for time or vice-versa when the axis is calculating tick labels. For a faster axis, return a large value (e.g. 1,000), for lower memory usage, return a small value (e.g. 50 - 100).

Defaults to 400.

Declared In

SChartDiscontinuousDateTimeAxis.h

excludedRepeatedTimePeriods

Returns an array of the repeat-skip time periods previously given to the axis.

- (NSArray<SChartRepeatedTimePeriod *> *)excludedRepeatedTimePeriods

Discussion

Note that you must copy this array if you wish to iterate over it and call any of the repeat-add or repeat-remove methods mentioned in this class.

Declared In

SChartDiscontinuousDateTimeAxis.h

excludedTimePeriods

Returns an array of the skipping time periods previously given to the axis.

- (NSArray<SChartTimePeriod *> *)excludedTimePeriods

Discussion

Note that you must copy this array if you wish to iterate over it and call any of the single-add or single-remove methods mentioned in this class.

Declared In

SChartDiscontinuousDateTimeAxis.h

removeExcludedRepeatedTimePeriod:

Removes a repeated time period/the multiple skips caused by one repeated time period.

- (void)removeExcludedRepeatedTimePeriod:(SChartRepeatedTimePeriod *)period

Parameters

period

The same, or an equivalent repeat-time period to remove from the exclusions

Discussion

You must reload the chart when skips are removed.

Declared In

SChartDiscontinuousDateTimeAxis.h

removeExcludedTimePeriod:

Removes a single, previously added, skip period.

- (void)removeExcludedTimePeriod:(SChartTimePeriod *)period

Parameters

period

The same, or an equivalent time period to remove from the exclusions

Discussion

You must reload the chart when skips are removed.

Declared In

SChartDiscontinuousDateTimeAxis.h