Class WDataSeries


public class WDataSeries
extends WObject
A single data series in a cartesian chart.

This class configures all aspects for rendering a single data series in a cartesian chart. A data series renders Y data from a single model column against the X series configured for the chart.

The data column should contain data that can be converted to a number, but should not necessarily be of a number type, see also StringUtils.asNumber(Object).

Multiple series of different types may be combined on a single chart.

Different styles of data series

For a category chart, series may be stacked on top of each other. This is controlled by setStacked() for a series, which if enabled, will stack that series on top of the preceding data series. This works regardless of whether they are of the same type, but obviously works visually best if these series are of the same type. When not stacked, bar series are rendered next to each other. The margin between bars of different data series is controlled using WCartesianChart#setBarMargin().

The line and color type are by default based on the chart palette, but may be overridden for a series using setPen(), setBrush(), etc...

See Also:
WCartesianChart.addSeries(WDataSeries series)