Struct vega_lite_4::BinParams

source ·
pub struct BinParams {
    pub anchor: Option<f64>,
    pub base: Option<f64>,
    pub binned: Option<bool>,
    pub divide: Option<Vec<f64>>,
    pub extent: Option<BinExtent>,
    pub maxbins: Option<f64>,
    pub minstep: Option<f64>,
    pub nice: Option<bool>,
    pub step: Option<f64>,
    pub steps: Option<Vec<f64>>,
}
Expand description

Binning properties or boolean flag for determining whether to bin data or not.

Fields§

§anchor: Option<f64>

A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.

Default value: the minimum bin extent value

§base: Option<f64>

The number base to use for automatic bin determination (default is base 10).

Default value: 10

§binned: Option<bool>

When set to true, Vega-Lite treats the input data as already binned.

§divide: Option<Vec<f64>>

Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.

Default value: [5, 2]

§extent: Option<BinExtent>

A two-element ([min, max]) array indicating the range of desired bin values.

§maxbins: Option<f64>

Maximum number of bins.

Default value: 6 for row, column and shape channels; 10 for other channels

§minstep: Option<f64>

A minimum allowable step size (particularly useful for integer values).

§nice: Option<bool>

If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.

Default value: true

§step: Option<f64>

An exact step size to use between bins.

Note: If provided, options such as maxbins will be ignored.

§steps: Option<Vec<f64>>

An array of allowable step sizes to choose from.

Trait Implementations§

source§

impl Clone for BinParams

source§

fn clone(&self) -> BinParams

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 BinParams

source§

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

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

impl Default for BinParams

source§

fn default() -> BinParams

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BinParams

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<BinParams> for AngleBin

source§

fn from(original: BinParams) -> AngleBin

Converts to this type from the input type.
source§

impl From<BinParams> for DescriptionBin

source§

fn from(original: BinParams) -> DescriptionBin

Converts to this type from the input type.
source§

impl Serialize for BinParams

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>,