SChartDateTimeAxis Class Reference

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

Overview

An SChartDateTimeAxis is a subclass of SChartAxis designed to work with data points that use NSDate.

The frequency values for tick marks are expected to be SChartDateFrequency objects.

Warning: This axis is not currently supported on radial charts.

Instance Methods

formatStringForFrequency:

Returns a format string for the current frequency.

- (NSString *)formatStringForFrequency:(NSDateComponents *)frequency

Discussion

For example, to show seconds when the chart has calculated a high tick frequency for the current zoom level:

if(frequency.hour < 12)
    return @"HH:mm:ss";
else
    return @"HH:mm";

This is called just prior to automatic tick label generation and allows you to override the default date label-format as required.

Declared In

SChartDateTimeAxis.h