pub enum ScaleRange {
    Enum(RangeEnum),
    RangeClass(RangeClass),
    UnionArray(Vec<FluffyRange>),
}
Expand description

The range of the scale. One of:

  • A string indicating a pre-defined named scale range (e.g., example, "symbol", or "diverging").

  • For continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a piecewise scale.

  • For discrete and discretizing scales, an array of desired output values or an object with a field property representing the range values. For example, if a field color contains CSS color names, we can set range to {field: "color"}.

Notes:

  1. For color scales you can also specify a color scheme instead of range.

  2. Any directly specified range for x and y channels will be ignored. Range can be customized via the view’s corresponding size (width and height).

Variants§

§

Enum(RangeEnum)

§

RangeClass(RangeClass)

§

UnionArray(Vec<FluffyRange>)

Trait Implementations§

source§

impl Clone for ScaleRange

source§

fn clone(&self) -> ScaleRange

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ScaleRange

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ScaleRange

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<[&str; 1]> for ScaleRange

source§

fn from(v: [&str; 1]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 10]> for ScaleRange

source§

fn from(v: [&str; 10]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 11]> for ScaleRange

source§

fn from(v: [&str; 11]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 12]> for ScaleRange

source§

fn from(v: [&str; 12]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 13]> for ScaleRange

source§

fn from(v: [&str; 13]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 14]> for ScaleRange

source§

fn from(v: [&str; 14]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 15]> for ScaleRange

source§

fn from(v: [&str; 15]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 16]> for ScaleRange

source§

fn from(v: [&str; 16]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 17]> for ScaleRange

source§

fn from(v: [&str; 17]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 18]> for ScaleRange

source§

fn from(v: [&str; 18]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 19]> for ScaleRange

source§

fn from(v: [&str; 19]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 2]> for ScaleRange

source§

fn from(v: [&str; 2]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 20]> for ScaleRange

source§

fn from(v: [&str; 20]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 21]> for ScaleRange

source§

fn from(v: [&str; 21]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 22]> for ScaleRange

source§

fn from(v: [&str; 22]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 23]> for ScaleRange

source§

fn from(v: [&str; 23]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 24]> for ScaleRange

source§

fn from(v: [&str; 24]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 25]> for ScaleRange

source§

fn from(v: [&str; 25]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 26]> for ScaleRange

source§

fn from(v: [&str; 26]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 27]> for ScaleRange

source§

fn from(v: [&str; 27]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 28]> for ScaleRange

source§

fn from(v: [&str; 28]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 29]> for ScaleRange

source§

fn from(v: [&str; 29]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 3]> for ScaleRange

source§

fn from(v: [&str; 3]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 30]> for ScaleRange

source§

fn from(v: [&str; 30]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 31]> for ScaleRange

source§

fn from(v: [&str; 31]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 32]> for ScaleRange

source§

fn from(v: [&str; 32]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 4]> for ScaleRange

source§

fn from(v: [&str; 4]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 5]> for ScaleRange

source§

fn from(v: [&str; 5]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 6]> for ScaleRange

source§

fn from(v: [&str; 6]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 7]> for ScaleRange

source§

fn from(v: [&str; 7]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 8]> for ScaleRange

source§

fn from(v: [&str; 8]) -> Self

Converts to this type from the input type.
source§

impl From<[&str; 9]> for ScaleRange

source§

fn from(v: [&str; 9]) -> Self

Converts to this type from the input type.
source§

impl From<RangeClass> for ScaleRange

source§

fn from(original: RangeClass) -> ScaleRange

Converts to this type from the input type.
source§

impl From<RangeEnum> for ScaleRange

source§

fn from(original: RangeEnum) -> ScaleRange

Converts to this type from the input type.
source§

impl From<Vec<&str, Global>> for ScaleRange

source§

fn from(v: Vec<&str>) -> Self

Converts to this type from the input type.
source§

impl From<Vec<FluffyRange, Global>> for ScaleRange

source§

fn from(original: Vec<FluffyRange>) -> ScaleRange

Converts to this type from the input type.
source§

impl From<Vec<String, Global>> for ScaleRange

source§

fn from(v: Vec<String>) -> Self

Converts to this type from the input type.
source§

impl Serialize for ScaleRange

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,