Struct vega_lite_4::Config

source ·
pub struct Config {
Show 66 fields pub arc: Option<RectConfig>, pub area: Option<AreaConfig>, pub aria: Option<bool>, pub autosize: Option<Box<Autosize>>, pub axis: Option<AxisConfig>, pub axis_band: Option<AxisConfig>, pub axis_bottom: Option<AxisConfig>, pub axis_discrete: Option<AxisConfig>, pub axis_left: Option<AxisConfig>, pub axis_point: Option<AxisConfig>, pub axis_quantitative: Option<AxisConfig>, pub axis_right: Option<AxisConfig>, pub axis_temporal: Option<AxisConfig>, pub axis_top: Option<AxisConfig>, pub axis_x: Option<AxisConfig>, pub axis_x_band: Option<AxisConfig>, pub axis_x_discrete: Option<AxisConfig>, pub axis_x_point: Option<AxisConfig>, pub axis_x_quantitative: Option<AxisConfig>, pub axis_x_temporal: Option<AxisConfig>, pub axis_y: Option<AxisConfig>, pub axis_y_band: Option<AxisConfig>, pub axis_y_discrete: Option<AxisConfig>, pub axis_y_point: Option<AxisConfig>, pub axis_y_quantitative: Option<AxisConfig>, pub axis_y_temporal: Option<AxisConfig>, pub background: Option<Box<Color>>, pub bar: Option<BarConfig>, pub boxplot: Option<BoxPlotConfig>, pub circle: Option<MarkConfig>, pub concat: Option<CompositionConfig>, pub count_title: Option<String>, pub custom_format_types: Option<bool>, pub errorband: Option<ErrorBandConfig>, pub errorbar: Option<ErrorBarConfig>, pub facet: Option<CompositionConfig>, pub field_title: Option<FieldTitle>, pub font: Option<String>, pub geoshape: Option<MarkConfig>, pub header: Option<HeaderConfig>, pub header_column: Option<HeaderConfig>, pub header_facet: Option<HeaderConfig>, pub header_row: Option<HeaderConfig>, pub image: Option<RectConfig>, pub legend: Option<LegendConfig>, pub line: Option<LineConfig>, pub line_break: Option<Box<Color>>, pub mark: Option<MarkConfig>, pub number_format: Option<String>, pub padding: Option<Box<Padding>>, pub params: Option<Vec<Parameter>>, pub point: Option<MarkConfig>, pub projection: Option<Box<Projection>>, pub range: Option<HashMap<String, RangeValue>>, pub rect: Option<RectConfig>, pub rule: Option<MarkConfig>, pub scale: Option<ScaleConfig>, pub selection: Option<SelectionConfig>, pub square: Option<MarkConfig>, pub style: Option<HashMap<String, StyleValue>>, pub text: Option<MarkConfig>, pub tick: Option<TickConfig>, pub time_format: Option<String>, pub title: Option<BaseTitleNoValueRefs>, pub trail: Option<LineConfig>, pub view: Option<ViewConfig>,
}
Expand description

Vega-Lite configuration object. This property can only be defined at the top-level of a specification.

Fields§

§arc: Option<RectConfig>

Arc-specific Config

§area: Option<AreaConfig>

Area-Specific Config

§aria: Option<bool>

A boolean flag indicating if ARIA default attributes should be included for marks and guides (SVG output only). If false, the "aria-hidden" attribute will be set for all guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate default descriptions for marks.

Default value: true.

§autosize: Option<Box<Autosize>>

How the visualization size should be determined. If a string, should be one of "pad", "fit" or "none". Object values can additionally specify parameters for content sizing and automatic resizing.

Default value: pad

§axis: Option<AxisConfig>

Axis configuration, which determines default properties for all x and y axes. For a full list of axis configuration options, please see the corresponding section of the axis documentation.

§axis_band: Option<AxisConfig>

Config for axes with “band” scales.

§axis_bottom: Option<AxisConfig>

Config for x-axis along the bottom edge of the chart.

§axis_discrete: Option<AxisConfig>

Config for axes with “point” or “band” scales.

§axis_left: Option<AxisConfig>

Config for y-axis along the left edge of the chart.

§axis_point: Option<AxisConfig>

Config for axes with “point” scales.

§axis_quantitative: Option<AxisConfig>

Config for quantitative axes.

§axis_right: Option<AxisConfig>

Config for y-axis along the right edge of the chart.

§axis_temporal: Option<AxisConfig>

Config for temporal axes.

§axis_top: Option<AxisConfig>

Config for x-axis along the top edge of the chart.

§axis_x: Option<AxisConfig>

X-axis specific config.

§axis_x_band: Option<AxisConfig>

Config for x-axes with “band” scales.

§axis_x_discrete: Option<AxisConfig>

Config for x-axes with “point” or “band” scales.

§axis_x_point: Option<AxisConfig>

Config for x-axes with “point” scales.

§axis_x_quantitative: Option<AxisConfig>

Config for x-quantitative axes.

§axis_x_temporal: Option<AxisConfig>

Config for x-temporal axes.

§axis_y: Option<AxisConfig>

Y-axis specific config.

