Showing individual points in SChartLineSeries

931 Views Asked by At

Using ShinobiChart's SChartLineSeries chart type, I'm trying to enable the display of individual points with a circle (as in this example from ShinobiControls' user guide). Currently, the line plots without any individual points marked.

The user guide says this can indeed be done (as an option to be enabled) but without specifying how. And after scouring the documentation, I can't find this option anywhere. Anyone know if this is actually possible? Note: the SChartScatterSeries does offer this option, but I'm using the SChartLineSeries to take advantage of the built-in time series support, so need to stick with it.

1

There are 1 best solutions below

0
On BEST ANSWER

You need to enable point visibility. An SChartLineSeries has a style property - which is of type SChartLineSeriesStyle. This is a subclass of SChartScatterSeriesStyle, so you have access to a pointStyle property. You just need to set your pointStyle to show points:

- (SChartSeries *)sChart:(ShinobiChart *)chart seriesAtIndex:(int)index
{
    SChartLineSeries *series = [SChartLineSeries new];
    series.style.pointStyle.showPoints = YES;
    return series;
}

You can then control the appearance of the points using the properties available on this style. For more information check out the following classes in the API documentation:

http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.3.0/Premium/Normal/Classes/SChartPointStyle.html

http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiCharts/2.3.0/Premium/Normal/Classes/SChartBasePointStyle.html

Hope that helps :)