public final class

LineSeries

extends CartesianSeries<T extends SeriesStyle>
java.lang.Object
   ↳ com.shinobicontrols.charts.Series<T extends com.shinobicontrols.charts.SeriesStyle>
     ↳ com.shinobicontrols.charts.CartesianSeries<T extends com.shinobicontrols.charts.SeriesStyle>
       ↳ com.shinobicontrols.charts.LineSeries

Class Overview

LineSeries is a type of Series that uses the data points to construct a line series. The line series consists of a number of points which may or may not be marked, that are connected by a line with an optional fill (ie: area series) between the line and x-axis.

Line series can also be used to draw scatter plots, by hiding the lines and showing the points, using LineSeriesStyle.

Line series may be stacked on top of each other by using the setStackId(Integer) method.

Summary

Public Constructors
LineSeries()
Public Methods
SeriesStyleProvider<LineSeriesStyle> createDefaultSeriesStyleProvider()
Creates the default SeriesStyleProvider for this LineSeries.
DataValueInterpolator<?, ?> getLinePathInterpolator()
SeriesStyleProvider<LineSeriesStyle> getSeriesStyleProvider()
Returns a SeriesStyleProvider which provides LineSeriesStyle objects for the purposes of styling this LineSeries' per-point applicable styles.
void setLinePathInterpolator(DataValueInterpolator<?, ?> linePathInterpolator)
void setSeriesStyleProvider(SeriesStyleProvider<LineSeriesStyle> seriesStyleProvider)
Sets the SeriesStyleProvider to be used to provide LineSeriesStyle objects for the purposes of styling this LineSeries' per-point applicable styles.
[Expand]
Inherited Methods
From class com.shinobicontrols.charts.CartesianSeries
From class com.shinobicontrols.charts.Series
From class java.lang.Object

Public Constructors

public LineSeries ()

Public Methods

public SeriesStyleProvider<LineSeriesStyle> createDefaultSeriesStyleProvider ()

Creates the default SeriesStyleProvider for this LineSeries.

This particular implementation provides one of the two Series-level SeriesStyle objects: that obtained from getSelectedStyle() or from getStyle(), depending on whether this LineSeries is selected or not.

Returns

public DataValueInterpolator<?, ?> getLinePathInterpolator ()

Gets the DataValueInterpolator on the LineSeries. A DataValueInterpolator can allow the line to take a different shape to what it would be if based solely on the Data items added to the DataAdapter. A common use of this is smoothing of the line.

Returns
  • the DataValueInterpolator responsible for returning a copy of the Data items within the DataAdapter. This potentially modified list will determine the shape of the line when it is drawn

public SeriesStyleProvider<LineSeriesStyle> getSeriesStyleProvider ()

Returns a SeriesStyleProvider which provides LineSeriesStyle objects for the purposes of styling this LineSeries' per-point applicable styles.

By default, this LineSeries has the SeriesStyleProvider created by the createDefaultSeriesStyleProvider() method set on it.

Returns

public void setLinePathInterpolator (DataValueInterpolator<?, ?> linePathInterpolator)

Sets the DataValueInterpolator on the LineSeries. A DataValueInterpolator can allow the line to take a different shape to what it would be if based solely on the Data items added to the DataAdapter. A common use of this is smoothing of the line.

May be null, in which case the line will be drawn with a shape based on the Data items within the DataAdapter. Setting this value to null will overwrite any previously set DataValueInterpolator.

When the Crosshair is enabled it will track the line created by the DataValueInterpolator if it is set to interpolate between data points on LineSeries. When the Crosshair is set to not interpolate between data points it will jump between the original data points held in this series' DataAdapter.

Parameters
linePathInterpolator the DataValueInterpolator responsible for returning a copy of the Data items within the DataAdapter. This potentially modified list will determine the shape of the line when it is drawn

public void setSeriesStyleProvider (SeriesStyleProvider<LineSeriesStyle> seriesStyleProvider)

Sets the SeriesStyleProvider to be used to provide LineSeriesStyle objects for the purposes of styling this LineSeries' per-point applicable styles.

SeriesStyleProvider implementations can achieve individual point styling by returning customized styles for particular data points based on their properties. The default SeriesStyleProvider for a particular Series type can be obtained through the createDefaultSeriesStyleProvider() method.

The given SeriesStyleProvider must not be null otherwise an IllegalArgumentException will be thrown.

Parameters
seriesStyleProvider the SeriesStyleProvider to use for styling this LineSeries' per-point applicable styles, must not be null