pub struct Legend {
pub visible: bool,
pub content: RichText,
pub corner: LegendCorner,
pub offset_x: f32,
pub offset_y: f32,
pub padding: f32,
pub bg_color: Color,
pub border_color: Color,
}Expand description
Legend box rendered in one corner of the chart’s data area.
Fields§
§visible: bool§content: RichTextThe whole legend as one rich document. '\n' segments break lines;
symbol fields are fixed-width inline segments with color overrides.
Line symbols draw rules across their fields and retain an em dash only
as fallback text; scatter glyphs are centered in their fields. Thus
line breaks, symbol positions, and mid-text symbols remain explicit in
the SSoT. Font + font_size of this RichText are consumed at draw time.
corner: LegendCorner§offset_x: f32Visual offset from the corner anchor (drag-to-move lands here).
offset_y: f32§padding: f32Inset from the data_area inner corner + padding inside the box.
bg_color: ColorBox background and border.
border_color: ColorTrait Implementations§
Source§impl<'de> Deserialize<'de> for Legend
impl<'de> Deserialize<'de> for Legend
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Legend
Auto Trait Implementations§
impl Freeze for Legend
impl RefUnwindSafe for Legend
impl Send for Legend
impl Sync for Legend
impl Unpin for Legend
impl UnsafeUnpin for Legend
impl UnwindSafe for Legend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more