SChartRadialLineSeries Class Reference

Inherits from SChartMappedSeries : SChartSeries : NSObject
Declared in SChartRadialLineSeries.h
Availability Standard
Premium
Related samples

Overview

SChartRadialLineSeries is a type of SChartMappedSeries that uses datapoints to construct a line series on a radial chart. The line series consists of a number of points which may or may not be selected, and which are connected by a line with an optional fill between the line and the chart’s center.

Properties

pointsWrapAround

Determines whether the line series will draw a line from the last point back to the first point.

@property (nonatomic, assign) BOOL pointsWrapAround

Discussion

By default, this is set to NO.

Declared In

SChartRadialLineSeries.h

Instance Methods

selectedStyle

Manages the appearance of the line series when it is selected.

- (SChartRadialLineSeriesStyle *)selectedStyle

Discussion

Style settings in this object will be applied when the series is marked as selected (or a point is selected).

The default settings of the style are inherited from the chart theme. You can tweak the appearance of the series by modifying the style.

Declared In

SChartRadialLineSeries.h

setSelectedStyle:

Sets the style object for the radial line series when it is selected.

- (void)setSelectedStyle:(SChartRadialLineSeriesStyle *)selectedStyle

Parameters

selectedStyle

The new style object to use.

See Also

Declared In

SChartRadialLineSeries.h

setStyle:

Sets the style object for the radial line series.

- (void)setStyle:(SChartRadialLineSeriesStyle *)style

Parameters

style

The new style object to use for the line series.

See Also

Declared In

SChartRadialLineSeries.h

style

Manages the appearance of the radial line series on the chart.

- (SChartRadialLineSeriesStyle *)style

Discussion

The default settings of the style are inherited from the chart theme. You can tweak the appearance of the series by modifying the style.

Declared In

SChartRadialLineSeries.h

styleForPoint:

Specifies the style to use on a per-point basis

- (SChartBasePointStyle *)styleForPoint:(id<SChartData>)point

Parameters

point

The data-point that will be styled by the returned style object.

Discussion

This method is called for each datapoint in this series and the standard implementation chooses to return either the style or selectedStyle object based on the selectionMode and selected state of either the point or the series. Computationally expensive operations here will increase initial render time.

Use the sChartXValue & sChartYValue properties to access each datapoint’s X & Y values. Here is an example of how to use these properties to style each point:

 - (SChartBasePointStyle*)styleForPoint:(idSChartData)point {

     SChartBasePointStyle *newStyle = [super styleForPoint:point];

     float yValue = [[point sChartYValue] floatValue];

     if (yValue > 90) {
         newStyle.color = [UIColor redColor];
     } else if(yValue > 50) {
         newStyle.color = [UIColor yellowColor];
     } else {
         newStyle.color = [UIColor greenColor];
     }
     return newStyle;
 }

Declared In

SChartRadialLineSeries.h