DivergingScale<R> constructor
DivergingScale<R> ({
- List<
double> ? domain, - required Interpolator<
R> interpolator, - bool clamp = false,
Creates a diverging scale with the given parameters.
Domain should have 3 values: min, mid, max
Implementation
DivergingScale({
List<double>? domain,
required Interpolator<R> interpolator,
bool clamp = false,
}) : _domain = domain ?? [0, 0.5, 1],
_interpolator = interpolator,
_clamp = clamp {
assert(_domain.length == 3,
'Diverging scale requires exactly 3 domain values');
}