Members
Object
# inner constant defaultPalettes
Default palettes for numerical and categorical data.
Properties:
Name | Type | Description |
---|---|---|
numerical |
Object
|
palettes for numerical data |
Blues |
Array.<string>
|
. Default for numerical data |
Greens |
Array.<string>
|
|
Greys |
Array.<string>
|
|
Reds |
Array.<string>
|
|
YlOrBr |
Array.<string>
|
|
categorical |
Object
|
palettes for categorical data |
Set1 |
Array.<string>
|
. Default for categorical data |
Set2 |
Array.<string>
|
|
Set3 |
Array.<string>
|
|
Dark2 |
Array.<string>
|
Methods
# static assignPalettes(columns, palettes)
Parameters:
Name | Type | Description |
---|---|---|
columns |
Array.<module:columns.Column>
|
array of |
palettes |
module:palettes~PaletteMapping
|
mapping of names to color palettes |
Type Definitions
Object
# CustomPalette
A custom palette specification. This is important for categorical data: the names
are used as labels in the legend for pie
geom, for text
geom the values are mapped to
colors based on the names.
Properties:
Name | Type | Description |
---|---|---|
colors |
Array.<string>
|
list of colors |
names |
Array.<string>
|
list of names for the colors, in the same order |
Object.<string, module:palettes~Palette>
# PaletteMapping
Mapping of names to palette colors. For palette colors the possible options are:
- name of a built-in palette (e.g.
Blues
,Set1
, etc.). See defaultPalettes Array.<string>
of custom colors as strings- CustomPalette array of named colors, important for categorical data