pub struct Legend {
pub text_style: TextStyle,
pub background_alpha: f32,
pub position: Corner,
/* private fields */
}
Expand description
The configuration for a plot legend.
Fields§
§text_style: TextStyle
§background_alpha: f32
§position: Corner
Implementations§
source§impl Legend
impl Legend
sourcepub fn text_style(self, style: TextStyle) -> Self
pub fn text_style(self, style: TextStyle) -> Self
Which text style to use for the legend. Default: TextStyle::Body
.
sourcepub fn background_alpha(self, alpha: f32) -> Self
pub fn background_alpha(self, alpha: f32) -> Self
The alpha of the legend background. Default: 0.75
.
sourcepub fn position(self, corner: Corner) -> Self
pub fn position(self, corner: Corner) -> Self
In which corner to place the legend. Default: Corner::RightTop
.
Specifies hidden items in the legend configuration to override the existing ones. This allows the legend traces’ visibility to be controlled from the application code.
Trait Implementations§
source§impl PartialEq for Legend
impl PartialEq for Legend
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 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