Wt: Wt::Chart::SeriesIterator Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::Chart::SeriesIterator Class Reference
Charts (Wt::Chart)

Abstract base class for iterating over series data in WChart2DRenderer. More...

`#include <Wt/Chart/WChart2DRenderer>`

Inherited by Wt::Chart::ExtremesIterator, Wt::Chart::LabelRenderIterator, Wt::Chart::MarkerRenderIterator, and Wt::Chart::SeriesRenderIterator.

List of all members.

## Public Member Functions
virtual | ~SeriesIterator ()
| Destructor.
virtual void | startSegment (int currentXSegment, int currentYSegment, const WRectF &currentSegmentArea)
| Start handling a new segment.
virtual void | endSegment ()
| End handling a particular segment.
virtual bool | startSeries (const WDataSeries &series, double groupWidth, int numBarGroups, int currentBarGroup)
| Start iterating a particular series.
virtual void | endSeries ()
| End iterating a particular series.
virtual void | newValue (const WDataSeries &series, double x, double y, double stackY, const WModelIndex &xIndex, const WModelIndex &yIndex)
| Process a value.
int | currentXSegment () const
| Returns the current X segment.
int | currentYSegment () const
| Returns the current Y segment.

## Detailed Description

Abstract base class for iterating over series data in WChart2DRenderer.

This class is specialized for rendering series data.

See also:
  WChart2DRenderer::iterateSeries()

## Member Function Documentation

void Wt::Chart::SeriesIterator::endSegment | ( |  | ) | `[virtual]`

End handling a particular segment.

See also:
  startSegment()

void Wt::Chart::SeriesIterator::newValue | ( | const WDataSeries & | series,
|  | double | x,
|  | double | y,
|  | double | stackY,
|  | const WModelIndex & | xIndex,
|  | const WModelIndex & | yIndex
| ) |  | `[virtual]`

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.

void Wt::Chart::SeriesIterator::startSegment | ( | int | currentXSegment,
|  | int | currentYSegment,
|  | const WRectF & | currentSegmentArea
| ) |  | `[virtual]`

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 seperately, but each time with a different clipping region specified in the painter, corresponding to that segment.

The currentSegmentArea specifies the clipping area.

bool Wt::Chart::SeriesIterator::startSeries | ( | const WDataSeries & | series,
|  | double | groupWidth,
|  | int | numBarGroups,
|  | int | currentBarGroup
| ) |  | `[virtual]`

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.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator