Struct SeriesLabelStyle
pub struct SeriesLabelStyle<'a, 'b, DB, CT>where
DB: DrawingBackend,
CT: CoordTranslate,{ /* private fields */ }Expand description
The struct to specify the series label of a target chart context
Implementations§
§impl<'a, 'b, DB, CT> SeriesLabelStyle<'a, 'b, DB, CT>where
DB: DrawingBackend + 'a,
CT: CoordTranslate,
impl<'a, 'b, DB, CT> SeriesLabelStyle<'a, 'b, DB, CT>where
DB: DrawingBackend + 'a,
CT: CoordTranslate,
pub fn position(
&mut self,
pos: SeriesLabelPosition,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>
pub fn position( &mut self, pos: SeriesLabelPosition, ) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>
Sets the series label positioning style
pos - The positioning style
See ChartContext::configure_series_labels() for more information and examples.
pub fn margin<S>(&mut self, value: S) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: SizeDesc,
pub fn margin<S>(&mut self, value: S) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: SizeDesc,
Sets the margin of the series label drawing area.
value: The size specification in backend units (pixels)
See ChartContext::configure_series_labels() for more information and examples.
pub fn legend_area_size<S>(
&mut self,
size: S,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: SizeDesc,
pub fn legend_area_size<S>(
&mut self,
size: S,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: SizeDesc,
Sets the size of the legend area.
size - The size of legend area in backend units (pixels)
See ChartContext::configure_series_labels() for more information and examples.
pub fn border_style<S>(
&mut self,
style: S,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: Into<ShapeStyle>,
pub fn border_style<S>(
&mut self,
style: S,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: Into<ShapeStyle>,
Sets the style of the label series area.
style - The style of the border
See ChartContext::configure_series_labels() for more information and examples.
pub fn background_style<S>(
&mut self,
style: S,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: Into<ShapeStyle>,
pub fn background_style<S>(
&mut self,
style: S,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
S: Into<ShapeStyle>,
Sets the background style of the label series area.
style - The style of the border
See ChartContext::configure_series_labels() for more information and examples.
pub fn label_font<F>(
&mut self,
font: F,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
F: IntoTextStyle<'b>,
pub fn label_font<F>(
&mut self,
font: F,
) -> &mut SeriesLabelStyle<'a, 'b, DB, CT>where
F: IntoTextStyle<'b>,
Sets the font for series labels.
font - Desired font
See ChartContext::configure_series_labels() for more information and examples.
pub fn draw(
&mut self,
) -> Result<(), DrawingAreaErrorKind<<DB as DrawingBackend>::ErrorType>>
pub fn draw( &mut self, ) -> Result<(), DrawingAreaErrorKind<<DB as DrawingBackend>::ErrorType>>
Draws the series label area.
See ChartContext::configure_series_labels() for more information and examples.
Auto Trait Implementations§
impl<'a, 'b, DB, CT> Freeze for SeriesLabelStyle<'a, 'b, DB, CT>
impl<'a, 'b, DB, CT> !RefUnwindSafe for SeriesLabelStyle<'a, 'b, DB, CT>
impl<'a, 'b, DB, CT> !Send for SeriesLabelStyle<'a, 'b, DB, CT>
impl<'a, 'b, DB, CT> !Sync for SeriesLabelStyle<'a, 'b, DB, CT>
impl<'a, 'b, DB, CT> Unpin for SeriesLabelStyle<'a, 'b, DB, CT>
impl<'a, 'b, DB, CT> !UnwindSafe for SeriesLabelStyle<'a, 'b, DB, CT>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more