The look of a chart is managed by an instance of
SChartTheme or one of its sub-classes. Themes contain a set of style objects, each of which are responsible for managing the look of a particular aspect of the chart. You’ll find instances of this class or a subclass on the theme for axes titles and for the chart title.
The SChartTitleStyle class is responsible for managing the look of the titles on the chart. This includes things like:
The background color of the title label.
@property (nonatomic, retain) UIColor *backgroundColor
The font for the title text.
@property (nonatomic, retain) UIFont *font
The minimum scale factor for the title text.
@property (nonatomic) CGFloat minimumScaleFactor
Functions in the same way as the UILabel equivalent property. *
Where the title will appear relative to the chart or axis.
@property (nonatomic) SChartTitlePosition position
This property has two different purposes:
The effect of the different position values on the chart depends on the context.
SChartTitleStyle is used both for the main chart title, and for the axis titles. The main chart title is always displayed at the top of the chart. The value of position is used to define whether the title is displayed on the left, in the center, or on the right of the chart.
For axis titles, the effect of the position value depends on the type of the chart. On cartesian charts, the axis titles are always displayed outside of the axes with reference to the plot area. The value of position defines whether the title is displayed on the left, in the center or on the right for x axes, and at the top, in the center or at the bottom for y axes.
On radial charts, the x axis title is always centered horizontally. The value of position defines whether the x axis title is displayed at the top or at the bottom of the chart. If a position of
SChartTitlePositionCenter is defined for the x axis, the axis title is also displayed at the bottom. The behavior of the y axis title is the same as for cartesian charts.
If you would like to position your title label manually you can do so by setting its frame.
SChartMainTitleStyle is used for the main title on the chart. The possible values of position are defined as follows:
SChartAxisTitleStyle is used for the titles on the chart axes. The possible values of position are defined as follows:
The text alignment of the title.
@property (nonatomic) NSTextAlignment textAlign