[−][src]Struct vega_lite_4::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.
Fields
aria: Option<Aria>
clip_height: Option<CornerRadiusUnion>
column_padding: Option<CornerRadiusUnion>
columns: Option<CornerRadiusUnion>
corner_radius: Option<CornerRadiusUnion>
description: Option<Color>
direction: Option<Orientation>
The direction of the legend, one of "vertical"
or "horizontal"
.
Default value: - For top-/bottom-orient
ed legends, "horizontal"
- For
left-/right-orient
ed legends, "vertical"
- For top/bottom-left/right-orient
ed
legends, "horizontal"
for gradient legends and "vertical"
for symbol legends.
disable: Option<bool>
Disable legend by default
fill_color: Option<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<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<Color>
label_font: Option<Color>
label_font_size: Option<FontSize>
label_font_style: Option<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<Color>
stroke_dash: Option<StrokeDashUnion>
stroke_width: Option<CornerRadiusUnion>
symbol_base_fill_color: Option<Color>
symbol_base_stroke_color: Option<Color>
symbol_dash: Option<StrokeDashUnion>
symbol_dash_offset: Option<CornerRadiusUnion>
symbol_direction: Option<Direction>
symbol_fill_color: Option<Color>
symbol_limit: Option<CornerRadiusUnion>
symbol_offset: Option<CornerRadiusUnion>
symbol_opacity: Option<CornerRadiusUnion>
symbol_size: Option<FontSize>
symbol_stroke_color: Option<Color>
symbol_stroke_width: Option<FontSize>
symbol_type: Option<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<Color>
title_font: Option<Color>
title_font_size: Option<CornerRadiusUnion>
title_font_style: Option<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
impl Clone for LegendConfig
[src]
pub fn clone(&self) -> LegendConfig
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LegendConfig
[src]
impl Default for LegendConfig
[src]
pub fn default() -> LegendConfig
[src]
impl<'de> Deserialize<'de> for LegendConfig
[src]
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for LegendConfig
[src]
Auto Trait Implementations
impl RefUnwindSafe for LegendConfig
[src]
impl Send for LegendConfig
[src]
impl Sync for LegendConfig
[src]
impl Unpin for LegendConfig
[src]
impl UnwindSafe for LegendConfig
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,