pub struct LegendConfig {
Show 75 fields pub aria: Option<Aria>, pub clip_height: Option<CornerRadiusUnion>, pub column_padding: Option<CornerRadiusUnion>, pub columns: Option<CornerRadiusUnion>, pub corner_radius: Option<CornerRadiusUnion>, pub description: Option<Box<Color>>, pub direction: Option<Orientation>, pub disable: Option<bool>, pub fill_color: Option<Box<Color>>, pub gradient_direction: Option<Direction>, pub gradient_horizontal_max_length: Option<f64>, pub gradient_horizontal_min_length: Option<f64>, pub gradient_label_limit: Option<CornerRadiusUnion>, pub gradient_label_offset: Option<CornerRadiusUnion>, pub gradient_length: Option<FontSize>, pub gradient_opacity: Option<CornerRadiusUnion>, pub gradient_stroke_color: Option<Box<Color>>, pub gradient_stroke_width: Option<FontSize>, pub gradient_thickness: Option<FontSize>, pub gradient_vertical_max_length: Option<f64>, pub gradient_vertical_min_length: Option<f64>, pub grid_align: Option<GridAlign>, pub label_align: Option<TitleAlignUnion>, pub label_baseline: Option<TextBaseline>, pub label_color: Option<Box<Color>>, pub label_font: Option<Box<Color>>, pub label_font_size: Option<FontSize>, pub label_font_style: Option<Box<Color>>, pub label_font_weight: Option<FontWeightUnion>, pub label_limit: Option<CornerRadiusUnion>, pub label_offset: Option<CornerRadiusUnion>, pub label_opacity: Option<CornerRadiusUnion>, pub label_overlap: Option<LabelOverlapUnion>, pub label_padding: Option<CornerRadiusUnion>, pub label_separation: Option<CornerRadiusUnion>, pub layout: Option<BackgroundExprRef>, pub legend_x: Option<CornerRadiusUnion>, pub legend_y: Option<CornerRadiusUnion>, pub offset: Option<CornerRadiusUnion>, pub orient: Option<LegendOrient>, pub padding: Option<CornerRadiusUnion>, pub row_padding: Option<CornerRadiusUnion>, pub stroke_color: Option<Box<Color>>, pub stroke_dash: Option<StrokeDashUnion>, pub stroke_width: Option<CornerRadiusUnion>, pub symbol_base_fill_color: Option<Box<Color>>, pub symbol_base_stroke_color: Option<Box<Color>>, pub symbol_dash: Option<StrokeDashUnion>, pub symbol_dash_offset: Option<CornerRadiusUnion>, pub symbol_direction: Option<Direction>, pub symbol_fill_color: Option<Box<Color>>, pub symbol_limit: Option<CornerRadiusUnion>, pub symbol_offset: Option<CornerRadiusUnion>, pub symbol_opacity: Option<CornerRadiusUnion>, pub symbol_size: Option<FontSize>, pub symbol_stroke_color: Option<Box<Color>>, pub symbol_stroke_width: Option<FontSize>, pub symbol_type: Option<Box<Color>>, pub tick_count: Option<TickCount>, pub title: RemovableValue<Value>, pub title_align: Option<TitleAlignUnion>, pub title_anchor: Option<TitleAnchorUnion>, pub title_baseline: Option<TextBaseline>, pub title_color: Option<Box<Color>>, pub title_font: Option<Box<Color>>, pub title_font_size: Option<CornerRadiusUnion>, pub title_font_style: Option<Box<Color>>, pub title_font_weight: Option<FontWeightUnion>, pub title_limit: Option<FontSize>, pub title_line_height: Option<CornerRadiusUnion>, pub title_opacity: Option<CornerRadiusUnion>, pub title_orient: Option<TitleOrientUnion>, pub title_padding: Option<CornerRadiusUnion>, pub unselected_opacity: Option<f64>, pub zindex: Option<FontSize>,
}
Expand description

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.

Fields§

§aria: Option<Aria>§clip_height: Option<CornerRadiusUnion>§column_padding: Option<CornerRadiusUnion>§columns: Option<CornerRadiusUnion>§corner_radius: Option<CornerRadiusUnion>§description: Option<Box<Color>>§direction: Option<Orientation>

The direction of the legend, one of "vertical" or "horizontal".

Default value: - For top-/bottom-oriented legends, "horizontal" - For left-/right-oriented legends, "vertical" - For top/bottom-left/right-oriented legends, "horizontal" for gradient legends and "vertical" for symbol legends.

