pub struct LayerEncoding {
Show 35 fields pub angle: Option<AngleClass>, pub color: Option<ColorClass>, pub description: Option<DescriptionClass>, pub detail: Option<Detail>, pub fill: Option<FillClass>, pub fill_opacity: Option<FillOpacityClass>, pub href: Option<HrefClass>, pub key: Option<KeyClass>, pub latitude: Option<LatitudeClass>, pub latitude2: Option<Latitude2Class>, pub longitude: Option<LongitudeClass>, pub longitude2: Option<Longitude2Class>, pub opacity: Option<OpacityClass>, pub order: Option<Order>, pub radius: Option<RadiusClass>, pub radius2: Option<Radius2Class>, pub shape: Option<MarkPropDefStringNullTypeForShape>, pub size: Option<SizeClass>, pub stroke: Option<StrokeClass>, pub stroke_dash: Option<MarkPropDefNumber>, pub stroke_opacity: Option<StrokeOpacityClass>, pub stroke_width: Option<StrokeWidthClass>, pub text: Option<TextDef>, pub theta: Option<ThetaClass>, pub theta2: Option<Theta2Class>, pub tooltip: Option<EncodingTooltip>, pub url: Option<UrlClass>, pub x: Option<XClass>, pub x2: Option<X2Class>, pub x_error: Option<XErrorClass>, pub x_error2: Option<XError2Class>, pub y: Option<YClass>, pub y2: Option<Y2Class>, pub y_error: Option<YErrorClass>, pub y_error2: Option<YError2Class>,
}
Expand description

A shared key-value mapping between encoding channels and definition of fields in the underlying layers.

A key-value mapping between encoding channels and definition of fields.

Fields§

§angle: Option<AngleClass>

Rotation angle of point and text marks.

§color: Option<ColorClass>

Color of the marks – either fill or stroke color based on the filled property of mark definition. By default, color represents fill color for "area", "bar", "tick", "text", "trail", "circle", and "square" / stroke color for "line" and "point".

Default value: If undefined, the default color depends on mark config’s color property.

Note: 1) For fine-grained control over both fill and stroke colors of the marks, please use the fill and stroke channels. The fill or stroke encodings have higher precedence than color, thus may override the color encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing color scheme.

§description: Option<DescriptionClass>

A text description of this mark for ARIA accessibility (SVG output only). For SVG output the "aria-label" attribute will be set to this description.

§detail: Option<Detail>

Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel.

§fill: Option<FillClass>

Fill color of the marks. Default value: If undefined, the default color depends on mark config’s color property.

Note: The fill encoding has higher precedence than color, thus may override the color encoding if conflicting encodings are specified.

§fill_opacity: Option<FillOpacityClass>

Fill opacity of the marks.

Default value: If undefined, the default opacity depends on mark config’s fillOpacity property.

§href: Option<HrefClass>

A URL to load upon mouse click.

§key: Option<KeyClass>

A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data.

§latitude: Option<LatitudeClass>

Latitude position of geographically projected marks.

§latitude2: Option<Latitude2Class>

Latitude-2 position for geographically projected ranged "area", "bar", "rect", and "rule".

§longitude: Option<LongitudeClass>

Longitude position of geographically projected marks.

§longitude2: Option<Longitude2Class>

Longitude-2 position for geographically projected ranged "area", "bar", "rect", and "rule".

§opacity: Option<OpacityClass>

Opacity of the marks.

Default value: If undefined, the default opacity depends on mark config’s opacity property.

§order: Option<Order>

Order of the marks. - For stacked marks, this order channel encodes stack order. - For line and trail marks, this order channel encodes order of data points in the lines. This can be useful for creating a connected scatterplot. Setting order to {"value": null} makes the line marks use the original order in the data sources. - Otherwise, this order channel encodes layer order of the marks.

Note: In aggregate plots, order field should be aggregated to avoid creating additional aggregation grouping.

§radius: Option<RadiusClass>

The outer radius in pixels of arc marks.

§radius2: Option<Radius2Class>

The inner radius in pixels of arc marks.

§shape: Option<MarkPropDefStringNullTypeForShape>

Shape of the mark.

  1. For point marks the supported values include: - plotting shapes: "circle", "square", "cross", "diamond", "triangle-up", "triangle-down", "triangle-right", or "triangle-left". - the line symbol "stroke" - centered directional shapes "arrow", "wedge", or "triangle" - a custom SVG path string (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)

  2. For geoshape marks it should be a field definition of the geojson data

Default value: If undefined, the default shape depends on mark config’s shape property. ("circle" if unset.)

§size: Option<SizeClass>

Size of the mark. - For "point", "square" and "circle", – the symbol size, or pixel area of the mark. - For "bar" and "tick" – the bar and tick’s size. - For "text" – the text’s font size. - Size is unsupported for "line", "area", and "rect". (Use "trail" instead of line with varying size)

§stroke: Option<StrokeClass>

Stroke color of the marks. Default value: If undefined, the default color depends on mark config’s color property.

Note: The stroke encoding has higher precedence than color, thus may override the color encoding if conflicting encodings are specified.

§stroke_dash: Option<MarkPropDefNumber>

Stroke dash of the marks.

Default value: [1,0] (No dash).

§stroke_opacity: Option<StrokeOpacityClass>

Stroke opacity of the marks.

Default value: If undefined, the default opacity depends on mark config’s strokeOpacity property.

§stroke_width: Option<StrokeWidthClass>

Stroke width of the marks.

Default value: If undefined, the default stroke width depends on mark config’s strokeWidth property.

§text: Option<TextDef>

Text of the text mark.

§theta: Option<ThetaClass>
  • For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

  • For text marks, polar coordinate angle in radians.

§theta2: Option<Theta2Class>

The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.

§tooltip: Option<EncodingTooltip>

The tooltip text to show upon mouse hover. Specifying tooltip encoding overrides the tooltip property in the mark definition.

See the tooltip documentation for a detailed discussion about tooltip in Vega-Lite.

§url: Option<UrlClass>

The URL of an image mark.

§x: Option<XClass>

X coordinates of the marks, or width of horizontal "bar" and "area" without specified x2 or width.

The value of this channel can be a number or a string "width" for the width of the plot.

§x2: Option<X2Class>

X2 coordinates for ranged "area", "bar", "rect", and "rule".

The value of this channel can be a number or a string "width" for the width of the plot.

§x_error: Option<XErrorClass>

Error value of x coordinates for error specified "errorbar" and "errorband".

§x_error2: Option<XError2Class>

Secondary error value of x coordinates for error specified "errorbar" and "errorband".

§y: Option<YClass>

Y coordinates of the marks, or height of vertical "bar" and "area" without specified y2 or height.

The value of this channel can be a number or a string "height" for the height of the plot.

§y2: Option<Y2Class>

Y2 coordinates for ranged "area", "bar", "rect", and "rule".

The value of this channel can be a number or a string "height" for the height of the plot.

§y_error: Option<YErrorClass>

Error value of y coordinates for error specified "errorbar" and "errorband".

§y_error2: Option<YError2Class>

Secondary error value of y coordinates for error specified "errorbar" and "errorband".

Trait Implementations§

source§

impl Clone for LayerEncoding

source§

fn clone(&self) -> LayerEncoding

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 LayerEncoding

source§

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

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

impl Default for LayerEncoding

source§

fn default() -> LayerEncoding

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

impl<'de> Deserialize<'de> for LayerEncoding

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 LayerEncoding

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