Wt: Wt::Chart::WStandardPalette Class Reference

Wt 3.3.0

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

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
Wt::Chart::WStandardPalette Class Reference
Charts (Wt::Chart)

Standard styling for rendering series in charts. More...

`#include <Wt/Chart/WStandardPalette>`

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

List of all members.

## Public Types
enum | Flavour { Neutral = 0, Bold = 1, Muted = 2, GrayScale = 255 }
| Enumeration that indicates the palette flavour. More...
## Public Member Functions
| WStandardPalette (Flavour flavour)
| Creates a standard palette of a particular flavour.
virtual WBrush | brush (int index) const
| Returns a brush from the palette.
virtual WPen | borderPen (int index) const
| Returns a border pen from the palette.
virtual WPen | strokePen (int index) const
| Returns a stroke pen from the palette.
virtual WColor | fontColor (int index) const
| Returns a font color from the palette.
virtual WColor | color (int index) const
| Returns the color for the given index.

## Detailed Description

Standard styling for rendering series in charts.

This class provides four standard palettes, each composed of eight different colors (these are recycled at index 8).

The three colored palettes are a variation on those defined at http://www.modernlifeisrubbish.co.uk/article/web-2.0-colour-palette.

The following table lists the background color, and font color of the different palettes:

Neutral | Bold | Muted | GrayScale
Gmail blue | Mozilla red | Ruby on Rails red | Gray #1
Shiny silver | Flock blue | Mozilla blue | Gray #2
Interactive action yellow | RSS orange | Etsy vermillion | Gray #3
Qoop mint | Techcrunch green | Digg blue | Gray #4
Digg blue | Flickr pink | 43 Things gold | Gray #5
Shadows grey | Newsvine green | Writely olive | Gray #6
Magnolia Mag.nolia | Magnolia Mag.nolia | Last.fm crimson | Gray #7
RSS orange | Rollyo red | Basecamp green | Gray #8

The border pen is in all cases a gray pen of 0 width, while the stroke pen is a line of width 2 in the background color.

## Member Enumeration Documentation

enum Wt::Chart::WStandardPalette::Flavour

Enumeration that indicates the palette flavour.

Enumerator:

  Neutral | Neutral palette.
  Bold | Bold palette.
  Muted | Muted palette.
  GrayScale | Grayscale palette.

## Member Function Documentation

WPen Wt::Chart::WStandardPalette::borderPen | ( | int | index | ) | const`[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()

Implements Wt::Chart::WChartPalette.

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

Returns a brush from the palette.

Returns the brush for the style with given index.

Implements Wt::Chart::WChartPalette.

WColor Wt::Chart::WStandardPalette::fontColor | ( | int | index | ) | const`[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()

Implements Wt::Chart::WChartPalette.

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

Returns a stroke pen from the palette.

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

See also:
  strokePen()

Implements Wt::Chart::WChartPalette.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator