SChartDataPointLabelStyle Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in SChartDataPointLabelStyle.h
Availability Standard
Premium
Related samples

Overview

The data point label style object controls the look and feel for labels appearing next to a series data point.

Properties

displayValues

Whether to display x and y values, or both, of the SChartDataPoint.

@property (nonatomic, assign) SChartDataPointLabelDisplayValues displayValues

Discussion

  • SChartDataPointLabelDisplayXValue: Only display the X-value of the SChartDataPoint.
  • SChartDataPointLabelDisplayYValue: Only display the Y-value of the SChartDataPoint.
  • SChartDataPointLabelDisplayBothValues: Display both the X and Y values of the SChartDataPoint.

Declared In

SChartDataPointLabelStyle.h

font

The font used for the data point label.

@property (nonatomic, strong, nullable) UIFont *font

Discussion

Default value is inherited from the axis label font of current theme.

Declared In

SChartDataPointLabelStyle.h

offsetFlippedForNegativeValues

Whether or not to offset negative values in the opposite direction to positive values. Defaults to YES.

@property (nonatomic, assign) BOOL offsetFlippedForNegativeValues

Discussion

Setting this to YES will offset positive values in the same way, but negative values in the opposite direction. For horizontal series such as column charts, this means in the opposite Y direction. For vertical series such as bar charts, this means in the opposite X direction.

Declared In

SChartDataPointLabelStyle.h

offsetFromDataPoint

The center of the SChartDataPointLabel, relative to the data point. Defaults to CGPointZero.

@property (nonatomic, assign) CGPoint offsetFromDataPoint

Declared In

SChartDataPointLabelStyle.h

position

The position in the data where the data point label should be placed. Defaults to SChartDataPointLabelPositionBelowData

@property (nonatomic, assign) SChartDataPointLabelPosition position

Discussion

  • SChartDataPointLabelPositionAboveData: The data point label is drawn on top of the data.
  • SChartDataPointLabelPositionBelowData: The data point label is drawn behind the data.

Declared In

SChartDataPointLabelStyle.h

showLabels

Whether or not to show a label next to each SChartDataPoint. Defaults to NO.

@property (nonatomic, assign) BOOL showLabels

Declared In

SChartDataPointLabelStyle.h

textColor

The color of the text used to display the data point label.

@property (nonatomic, strong, nullable) UIColor *textColor

Discussion

Default value is inherited from the title text color of current theme.

Declared In

SChartDataPointLabelStyle.h

textOrientation

The direction the text should be displayed. Defaults to SChartDataPointLabelOrientationHorizontal.

@property (nonatomic, assign) SChartDataPointLabelOrientation textOrientation

Discussion

  • SChartDataPointLabelOrientationHorizontal: Text is displayed left-to-right.
  • SChartDataPointLabelOrientationVertical: Text is rotated and displayed top-to-bottom.
  • SChartDataPointLabelOrientationHorizontalReversed: Text is displayed upside down, right-to-left.
  • SChartDataPointLabelOrientationVerticalReversed: Text is rotated and displayed bottom-to-top.

Declared In

SChartDataPointLabelStyle.h

Instance Methods

supplementStyleFromStyle:

Supplements this style object by taking styles from an existing SChartDataPointLabelStyle.

- (void)supplementStyleFromStyle:(SChartDataPointLabelStyle *)style

Declared In

SChartDataPointLabelStyle.h