Skip to main content
A newer version of this page is available.

DXLegendStyle Class

The legend’s appearance settings storage.

Declaration

@interface DXLegendStyle: DXChartElementStyle

Remarks

The following image demonstrates parameters that this style contains:

Legend style parameters

Inheritance

NSObject
DXChartElementStyle
DXLegendStyle

Properties

backgroundColor Property

Gets or sets the background color of the legend.

Declaration

@property (readwrite, nullable) UIColor *backgroundColor

Property Value

Type Description
UIColor *

The UIColor object that specifies the background color.

Remarks

To reset the default color, set this property to nil.

borderColor Property

Gets or sets the color of the legend border.

Declaration

@property (readwrite, nullable) UIColor *borderColor

Property Value

Type Description
UIColor *

The UIColor object that specifies the border color.

Remarks

To reset the default color, set this property to nil.

borderThickness Property

Gets or sets the thicknerss of the legend border.

Declaration

@property (readwrite) CGFloat borderThickness

Property Value

Type Description
CGFloat

The thickness of the border, in screen points.

indentFromDiagram Property

Gets or sets the indent between the legend and the chart.

Declaration

@property (readwrite) UIEdgeInsets indentFromDiagram

Property Value

Type Description
UIEdgeInsets

The indent between the legend and the chart, in screen points.

Remarks

If legend is positioned outside the plot area, this property specifies indent between the plot area and the legend.

itemsHorizontalIndent Property

Gets or sets the indent between items when they are laid out horizontally.

Declaration

@property (readwrite) CGFloat itemsHorizontalIndent

Property Value

Type Description
CGFloat

The indent between legend items, in screen points.

itemsVerticalIndent Property

Gets or sets the indent between items when they are laid out vertically.

Declaration

@property (readwrite) CGFloat itemsVerticalIndent

Property Value

Type Description
CGFloat

The indent between legend items, in screen points.

markerSize Property

Gets or sets the marker size of a legend item.

Declaration

@property (readwrite) CGFloat markerSize

Property Value

Type Description
CGFloat

The size of a legend item, in screen points.

padding Property

Gets or sets the legend padding.

Declaration

@property (readwrite) UIEdgeInsets padding

Property Value

Type Description
UIEdgeInsets

The legend padding, in screen points.

textIndent Property

Gets or sets the indent between a marker and a text of a legend item.

Declaration

@property (readwrite) CGFloat textIndent

Property Value

Type Description
CGFloat

The indent between a marker and a text, in screen points.

textStyle Property

Gets or sets legend items’ text appearance settings.

Declaration

@property (readwrite, nullable) DXTextStyle *textStyle

Property Value

Type Description
DXTextStyle *

Legend items’ text appearance settings storage.

Remarks

Set this property to nil to reset the default test appearance.