Class ColorCalculator

Overrides the color selection algorithm, replacing it with a simple function.

Normally colors will be determined by calling the colorAccessor to get a value, and then passing that value through the colorScale.

But sometimes it is difficult to get a color scale to produce the desired effect. The colorCalculator takes the datum and index and returns a color directly.

Hierarchy

Constructors

Properties

Methods - Ninja

Constructors

Properties

colorAccessor: BaseAccessor<string>

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

getColor: BaseAccessor<string>

Ninja Methods

Generated using TypeDoc