[−][src]Struct rustvis::barchart::Chart
Chart type, containing data, labels, and other metadata about a chart.
Methods
impl Chart
[src]
pub fn new(
title: String,
color: Rgb,
meta_color: Rgb,
data: Vec<u16>,
labels: Vec<&'static str>,
x_label: String,
y_label: String,
width: u32,
height: u32
) -> Chart
[src]
title: String,
color: Rgb,
meta_color: Rgb,
data: Vec<u16>,
labels: Vec<&'static str>,
x_label: String,
y_label: String,
width: u32,
height: u32
) -> Chart
Create a new chart.
pub fn title(&self) -> &String
[src]
Get the chart's title.
pub fn color(&self) -> &Rgb
[src]
Get the chart's fill color.
pub fn meta_color(&self) -> &Rgb
[src]
Get the chart's meta color.
pub fn data(&self) -> &Vec<u16>
[src]
Get the chart's data.
pub fn labels(&self) -> &Vec<&'static str>
[src]
Get the chart's labels.
pub fn height(&self) -> &u32
[src]
Get the chart's height.
pub fn width(&self) -> &u32
[src]
Get the chart's width.
pub fn set_title(&mut self, title: String)
[src]
Set the chart's title.
pub fn set_color(&mut self, color: Rgb)
[src]
Set the chart's line color.
pub fn set_meta_color(&mut self, meta_color: Rgb)
[src]
Set the chart's line color.
pub fn set_data(&mut self, data: Vec<u16>)
[src]
Set the chart's data as a Vec of u16s.
pub fn set_labels(&mut self, labels: Vec<&'static str>)
[src]
Set the chart's labels.
pub fn set_height(&mut self, height: u32)
[src]
Set the chart's height.
pub fn set_width(&mut self, width: u32)
[src]
Set the chart's width.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
impl<T, Dst> ConvAsUtil<Dst> for T
fn approx(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject with the default scheme.
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Approximate the subject with a specific scheme.
impl<T> ConvUtil for T
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, DefaultApprox>,
Self: ApproxInto<Dst, DefaultApprox>,
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Self: ApproxInto<Dst, Scheme>,
Approximate the subject to a given type with a specific scheme.
fn into_as<Dst>(self) -> Dst where
Self: Into<Dst>,
Self: Into<Dst>,
Convert the subject to a given type.
fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: TryInto<Dst>,
Self: TryInto<Dst>,
Attempt to convert the subject to a given type.
fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: ValueInto<Dst>,
Self: ValueInto<Dst>,
Attempt a value conversion of the subject to a given type.
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
impl<Src> ValueFrom<Src> for Src
type Err = NoError
The error type produced by a failed conversion.
fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
impl<Src> TryFrom<Src> for Src
type Err = NoError
The error type produced by a failed conversion.
fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>
impl<Src, Dst> TryInto<Dst> for Src where
Dst: TryFrom<Src>,
Dst: TryFrom<Src>,
type Err = <Dst as TryFrom<Src>>::Err
The error type produced by a failed conversion.
fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
Convert the source color to the destination color using the bradford method by default Read more