Module

palettes

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>

View Source palettes.js, line 114

Methods

# static assignPalettes(columns, palettes)

Parameters:
Name Type Description
columns Array.<module:columns.Column>

array of Column objects with information

palettes module:palettes~PaletteMapping

mapping of names to color palettes

View Source palettes.js, line 157

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

View Source palettes.js, line 5

string | Array.<string> | module:palettes~CustomPalette

# Palette

A palette specification.

View Source palettes.js, line 14

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

View Source palettes.js, line 19