Class SeriesIterator
This class is specialized for rendering series data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
End handling a particular segment.void
End iterating a particular series.int
Returns the current X segment.int
Returns the current Y segment.void
newValue
(WDataSeries series, double x, double y, double stackY, int xRow, int xColumn, int yRow, int yColumn) Process a value.static void
setBrushColor
(WBrush brush, WDataSeries series, int xRow, int xColumn, int yRow, int yColumn, ItemDataRole colorRole) static void
setPenColor
(WPen pen, WDataSeries series, int xRow, int xColumn, int yRow, int yColumn, ItemDataRole colorRole) void
startSegment
(int currentXSegment, int currentYSegment, WRectF currentSegmentArea) Start handling a new segment.boolean
startSeries
(WDataSeries series, double groupWidth, int numBarGroups, int currentBarGroup) Start iterating a particular series.
-
Constructor Details
-
SeriesIterator
public SeriesIterator()
-
-
Method Details
-
startSegment
Start handling a new segment.Because of a 'break' specified in an axis, axes may be divided in one or two segments (in fact only the API limits this now to two). The iterator will iterate all segments separately, but each time with a different clipping region specified in the painter, corresponding to that segment.
The currentSegmentArea specifies the clipping area.
-
endSegment
public void endSegment()End handling a particular segment. -
startSeries
public boolean startSeries(WDataSeries series, double groupWidth, int numBarGroups, int currentBarGroup) Start iterating a particular series.Returns whether the series values should be iterated. The groupWidth is the width (in pixels) of a single bar group. The chart contains numBarGroups, and the current series is in the currentBarGroup'th group.
-
endSeries
public void endSeries()End iterating a particular series. -
newValue
public void newValue(WDataSeries series, double x, double y, double stackY, int xRow, int xColumn, int yRow, int yColumn) Process a value.Processes a value with model coordinates (x, y). The y value may differ from the model's y value, because of stacked series. The y value here corresponds to the location on the chart, after stacking.
The stackY argument is the y value from the previous series (also after stacking). It will be 0, unless this series is stacked.
-
getCurrentXSegment
public int getCurrentXSegment()Returns the current X segment. -
getCurrentYSegment
public int getCurrentYSegment()Returns the current Y segment. -
setPenColor
public static void setPenColor(WPen pen, WDataSeries series, int xRow, int xColumn, int yRow, int yColumn, ItemDataRole colorRole) -
setBrushColor
public static void setBrushColor(WBrush brush, WDataSeries series, int xRow, int xColumn, int yRow, int yColumn, ItemDataRole colorRole)
-