Struct vega_lite_4::ViewConfig

source ·
pub struct ViewConfig {
Show 21 fields pub clip: Option<bool>, pub continuous_height: Option<f64>, pub continuous_width: Option<f64>, pub corner_radius: Option<CornerRadiusUnion>, pub cursor: Option<Cursor>, pub discrete_height: Option<DiscreteHeightUnion>, pub discrete_width: Option<DiscreteWidthUnion>, pub fill: Option<Box<Color>>, pub fill_opacity: Option<Opacity>, pub height: Option<f64>, pub opacity: Option<CornerRadiusUnion>, pub step: Option<f64>, pub stroke: RemovableValue<Color>, pub stroke_cap: Option<Cap>, pub stroke_dash: Option<StrokeDashUnion>, pub stroke_dash_offset: Option<CornerRadiusUnion>, pub stroke_join: Option<StrokeJoinUnion>, pub stroke_miter_limit: Option<CornerRadiusUnion>, pub stroke_opacity: Option<Opacity>, pub stroke_width: Option<FontSize>, pub width: Option<f64>,
}
Expand description

Default properties for single view plots.

Fields§

§clip: Option<bool>

Whether the view should be clipped.

§continuous_height: Option<f64>

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

Default value: 200

§continuous_width: Option<f64>

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

Default value: 200

§corner_radius: Option<CornerRadiusUnion>§cursor: Option<Cursor>

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

§discrete_height: Option<DiscreteHeightUnion>

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.

§discrete_width: Option<DiscreteWidthUnion>

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.

§fill: Option<Box<Color>>

The fill color.

Default value: undefined

§fill_opacity: Option<Opacity>§height: Option<f64>

Default height

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

§opacity: Option<CornerRadiusUnion>

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.

§step: Option<f64>

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

§stroke: RemovableValue<Color>

The stroke color.

Default value: "#ddd"

§stroke_cap: Option<Cap>§stroke_dash: Option<StrokeDashUnion>§stroke_dash_offset: Option<CornerRadiusUnion>§stroke_join: Option<StrokeJoinUnion>§stroke_miter_limit: Option<CornerRadiusUnion>§stroke_opacity: Option<Opacity>§stroke_width: Option<FontSize>§width: Option<f64>

Default width

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

Trait Implementations§

source§

impl Clone for ViewConfig

source§

fn clone(&self) -> ViewConfig

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 ViewConfig

source§

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

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

impl Default for ViewConfig

source§

fn default() -> ViewConfig

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

impl<'de> Deserialize<'de> for ViewConfig

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 Serialize for ViewConfig

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