Struct vega_lite_4::SchemeParamsBuilder
source · pub struct SchemeParamsBuilder { /* private fields */ }
Expand description
Builder for SchemeParams
.
Implementations§
source§impl SchemeParamsBuilder
impl SchemeParamsBuilder
sourcepub fn count<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn count<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The number of colors to use in the scheme. This can be useful for scale types such as
"quantize"
, which use the length of the scale range to determine the number of discrete
bins for the scale domain.
sourcepub fn extent<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
pub fn extent<VALUE: Into<Vec<f64>>>(&mut self, value: VALUE) -> &mut Self
The extent of the color range to use. For example [0.2, 1]
will rescale the color
scheme such that color values in the range [0, 0.2) are excluded from the scheme.
sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
A color scheme name for ordinal scales (e.g., "category10"
or "blues"
).
For the full list of supported schemes, please refer to the Vega Scheme reference.
sourcepub fn expr<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn expr<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Vega expression (which can refer to Vega-Lite parameters).
sourcepub fn build(&self) -> Result<SchemeParams, SchemeParamsBuilderError>
pub fn build(&self) -> Result<SchemeParams, SchemeParamsBuilderError>
Trait Implementations§
source§impl Clone for SchemeParamsBuilder
impl Clone for SchemeParamsBuilder
source§fn clone(&self) -> SchemeParamsBuilder
fn clone(&self) -> SchemeParamsBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for SchemeParamsBuilder
impl Send for SchemeParamsBuilder
impl Sync for SchemeParamsBuilder
impl Unpin for SchemeParamsBuilder
impl UnwindSafe for SchemeParamsBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more