Class OrdinalColors

Provide colors based on d3.scaleOrdinal.

This is most used option in dc charts and it is the default. It needs a list of colors which can be any CSS accepted color values.

Occasionally you would use one of the d3 supplied colors or color scales. Please see https://github.com/d3/d3-scale-chromatic, any of the schemes may be used as ordinal colors.

// TODO example

If a domain is set explicitly it maps the colors in sequence.

// TODO example

However, it is not mandatory to set a domain explicitly. If domain is not explicitly provided it keeps getting built as the scale is queried for new domain values.

// TODO example

Hierarchy

Constructors

Properties

Methods - Standard

Methods - Ninja

Constructors

Properties

colorAccessor: BaseAccessor<string>

Set or get color accessor function. Chart will assign this, not assigned in user code.

colorScale: BaseAccessor<string>

Standard Methods

  • Charts call this method to lookup actual colors. Rarely called in user code.

    Parameters

    • d: any
    • Optional i: number

    Returns string

Ninja Methods

Generated using TypeDoc