SChartLegendStyle Class Reference

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

Overview

Manages the appearance of the legend on the chart. The legend is an instance of SChartLegend.

Properties

areaColor

The color of the background of the legend.

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

Declared In

SChartLegendStyle.h

borderColor

The color of the border line of the legend.

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

Declared In

SChartLegendStyle.h

borderWidth

The width of the legend border in points.

@property (nonatomic, strong, nullable) NSNumber *borderWidth

Declared In

SChartLegendStyle.h

cornerRadius

The radius of the corners of the legend view.

@property (nonatomic, strong, nullable) NSNumber *cornerRadius

Discussion

Setting a radius of 0 will draw square corners.

Declared In

SChartLegendStyle.h

font

The font used for the series titles.

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

Declared In

SChartLegendStyle.h

fontColor

The color of the text used to display the series titles.

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

Declared In

SChartLegendStyle.h

horizontalPadding

The horizontal padding between the symbol and the label representing a chart series in the legend, and also between different series within a row.

@property (nonatomic, strong, nullable) NSNumber *horizontalPadding

Declared In

SChartLegendStyle.h

marginWidth

The amount of padding around the inside perimeter of the legend, in points.

@property (nonatomic, strong, nullable) NSNumber *marginWidth

Declared In

SChartLegendStyle.h

orientation

The layout of the series within the legend.

@property (nonatomic) SChartLegendOrientation orientation

Discussion

The options available are:

  • SChartLegendOrientationVertical: Configures the layout of the series within the legend to be vertical i.e legend entries are placed from top to bottom.
  • SChartLegendOrientationHorizontal: Configures the layout of the series within the legend to be horizontal i.e. legend entries are placed from left to right, wrapping if they reach the edge of the legend

Declared In

SChartLegendStyle.h

showSymbols

Defines whether symbols will be shown in the legend.

@property (nonatomic) BOOL showSymbols

Discussion

By default, this property is set to YES (symbols will be shown). Symbols are collected from each of the chart series using the SChartLegendItem protocol. If this is set to NO, each chart series will be represented in the legend by a text label only.

Declared In

SChartLegendStyle.h

symbolAlignment

The alignment of the symbols in the legend.

@property (nonatomic) SChartSeriesLegendSymbolAlignment symbolAlignment

Discussion

The options available are:

  • SChartSeriesLegendAlignSymbolsLeft: Configures the symbols in the legend to be placed to the left of the series name.
  • SChartSeriesLegendAlignSymbolsRight: Configures the symbols in the legend to be placed to the right of the series name.

If showSymbols is set to NO, this property will have no effect.

Declared In

SChartLegendStyle.h

symbolCornerRadius

The radius of the corners of the legend symbols.

@property (nonatomic, strong, nullable) NSNumber *symbolCornerRadius

Discussion

Setting a radius of 0 will draw square corners.

Declared In

SChartLegendStyle.h

textAlignment

The alignment of the series titles.

@property (nonatomic) NSTextAlignment textAlignment

Declared In

SChartLegendStyle.h

titleFont

The font for the legend title.

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

Declared In

SChartLegendStyle.h

titleFontColor

The color for the legend title text.

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

Declared In

SChartLegendStyle.h

verticalPadding

The vertical padding between rows in the legend.

@property (nonatomic, strong, nullable) NSNumber *verticalPadding

Declared In

SChartLegendStyle.h

Instance Methods

supplementStyleFromStyle:

Updates this style object using the configuration of the passed in style.

- (void)supplementStyleFromStyle:(SChartLegendStyle *)style

Parameters

style

The new style with which to update this style object.

Declared In

SChartLegendStyle.h