pub struct BarChart { /* private fields */ }Expand description
Bar chart widget.
Implementations§
Source§impl BarChart
impl BarChart
Sourcepub fn marker(self, v: Marker) -> Self
pub fn marker(self, v: Marker) -> Self
Draw positive bars with dot glyphs instead of eighth blocks, e.g.
Marker::Braille for 4 vertical dots per cell (2 dots per cell on
horizontal bars). Default: eighth blocks. Negative bar parts keep
block glyphs.
Sourcepub fn marker_kind(&self) -> Option<Marker>
pub fn marker_kind(&self) -> Option<Marker>
The configured dot marker, if any.
Sourcepub fn series_names<I, S>(self, names: I) -> Self
pub fn series_names<I, S>(self, names: I) -> Self
Names of the series (legend).
Sourcepub fn orientation(self, v: BarOrientation) -> Self
pub fn orientation(self, v: BarOrientation) -> Self
Direction.
Sourcepub fn show_values(self, v: bool) -> Self
pub fn show_values(self, v: bool) -> Self
Print values next to bars.
Sourcepub fn label_position(self, v: LabelPosition) -> Self
pub fn label_position(self, v: LabelPosition) -> Self
Where value labels go relative to bars (see LabelPosition).
Sourcepub fn gradient(self, v: Gradient) -> Self
pub fn gradient(self, v: Gradient) -> Self
Color bars by value (bottom/left = low, tip = high) using a gradient. Explicit per-bar colors still win.
Sourcepub fn base_style(self, style: Style) -> Self
pub fn base_style(self, style: Style) -> Self
Base style painted over the whole area (beats the theme).
Sourcepub fn value_axis(self, v: Axis) -> Self
pub fn value_axis(self, v: Axis) -> Self
Value axis (y for vertical, x for horizontal).
Sourcepub fn category_axis(self, v: Axis) -> Self
pub fn category_axis(self, v: Axis) -> Self
Category axis (title/style only; labels come from groups).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for BarChart
impl !UnwindSafe for BarChart
impl Freeze for BarChart
impl Send for BarChart
impl Sync for BarChart
impl Unpin for BarChart
impl UnsafeUnpin for BarChart
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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