pub struct ViewConfigBuilder { /* private fields */ }
Expand description

Builder for ViewConfig.

Implementations§

source§

impl ViewConfigBuilder

source

pub fn clip<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self

Whether the view should be clipped.

source

pub fn continuous_height<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

The default height when the plot has a continuous y-field for x or latitude, or has arc marks.

Default value: 200

source

pub fn continuous_width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

The default width when the plot has a continuous field for x or longitude, or has arc marks.

Default value: 200

source

pub fn corner_radius<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn cursor<VALUE: Into<Cursor>>(&mut self, value: VALUE) -> &mut Self

The mouse cursor used over the view. Any valid CSS cursor type can be used.

source

pub fn discrete_height<VALUE: Into<DiscreteHeightUnion>>( &mut self, value: VALUE ) -> &mut Self

The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of {step: number} defining the height per discrete step.

Default value: a step size based on config.view.step.

source

pub fn discrete_width<VALUE: Into<DiscreteWidthUnion>>( &mut self, value: VALUE ) -> &mut Self

The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of {step: number} defining the width per discrete step.

Default value: a step size based on config.view.step.

source

pub fn fill<VALUE: Into<Box<Color>>>(&mut self, value: VALUE) -> &mut Self

The fill color.

Default value: undefined

source

pub fn fill_opacity<VALUE: Into<Opacity>>(&mut self, value: VALUE) -> &mut Self

source

pub fn height<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Default height

Deprecated: Since Vega-Lite 4.0. Please use continuousHeight and discreteHeight instead.

source

pub fn opacity<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self

The overall opacity (value between [0,1]).

Default value: 0.7 for non-aggregate plots with point, tick, circle, or square marks or layered bar charts and 1 otherwise.

source

pub fn step<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Default step size for x-/y- discrete fields.

source

pub fn stroke<VALUE: Into<RemovableValue<Color>>>( &mut self, value: VALUE ) -> &mut Self

The stroke color.

Default value: "#ddd"

source

pub fn stroke_cap<VALUE: Into<Cap>>(&mut self, value: VALUE) -> &mut Self

source

pub fn stroke_dash<VALUE: Into<StrokeDashUnion>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn stroke_dash_offset<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn stroke_join<VALUE: Into<StrokeJoinUnion>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn stroke_miter_limit<VALUE: Into<CornerRadiusUnion>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn stroke_opacity<VALUE: Into<Opacity>>( &mut self, value: VALUE ) -> &mut Self

source

pub fn stroke_width<VALUE: Into<FontSize>>(&mut self, value: VALUE) -> &mut Self

source

pub fn width<VALUE: Into<f64>>(&mut self, value: VALUE) -> &mut Self

Default width

Deprecated: Since Vega-Lite 4.0. Please use continuousWidth and discreteWidth instead.

source

pub fn build(&self) -> Result<ViewConfig, ViewConfigBuilderError>

Builds a new ViewConfig.

Errors

If a required field has not been initialized.

Trait Implementations§

source§

impl Clone for ViewConfigBuilder

source§

fn clone(&self) -> ViewConfigBuilder

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 Default for ViewConfigBuilder

source§

fn default() -> Self

Returns the “default value” for a type. 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.