§disable: Option<bool>

Disable legend by default

§fill_color: Option<Box<Color>>§gradient_direction: Option<Direction>§gradient_horizontal_max_length: Option<f64>

Max legend length for a horizontal gradient when config.legend.gradientLength is undefined.

Default value: 200

§gradient_horizontal_min_length: Option<f64>

Min legend length for a horizontal gradient when config.legend.gradientLength is undefined.

Default value: 100

§gradient_label_limit: Option<CornerRadiusUnion>§gradient_label_offset: Option<CornerRadiusUnion>§gradient_length: Option<FontSize>§gradient_opacity: Option<CornerRadiusUnion>§gradient_stroke_color: Option<Box<Color>>§gradient_stroke_width: Option<FontSize>§gradient_thickness: Option<FontSize>§gradient_vertical_max_length: Option<f64>

Max legend length for a vertical gradient when config.legend.gradientLength is undefined.

Default value: 200

§gradient_vertical_min_length: Option<f64>

Min legend length for a vertical gradient when config.legend.gradientLength is undefined.

Default value: 100

§grid_align: Option<GridAlign>§label_align: Option<TitleAlignUnion>§label_baseline: Option<TextBaseline>§label_color: Option<Box<Color>>§label_font: Option<Box<Color>>§label_font_size: Option<FontSize>§label_font_style: Option<Box<Color>>§label_font_weight: Option<FontWeightUnion>§label_limit: Option<CornerRadiusUnion>§label_offset: Option<CornerRadiusUnion>§label_opacity: Option<CornerRadiusUnion>§label_overlap: Option<LabelOverlapUnion>

The strategy to use for resolving overlap of labels in gradient legends. If false, no overlap reduction is attempted. If set to true or "parity", a strategy of removing every other label is used. If set to "greedy", a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).

Default value: "greedy" for log scales otherwise true`.

§label_padding: Option<CornerRadiusUnion>§label_separation: Option<CornerRadiusUnion>§layout: Option<BackgroundExprRef>§legend_x: Option<CornerRadiusUnion>§legend_y: Option<CornerRadiusUnion>§offset: Option<CornerRadiusUnion>§orient: Option<LegendOrient>

The orientation of the legend, which determines how the legend is positioned within the scene. One of "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right", "none".

Default value: "right"

§padding: Option<CornerRadiusUnion>§row_padding: Option<CornerRadiusUnion>§stroke_color: Option<Box<Color>>§stroke_dash: Option<StrokeDashUnion>§stroke_width: Option<CornerRadiusUnion>§symbol_base_fill_color: Option<Box<Color>>§symbol_base_stroke_color: Option<Box<Color>>§symbol_dash: Option<StrokeDashUnion>§symbol_dash_offset: Option<CornerRadiusUnion>§symbol_direction: Option<Direction>§symbol_fill_color: Option<Box<Color>>§symbol_limit: Option<CornerRadiusUnion>§symbol_offset: Option<CornerRadiusUnion>§symbol_opacity: Option<CornerRadiusUnion>§symbol_size: Option<FontSize>§symbol_stroke_color: Option<Box<Color>>§symbol_stroke_width: Option<FontSize>§symbol_type: Option<Box<Color>>§tick_count: Option<TickCount>§title: RemovableValue<Value>

Set to null to disable title for the axis, legend, or header.

§title_align: Option<TitleAlignUnion>§title_anchor: Option<TitleAnchorUnion>§title_baseline: Option<TextBaseline>§title_color: Option<Box<Color>>§title_font: Option<Box<Color>>§title_font_size: Option<CornerRadiusUnion>§title_font_style: Option<Box<Color>>§title_font_weight: Option<FontWeightUnion>§title_limit: Option<FontSize>§title_line_height: Option<CornerRadiusUnion>§title_opacity: Option<CornerRadiusUnion>§title_orient: Option<TitleOrientUnion>§title_padding: Option<CornerRadiusUnion>§unselected_opacity: Option<f64>

The opacity of unselected legend entries.

Default value: 0.35.

§zindex: Option<FontSize>

Trait Implementations§

source§

impl Clone for LegendConfig

source§

fn clone(&self) -> LegendConfig

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 LegendConfig

source§

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

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

impl Default for LegendConfig

source§

fn default() -> LegendConfig

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

impl<'de> Deserialize<'de> for LegendConfig

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 LegendConfig

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