Struct vega_lite_4::ScaleConfigBuilder
source · pub struct ScaleConfigBuilder { /* private fields */ }
Expand description
Builder for ScaleConfig
.
Implementations§
source§impl ScaleConfigBuilder
impl ScaleConfigBuilder
sourcepub fn band_padding_inner<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn band_padding_inner<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self
Default inner padding for x
and y
band-ordinal scales.
Default value: - barBandPaddingInner
for bar marks (0.1
by default) -
rectBandPaddingInner
for rect and other marks (0
by default)
sourcepub fn band_padding_outer<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn band_padding_outer<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self
Default outer padding for x
and y
band-ordinal scales.
Default value: paddingInner/2
(which makes _width/height = number of unique values
- step_)
sourcepub fn bar_band_padding_inner<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn bar_band_padding_inner<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self
Default inner padding for x
and y
band-ordinal scales of "bar"
marks.
Default value: 0.1
sourcepub fn clamp<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
pub fn clamp<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
If true, values that exceed the data domain are clamped to either the minimum or maximum range value
sourcepub fn continuous_padding<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn continuous_padding<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self
Default padding for continuous scales.
Default: 5
for continuous x-scale of a vertical bar and continuous y-scale of a
horizontal bar.; 0
otherwise.
sourcepub fn max_band_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn max_band_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The default max value for mapping quantitative fields to bar’s size/bandSize.
If undefined (default), we will use the axis’s size (width or height) - 1.
sourcepub fn max_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn max_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The default max value for mapping quantitative fields to text’s size/fontSize.
Default value: 40
sourcepub fn max_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn max_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default max opacity for mapping a field to opacity.
Default value: 0.8
sourcepub fn max_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn max_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default max value for point size scale.
sourcepub fn max_stroke_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn max_stroke_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.
Default value: 4
sourcepub fn min_band_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_band_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The default min value for mapping quantitative fields to bar and tick’s size/bandSize scale with zero=false.
Default value: 2
sourcepub fn min_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_font_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
The default min value for mapping quantitative fields to tick’s size/fontSize scale with zero=false
Default value: 8
sourcepub fn min_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_opacity<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default minimum opacity for mapping a field to opacity.
Default value: 0.3
sourcepub fn min_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_size<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default minimum value for point size scale with zero=false.
Default value: 9
sourcepub fn min_stroke_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn min_stroke_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks with zero=false.
Default value: 1
sourcepub fn point_padding<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn point_padding<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self
Default outer padding for x
and y
point-ordinal scales.
Default value: 0.5
(which makes width/height = number of unique values * step)
sourcepub fn quantile_count<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn quantile_count<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default range cardinality for
quantile
scale.
Default value: 4
sourcepub fn quantize_count<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
pub fn quantize_count<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self
Default range cardinality for
quantize
scale.
Default value: 4
sourcepub fn rect_band_padding_inner<VALUE: Into<CornerRadiusUnion>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn rect_band_padding_inner<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self
Default inner padding for x
and y
band-ordinal scales of "rect"
marks.
Default value: 0
sourcepub fn round<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
pub fn round<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
If true, rounds numeric output values to integers. This can be helpful for snapping to
the pixel grid. (Only available for x
, y
, and size
scales.)
sourcepub fn use_unaggregated_domain<VALUE: Into<bool>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn use_unaggregated_domain<VALUE: Into<bool>>( &mut self, value: VALUE ) -> &mut Self
Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.
This is equivalent to setting domain
to "unaggregate"
for aggregated quantitative
fields by default.
This property only works with aggregate functions that produce values within the raw data
domain ("mean"
, "average"
, "median"
, "q1"
, "q3"
, "min"
, "max"
). For other
aggregations that produce values outside of the raw data domain (e.g. "count"
,
"sum"
), this property is ignored.
Default value: false
sourcepub fn x_reverse<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
pub fn x_reverse<VALUE: Into<Aria>>(&mut self, value: VALUE) -> &mut Self
Reverse x-scale by default (useful for right-to-left charts).
sourcepub fn build(&self) -> Result<ScaleConfig, ScaleConfigBuilderError>
pub fn build(&self) -> Result<ScaleConfig, ScaleConfigBuilderError>
Trait Implementations§
source§impl Clone for ScaleConfigBuilder
impl Clone for ScaleConfigBuilder
source§fn clone(&self) -> ScaleConfigBuilder
fn clone(&self) -> ScaleConfigBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more