Optional
range: Iterable<Range>An optional array of range values to initialize the scale with.
Constructs a new ordinal scale with the specified range. The domain defaults to the empty array. If range is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined.
The first generic corresponds to the data type of domain elements. The second generic corresponds to the data type of range elements. The third generic corresponds to the data type of the unknown value.
Optional
range: Iterable<Range>An optional array of range values to initialize the scale with.
Constructs a new ordinal scale with the specified domain and range.
The first generic corresponds to the data type of domain elements. The second generic corresponds to the data type of range elements. The third generic corresponds to the data type of the unknown value.
Array of domain values.
An optional array of range values to initialize the scale with.
Constructs a new ordinal scale with the specified range. The domain defaults to the empty array. If range is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined.
The generic corresponds to the data type of range elements.