TKChartDateTimeAxis Class Reference
Inherits from | TKChartAxis : NSObject |
Declared in | TKChartDateTimeAxis.h |
Overview
The date-time axis of TKChart.
The TKChartDateTimeAxis categorical axis is an axis with NSDate values sorted chronologically. It also allows definition of categories based on specific date time components – year, month, day etc. For example, if data values fall in the range of one year, the points can be plotted in categories for each month. If data values fall in the range of one month, the values can be categorized by days. It also introduces several important properties:
majorTickInterval - Defines an interval among major axis ticks
baseline - Contains a value, which defines how the series data should be aligned to. (For example: The TKChartBarSeries might render its bars up and down side depending on wether its value is greater or less than the baseline value.)
offset - Determines a axis value where the axis is crossed with another axis
Tasks
-
majorTickInterval
property -
majorTickIntervalUnit
property -
baseline
property -
offset
property -
– setPlotMode:
-
– setMajorTickCount:
-
– initWithMinimumDate:andMaximumDate:
Properties
baseline
The value to which the series data is aligned to.
@property (nonatomic, strong) NSDate *baseline
Declared In
TKChartDateTimeAxis.h
majorTickInterval
The major tick mark frequency. The interpretation of the value for this property is determined by the majorTickIntervalUnit property.
@property (nonatomic) NSTimeInterval majorTickInterval
Declared In
TKChartDateTimeAxis.h
majorTickIntervalUnit
The major tick mark frequency using predefined values for a period.
@property (nonatomic) TKChartDateTimeAxisIntervalUnit majorTickIntervalUnit
Discussion
The date/time interval units are defined as follows:
typedef enum {
TKChartDateTimeAxisIntervalUnitSeconds, // The majorTickInterval is measured in seconds.
TKChartDateTimeAxisIntervalUnitMinutes, // The majorTickInterval is measured in minutes.
TKChartDateTimeAxisIntervalUnitHours, // The majorTickInterval is measured in hours.
TKChartDateTimeAxisIntervalUnitDays, // The majorTickInterval is measured in days.
TKChartDateTimeAxisIntervalUnitWeeks, // The majorTickInterval is measured in weeks.
TKChartDateTimeAxisIntervalUnitMonths, // The majorTickInterval is measured in months.
TKChartDateTimeAxisIntervalUnitYears, // The majorTickInterval is measured in years.
TKChartDateTimeAxisIntervalUnitCustom // The majorTickInterval is measured in ticks.
} TKChartDateTimeAxisIntervalUnit;
Declared In
TKChartDateTimeAxis.h
Instance Methods
initWithMinimumDate:andMaximumDate:
Initializes a new axis with minimum and maximum date.
- (instancetype __nonnull)initWithMinimumDate:(NSDate *__nonnull)minDate andMaximumDate:(NSDate *__nonnull)maxDate
Parameters
- minDate
The minimum date that specifies the start of the range.
- maxDate
The maximum date that specifies the end of the rangee.
Declared In
TKChartDateTimeAxis.h