Wt: Wt::Chart::WChartPalette Class Reference

Wt 3.3.0

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

- Class List
- Class Hierarchy
- Class Members

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

Abstract base class for styling rendered data series in charts. More...

`#include <Wt/Chart/WChartPalette>`

Inheritance diagram for Wt::Chart::WChartPalette:
[legend]

List of all members.

## Public Member Functions
virtual | ~WChartPalette ()
| Destructor.
virtual WBrush | brush (int index) const =0
| Returns a brush from the palette.
virtual WPen | borderPen (int index) const =0
| Returns a border pen from the palette.
virtual WPen | strokePen (int index) const =0
| Returns a stroke pen from the palette.
virtual WColor | fontColor (int index) const =0
| Returns a font color from the palette.

## Detailed Description

Abstract base class for styling rendered data series in charts.

This class provides an interface for a palette which sets strokes and fill strokes for data in a chart. A palette is an ordered list of styles, which is indexed by the chart to get a suitable style for a particular series (in case of WCartesianChart) or data row (in case of WPieChart). Each style is defined by a brush, two pen styles (one for borders, and one for plain lines), and a font color that is appropriate for drawing text within the brushed area.

To use a custom palette, you should reimplement this class, and then use WAbstractChart::setPalette() to use an instance of the palette.

## Member Function Documentation

virtual WPen Wt::Chart::WChartPalette::borderPen | ( | int | index | ) | const`[pure virtual]`

Returns a border pen from the palette.

Returns the pen for stroking borders around an area filled using the brush at the same index.

See also:
  strokePen(), brush()

Implemented in Wt::Chart::WStandardPalette.

virtual WBrush Wt::Chart::WChartPalette::brush | ( | int | index | ) | const`[pure virtual]`

Returns a brush from the palette.

Returns the brush for the style with given index.

Implemented in Wt::Chart::WStandardPalette.

virtual WColor Wt::Chart::WChartPalette::fontColor | ( | int | index | ) | const`[pure virtual]`

Returns a font color from the palette.

Returns a font color suitable for rendering text in the area filled with the brush at the same index.

See also:
  brush()

Implemented in Wt::Chart::WStandardPalette.

virtual WPen Wt::Chart::WChartPalette::strokePen | ( | int | index | ) | const`[pure virtual]`

Returns a stroke pen from the palette.

Returns the pen for stroking lines for the style with given index.

See also:
  strokePen()

Implemented in Wt::Chart::WStandardPalette.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator