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

DXChartBase Class

Chart views’ base class within the DevExpress Charts Suite for iOS.

Declaration

@interface DXChartBase

Properties

delegate Property

Gets or sets the chart delegate.

Declaration

@property (readwrite, weak, nonatomic, nullable) id<DXChartDelegate> delegate

Property Value

Type Description
id<DXChartDelegate>

The class adopting the DXChartDelegate protocol that is the chart delegate.

Remarks

This property’s value is nil if the window does not have a delegate.

A chart object’s delegate is inserted in the responder chain after the chart and delegation messages relay various chart action

legend Property

Gets or sets a chart’s legend settings.

Declaration

@property (readwrite, nullable) DXLegend *legend

Property Value

Type Description
DXLegend *

The DXLegend object that configures the legend.

selectedItems Property

Returns information about the selected series and series points.

Declaration

@property (readonly, nonatomic, nonnull) NSArray<DXSeriesPointInfo*> *selectedItems

Property Value

Type Description
NSArray<DXSeriesPointInfo *> *

The array of DXSeriesPointInfo objects that contains information about the selected series and selected points within a series.

Remarks

If the selectionKind property is set to DXChartSelectionKindSeries, the chart does not provide any information about the selected points and the DXSeriesPointInfo.dataPointIndices array is empty.

selectionKind Property

Gets or sets the value indicating a type of chart elements which should be selected.

Declaration

@property (readwrite, atomic) DXChartSelectionKind selectionKind

Property Value

Type Description
DXChartSelectionKind

The DXChartSelectionKind enumeration value, specifying whether series or points should be selected.

selectionMode Property

Gets or sets the value indicating how many chart elements can be selected simultaneously.

Declaration

@property (readwrite, atomic) DXChartSelectionMode selectionMode

Property Value

Type Description
DXChartSelectionMode

The DXChartSelectionMode enumeration value, specifying whether single or multiple chart items should be selected.

Instance Methods

calcHitInfo: Instance Method

Returns information about chart elements at the specified point.

Declaration

- (nonnull DXChartHitInfo *)calcHitInfo:(CGPoint)point

Parameters

Name Type Description
point CGPoint

The CGPoint object that specifies the test point coordinates relative to the chart’s top-left corner.

Returns

Type Description
DXChartHitInfo *

The DXChartHitInfo object that contains information about the chart elements under the test point.

hideHint Instance Method

Hides the displayed hint.

Declaration

- (void)hideHint

init Instance Method

Initializes and returns a newly allocated object with default settings.

Declaration

- (instancetype)init

Returns

Type Description
instancetype

An initialized chart object.

initWithCoder: Instance Method

Initializes and returns an object from data in a given unarchiver.

Declaration

- (instancetype)initWithCoder:(NSCoder *)aDecoder

Parameters

Name Type Description
aDecoder NSCoder *

The NSCoder object that is unarchiver.

Returns

Type Description
instancetype

An initialized chart object.

initWithFrame: Instance Method

Initializes and returns a newly allocated object with the specified frame rectangle.

Declaration

- (instancetype)initWithFrame:(CGRect)frame

Parameters

Name Type Description
frame CGRect

The GCRect object that is the frame rectangle for the view, measured in screen points.

Returns

Type Description
instancetype

An initialized chart object.

resumeRender Instance Method

Resumes rendering a chart.

Declaration

- (void)resumeRender

setSelected:seriesWithIndex:pointWithIndex: Instance Method

Selects/deselects a series/series point.

Declaration

- (void)setSelected:(BOOL)isSelected seriesWithIndex:(NSInteger)seriesIndex pointWithIndex:(NSInteger)pointIndex

Parameters

Name Type Description
isSelected BOOL

YES if the element is selected; otherwise NO.

seriesIndex NSInteger

The zero-based index of the series whose selection / whose point’s selection you manage.

pointIndex NSInteger

The zero-based index of the point whose selection you manage.

Remarks

The <xrefDXCharts.DXChartBase.selectionKind> property specifies the element that the method selects. The method ignores the pointIndex parameter when the selectionMode is set to Series.

setTheme: Instance Method

Specifies the chart’s current theme.

Declaration

- (void)setTheme:(DXChartTheme)themeType

Parameters

Name Type Description
themeType DXChartTheme

The value that specifies the chart’s theme.

showHint: Instance Method

Shows an interactive hint (Tooltip or Crosshair Cursor) at the specified point on a chart.

Declaration

- (void)showHint:(CGPoint)point

Parameters

Name Type Description
point CGPoint

The CGPoint object that specifies an on-screen chart point whose coordinates are related the Chart’s top left corner.

showHintForPointWithIndex:ofSeriesWithIndex: Instance Method

Shows a hint for the specified data point.

Declaration

- (void)showHintForPointWithIndex:(NSInteger)pointIndex ofSeriesWithIndex:(NSInteger)seriesIndex

Parameters

Name Type Description
pointIndex NSInteger

The data point index within a series.

seriesIndex NSInteger

The series containing a data point index.

suspendRender Instance Method

Suspends rendering a chart.

Declaration

- (void)suspendRender

Remarks

Use this method to avoid flickering on consecutive data changes, for example, when a data point is added to a source, and another is removed.