ScaleQuantile<Y> class final Quantile scales

Quantile scales map a sampled input domain to a discrete range.

The domain is considered continuous and thus the scale will accept any reasonable input value; however, the domain is specified as a discrete set of sample values. The number of values in (the cardinality of) the output range determines the number of quantiles that will be computed from the domain. To compute the quantiles, the domain is sorted, and treated as a population of discrete values; see quantile. See this quantile choropleth for an example.

Implemented types

Constructors

ScaleQuantile.new({required List<num?> domain, required List<Y> range})
Constructs a new quantile scale with the specified domain and range.

Properties

domain List<num>
The scale's domain that specifies the input values.
getter/setter pairoverride
hashCode int
The hash code for this object.
no setterinherited
quantiles List<num>
Returns the quantile thresholds.
no setter
range List<Y>
The scale's range that specifies the output values.
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unknown ↔ Y?
getter/setter pair

Methods

call(num? x) → Y?
Given a value in the input domain, returns the corresponding value in the output range.
override
copy() ScaleQuantile<Y>
Returns an exact copy of this scale.
override
invertExtent(Y y) → (num, num)
Returns the extent of values in the domain (x0, x1) for the corresponding value in the range: the inverse of call.
nice([num count = 10]) → void
Extends the domain so that it starts and ends on nice round values.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
tickFormat([num count = 10, String? specifier]) String Function(num)
Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values.
inherited
ticks([num count = 10]) List<num>
Returns approximately count representative values from the scale’s domain.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited