pub struct LegendConfig {Show 36 fields
pub corner_radius: Option<f64>,
pub entry_padding: Option<f64>,
pub fill_color: Option<String>,
pub gradient_height: Option<f64>,
pub gradient_label_baseline: Option<String>,
pub gradient_label_limit: Option<f64>,
pub gradient_label_offset: Option<f64>,
pub gradient_stroke_color: Option<String>,
pub gradient_stroke_width: Option<f64>,
pub gradient_width: Option<f64>,
pub label_align: Option<String>,
pub label_baseline: Option<String>,
pub label_color: Option<String>,
pub label_font: Option<String>,
pub label_font_size: Option<f64>,
pub label_limit: Option<f64>,
pub label_offset: Option<f64>,
pub offset: Option<f64>,
pub orient: Option<LegendOrient>,
pub padding: Option<f64>,
pub short_time_labels: Option<bool>,
pub stroke_color: Option<String>,
pub stroke_dash: Option<Vec<f64>>,
pub stroke_width: Option<f64>,
pub symbol_color: Option<String>,
pub symbol_size: Option<f64>,
pub symbol_stroke_width: Option<f64>,
pub symbol_type: Option<String>,
pub title_align: Option<String>,
pub title_baseline: Option<String>,
pub title_color: Option<String>,
pub title_font: Option<String>,
pub title_font_size: Option<f64>,
pub title_font_weight: Option<FontWeight>,
pub title_limit: Option<f64>,
pub title_padding: Option<f64>,
}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§
§corner_radius: Option<f64>Corner radius for the full legend.
entry_padding: Option<f64>Padding (in pixels) between legend entries in a symbol legend.
fill_color: Option<String>Background fill color for the full legend.
gradient_height: Option<f64>The height of the gradient, in pixels.
gradient_label_baseline: Option<String>Text baseline for color ramp gradient labels.
gradient_label_limit: Option<f64>The maximum allowed length in pixels of color ramp gradient labels.
gradient_label_offset: Option<f64>Vertical offset in pixels for color ramp gradient labels.
gradient_stroke_color: Option<String>The color of the gradient stroke, can be in hex color code or regular color name.
gradient_stroke_width: Option<f64>The width of the gradient stroke, in pixels.
gradient_width: Option<f64>The width of the gradient, in pixels.
label_align: Option<String>The alignment of the legend label, can be left, middle or right.
label_baseline: Option<String>The position of the baseline of legend label, can be top, middle or bottom.
label_color: Option<String>The color of the legend label, can be in hex color code or regular color name.
label_font: Option<String>The font of the legend label.
label_font_size: Option<f64>The font size of legend label.
Default value: 10.
label_limit: Option<f64>Maximum allowed pixel width of axis tick labels.
label_offset: Option<f64>The offset of the legend label.
offset: Option<f64>The offset, in pixels, by which to displace the legend from the edge of the enclosing group or data rectangle.
Default value: 0
orient: Option<LegendOrient>The orientation of the legend, which determines how the legend is positioned within the scene. One of “left”, “right”, “top-left”, “top-right”, “bottom-left”, “bottom-right”, “none”.
Default value: "right"
padding: Option<f64>The padding, in pixels, between the legend and axis.
short_time_labels: Option<bool>Whether month names and weekday names should be abbreviated.
Default value: false
stroke_color: Option<String>Border stroke color for the full legend.
stroke_dash: Option<Vec<f64>>Border stroke dash pattern for the full legend.
stroke_width: Option<f64>Border stroke width for the full legend.
symbol_color: Option<String>The color of the legend symbol,
symbol_size: Option<f64>The size of the legend symbol, in pixels.
symbol_stroke_width: Option<f64>The width of the symbol’s stroke.
symbol_type: Option<String>Default shape type (such as “circle”) for legend symbols.
title_align: Option<String>Horizontal text alignment for legend titles.
title_baseline: Option<String>Vertical text baseline for legend titles.
title_color: Option<String>The color of the legend title, can be in hex color code or regular color name.
title_font: Option<String>The font of the legend title.
title_font_size: Option<f64>The font size of the legend title.
title_font_weight: Option<FontWeight>The font weight of the legend title.
This can be either a string (e.g "bold", "normal") or a number (100, 200, 300,
…, 900 where "normal" = 400 and "bold" = 700).
title_limit: Option<f64>Maximum allowed pixel width of axis titles.
title_padding: Option<f64>The padding, in pixels, between title and legend.