Struct vega_lite_4::BinParamsBuilder
source · pub struct BinParamsBuilder { /* private fields */ }
Expand description
Builder for BinParams
.
Implementations§
source§impl BinParamsBuilder
impl BinParamsBuilder
sourcepub fn anchor<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn anchor<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
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
sourcepub fn base<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn base<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The number base to use for automatic bin determination (default is base 10).
Default value: 10
sourcepub fn binned<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn binned<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
When set to true
, Vega-Lite treats the input data as already binned.
sourcepub fn divide<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn divide<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
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]
sourcepub fn extent<VALUE: Into<BinExtent>>(&mut self, value: VALUE) -> &mut Self
pub fn extent<VALUE: Into<BinExtent>>(&mut self, value: VALUE) -> &mut Self
A two-element ([min, max]
) array indicating the range of desired bin values.
sourcepub fn maxbins<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn maxbins<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Maximum number of bins.
Default value: 6
for row
, column
and shape
channels; 10
for other channels
sourcepub fn minstep<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn minstep<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
A minimum allowable step size (particularly useful for integer values).
sourcepub fn nice<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn nice<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.
Default value: true
sourcepub fn step<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn step<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
An exact step size to use between bins.
Note: If provided, options such as maxbins will be ignored.
Trait Implementations§
source§impl Clone for BinParamsBuilder
impl Clone for BinParamsBuilder
source§fn clone(&self) -> BinParamsBuilder
fn clone(&self) -> BinParamsBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more