Inherits from NSObject
Declared in Axis.h

Overview

This is the base class for all axis types of the chart view. This class should not be allocated.

Tasks

Properties

actualMajorStroke

Returns the resolved brush used to draw the axis major gridlines. (read-only)

@property (nonatomic, readonly) IGBrush *actualMajorStroke

Declared In

Axis.h

actualMinorStroke

Returns the resolved brush used to draw the axis minor gridlines. (read-only)

@property (nonatomic, readonly) IGBrush *actualMinorStroke

Declared In

Axis.h

actualStroke

Returns the resolved brush used to draw the axis line. (read-only)

@property (nonatomic, readonly) IGBrush *actualStroke

Declared In

Axis.h

axisVisible

A Boolean value that determines whether the axis is visible.

@property (nonatomic) BOOL axisVisible

Discussion

When set to NO, this property hides the axis line, all axis gridlines and labels.

Declared In

Axis.h

crossingAxis

Specifies the axis to intersect with the current axis.

@property (nonatomic, retain) IGAxis *crossingAxis

Discussion

This property is used in conjunction with crossingValue property. The pair of properties can be used to determine which two axes intersect each other at specified values.

Declared In

Axis.h

crossingValue

Specifies the value, at which the current axis will cross its crossing axis.

@property (nonatomic) float crossingValue

Discussion

This property is used in conjunction with crossingAxis property. When both properties are set, the current axis will use this property to determine the location, at which to cross the crossingAxis. For example, if an X axis has a crossing value of 5, it will intersect Y axis at Y=5.

Declared In

Axis.h

extent

Amount of white space in pixels between the axis and the edge of the chart view.

@property (nonatomic) float extent

Discussion

This property determines the amount of space used for axis labels.

Declared In

Axis.h

isInverted

A Boolean value that determines whether the axis is inverted.

@property (nonatomic) BOOL isInverted

Discussion

This property can be used to reverse the direction of the axis.

Declared In

Axis.h

key

This property specifies the axis identifier key.

@property (nonatomic, readonly) NSString *key

Discussion

A key must be specified on an axis when an axis is initialized.

Declared In

Axis.h

labelBrush

The brush used for the axis labels.

@property (nonatomic, retain) IGBrush *labelBrush

Declared In

Axis.h

labelsLocation

An enumeration value that determines where the labels are displayed.

@property (nonatomic) IGAxisLabelsLocation labelsLocation

Discussion

One of the values from IGAxisLabelsLocation enumeration can be used to set the axis labels placement. The enumeration contains values that can be used for both horizontal and vertical axes. However, only some values can be used with one particular axis type. For example, OutsideBottom, OutsideTop, InsideBottom and InsideTop can be used with a horizontal axis, but not a vertical one.

When labels are set to be outside, they reside within the axis extent. When the labels are set to be inside, they are positioned immediately above or below the horizontal axis line, or to the right or left of the vertical axis line. If there is not enough space for inside labels to display, they will be placed outside. IGAxisLabelsLocationOutsideBottom is the default for horizontal axes. IGAxisLabelsLocationOutsideLeft is the default for vertical axes.

Declared In

Axis.h

labelsVisible

A Boolean value that determines whether the axis labels are visible.

@property (nonatomic) BOOL labelsVisible

Declared In

Axis.h

majorStroke

The brush used for major grid lines.

@property (nonatomic, retain) IGBrush *majorStroke

Declared In

Axis.h

majorStrokeDashArray

Determines the pattern of the major grid lines.

@property (nonatomic, retain) NSArray *majorStrokeDashArray

Discussion

The array is a collection of alternating spaces and dashes represented by their length. For example, an array {2, 2} will create a repeating line pattern of 2 pixels of white space followed by a 2 pixel dash.

Declared In

Axis.h

majorStrokeThickness

A value that determines the thickness (in pixels) of the major grid lines.

@property (nonatomic) float majorStrokeThickness

Declared In

Axis.h

minorStroke

The brush used for minor grid lines.

@property (nonatomic, retain) IGBrush *minorStroke

Declared In

Axis.h

minorStrokeDashArray

Determines the pattern of the minor grid lines.

@property (nonatomic, retain) NSArray *minorStrokeDashArray

Discussion

The array is a collection of alternating spaces and dashes represented by their length. For example, an array {2, 2} will create a repeating line pattern of 2 pixels of white space followed by a 2 pixel dash.

Declared In

Axis.h

minorStrokeThickness

A value that determines the thickness (in pixels) of the minor grid lines.

@property (nonatomic) float minorStrokeThickness

Declared In

Axis.h

strip

The brush used for axis strips.

@property (nonatomic, retain) IGBrush *strip

Discussion

Strips are alternating highlighted regions of the axis between major grid lines.

Declared In

Axis.h

stroke

The brush used for the axis line.

@property (nonatomic, retain) IGBrush *stroke

Declared In

Axis.h

strokeDashArray

Determines the pattern of the axis line.

@property (nonatomic, retain) NSArray *strokeDashArray

Discussion

The array is a collection of alternating spaces and dashes represented by their length. For example, an array {2, 2} will create a repeating line pattern of 2 pixels of white space followed by a 2 pixel dash.

Declared In

Axis.h

strokeThickness

A value that determines the thickness (in pixels) of the axis line.

@property (nonatomic) float strokeThickness

Declared In

Axis.h

Instance Methods

convertFromScreen:

Converts a pixel value on the screen to an axis value. The returned value will be mapped to the current axis range.

- (CGFloat)convertFromScreen:(CGFloat)screenValue

Parameters

screenValue

pixel coordinate on the screen.

Return Value

value on the axis, mapped to the current axis range.

Declared In

Axis.h

convertToScreen:

Converts a value on the axis to a screen pixel coordinate.

- (CGFloat)convertToScreen:(CGFloat)axisValue

Parameters

axisValue

value on the axis.

Return Value

Screen value in pixels.

Declared In

Axis.h

initWithKey:

Initializes the axis with a string key.

- (id)initWithKey:(NSString *)key

Parameters

key

The string identifier for this axis.

Declared In

Axis.h