pub struct BarChart { /* private fields */ }
Expand description
A bar chart.
Implementations
impl BarChart
impl BarChart
pub fn new(bars: Vec<Bar, Global>) -> BarChart
pub fn new(bars: Vec<Bar, Global>) -> BarChart
Create a bar chart. It defaults to vertically oriented elements.
pub fn color(self, color: impl Into<Color32>) -> BarChart
pub fn color(self, color: impl Into<Color32>) -> BarChart
Set the default color. It is set on all elements that do not already have a specific color.
This is the color that shows up in the legend.
It can be overridden at the bar level (see [Bar
]).
Default is Color32::TRANSPARENT
which means a color will be auto-assigned.
pub fn name(self, name: impl ToString) -> BarChart
pub fn name(self, name: impl ToString) -> BarChart
Name of this chart.
This name will show up in the plot legend, if legends are turned on. Multiple charts may share the same name, in which case they will also share an entry in the legend.
pub fn vertical(self) -> BarChart
pub fn vertical(self) -> BarChart
Set all elements to be in a vertical orientation. Argument axis will be X and bar values will be on the Y axis.
pub fn horizontal(self) -> BarChart
pub fn horizontal(self) -> BarChart
Set all elements to be in a horizontal orientation. Argument axis will be Y and bar values will be on the X axis.
Auto Trait Implementations
impl !RefUnwindSafe for BarChart
impl !Send for BarChart
impl !Sync for BarChart
impl Unpin for BarChart
impl !UnwindSafe for BarChart
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more