# Gradient Formatter

Based on stops and colors, this formatter maps the value to an interpolated color.

The `config` follows this criteria: `{ stops: [0, 100, 230], colors: ['red', 'green', 'blue'] }`

If no config is specified, the default `colors` are `['rgba(123,86,219,0.4)', 'rgba(123,86,219,1)']`. The default `stops` are dependent on the DataSeries provided.

Given a DataSeries with n values, the stops would consist of [min, ...(configured stops),  max] if stops values are contained in [min, max] - recommended.
And min/max map to 'rgba(123,86,219,0.4)'/'rgba(123,86,219,1)', respectively.

For example, if 0 < value < 100, the corresponding interpolated color will be between red and green.

DataFrame (table) usage:
When the input is a DataFrame (for example, a table), the formatter computes a global min/max across
all numeric series in the frame. Those min/max are then used to build stops, and the formatter returns
a new DataFrame of type `'color'` with each numeric cell mapped to its interpolated color.

Minimal DSL example with a DataFrame in context as `table`:

If no `stops` are provided, they are derived from the global DataFrame min/max.

@extends AbstractFormatter<DataType, DataType>