§axis_y_band: Option<AxisConfig>

Config for y-axes with “band” scales.

§axis_y_discrete: Option<AxisConfig>

Config for y-axes with “point” or “band” scales.

§axis_y_point: Option<AxisConfig>

Config for y-axes with “point” scales.

§axis_y_quantitative: Option<AxisConfig>

Config for y-quantitative axes.

§axis_y_temporal: Option<AxisConfig>

Config for y-temporal axes.

§background: Option<Box<Color>>

CSS color property to use as the background of the entire view.

Default value: "white"

§bar: Option<BarConfig>

Bar-Specific Config

§boxplot: Option<BoxPlotConfig>

Box Config

§circle: Option<MarkConfig>

Circle-Specific Config

§concat: Option<CompositionConfig>

Default configuration for all concatenation and repeat view composition operators (concat, hconcat, vconcat, and repeat)

§count_title: Option<String>

Default axis and legend title for count fields.

Default value: 'Count of Records.

§custom_format_types: Option<bool>

Allow the formatType property for text marks and guides to accept a custom formatter function registered as a Vega expression.

§errorband: Option<ErrorBandConfig>

ErrorBand Config

§errorbar: Option<ErrorBarConfig>

ErrorBar Config

§facet: Option<CompositionConfig>

Default configuration for the facet view composition operator

§field_title: Option<FieldTitle>

Defines how Vega-Lite generates title for fields. There are three possible styles: - "verbal" (Default) - displays function in a verbal style (e.g., “Sum of field”, “Year-month of date”, “field (binned)”). - "function" - displays function using parentheses and capitalized texts (e.g., “SUM(field)”, “YEARMONTH(date)”, “BIN(field)”).

  • "plain" - displays only the field name without functions (e.g., “field”, “date”, “field”).
§font: Option<String>

Default font for all text marks, titles, and labels.

§geoshape: Option<MarkConfig>

Geoshape-Specific Config

§header: Option<HeaderConfig>

Header configuration, which determines default properties for all headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

§header_column: Option<HeaderConfig>

Header configuration, which determines default properties for column headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

§header_facet: Option<HeaderConfig>

Header configuration, which determines default properties for non-row/column facet headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

§header_row: Option<HeaderConfig>

Header configuration, which determines default properties for row headers.

For a full list of header configuration options, please see the corresponding section of in the header documentation.

§image: Option<RectConfig>

Image-specific Config

§legend: Option<LegendConfig>

Legend configuration, which determines default properties for all legends. For a full list of legend configuration options, please see the corresponding section of in the legend documentation.

§line: Option<LineConfig>

Line-Specific Config

§line_break: Option<Box<Color>>

A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property provides a global default for text marks, which is overridden by mark or style config settings, and by the lineBreak mark encoding channel. If signal-valued, either string or regular expression (regexp) values are valid.

§mark: Option<MarkConfig>

Mark Config

§number_format: Option<String>

D3 Number format for guide labels and text marks. For example "s" for SI units. Use D3’s number format pattern.

§padding: Option<Box<Padding>>

The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format {"left": 5, "top": 5, "right": 5, "bottom": 5} to specify padding for each side of the visualization.

Default value: 5

§params: Option<Vec<Parameter>>

Dynamic variables that parameterize a visualization.

§point: Option<MarkConfig>

Point-Specific Config

§projection: Option<Box<Projection>>

Projection configuration, which determines default properties for all projections. For a full list of projection configuration options, please see the corresponding section of the projection documentation.

§range: Option<HashMap<String, RangeValue>>

An object hash that defines default range arrays or schemes for using with scales. For a full list of scale range configuration options, please see the corresponding section of the scale documentation.

§rect: Option<RectConfig>

Rect-Specific Config

§rule: Option<MarkConfig>

Rule-Specific Config

§scale: Option<ScaleConfig>

Scale configuration determines default properties for all scales. For a full list of scale configuration options, please see the corresponding section of the scale documentation.

§selection: Option<SelectionConfig>

An object hash for defining default properties for each type of selections.

§square: Option<MarkConfig>

Square-Specific Config

§style: Option<HashMap<String, StyleValue>>

An object hash that defines key-value mappings to determine default properties for marks with a given style. The keys represent styles names; the values have to be valid mark configuration objects.

§text: Option<MarkConfig>

Text-Specific Config

§tick: Option<TickConfig>

Tick-Specific Config

§time_format: Option<String>

Default time format for raw time values (without time units) in text marks, legend labels and header labels.

Default value: "%b %d, %Y" Note: Axes automatically determine the format for each label automatically so this config does not affect axes.

§title: Option<BaseTitleNoValueRefs>

Title configuration, which determines default properties for all titles. For a full list of title configuration options, please see the corresponding section of the title documentation.

§trail: Option<LineConfig>

Trail-Specific Config

§view: Option<ViewConfig>

Default properties for single view plots.

Trait Implementations§

source§

impl Clone for Config

source§

fn clone(&self) -> Config

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 Config

source§

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

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

impl Default for Config

source§

fn default() -> Config

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

impl<'de> Deserialize<'de> for Config

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 Config

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