SChartTickLabelFormatter Class Reference

Inherits from NSObject
Declared in SChartTickLabelFormatter.h
Availability Standard
Premium
Related samples

Overview

A wrapper object that contains an appropriate NSFormatter for the axes for which it is formatting tick labels.

Instances of SChartDateTimeAxis and SChartNumberAxis (and subclasses thereof) are assigned a sensible SChartTickLabelFormatter when they are initialized. Set properties on the ‘formatter’ property to customise your formatting. You can also subclass SChartTickLabelFormatter and set your custom object to an axis to handle formatting.

Properties

formatter

The internal NSFormatter.

@property (nonatomic, retain) NSFormatter *formatter

Discussion

Configure this object as you would an NSFormatter.

Declared In

SChartTickLabelFormatter.h

Class Methods

dateFormatter

Factory method for an SChartTickLabelFormatter with a formatter of type NSDateFormatter.

+ (SChartTickLabelFormatter *)dateFormatter

Discussion

Use this to create formatters for instances of SChartDateTimeAxis.

Declared In

SChartTickLabelFormatter.h

numberFormatter

Factory method for an SChartTickLabelFormatter with a formatter of type NSNumberFormatter.

+ (SChartTickLabelFormatter *)numberFormatter

Discussion

Use this to create formatters for instances of SChartNumberAxis.

Declared In

SChartTickLabelFormatter.h

Instance Methods

dateFormatter

Get the formatter property pre-cast as an NSDateFormatter.

- (NSDateFormatter *_Nullable)dateFormatter

Discussion

If the formatter is not an NSDateFormatter, nil will be returned.

Declared In

SChartTickLabelFormatter.h

numberFormatter

Get the formatter property pre-cast as an NSNumberFormatter.

- (NSNumberFormatter *_Nullable)numberFormatter

Discussion

If the formatter is not an NSNumberFormatter, nil will be returned.

Declared In

SChartTickLabelFormatter.h

stringForObjectValue:onAxis:

Get the formatted string representation for the value of a data object on an axis

- (nullable NSString *)stringForObjectValue:(id)obj onAxis:(SChartAxis *)axis

Declared In

SChartTickLabelFormatter.h