AxisChart

Trait AxisChart 

Source
pub trait AxisChart<C: PixelColor>: Chart<C> {
    type XAxis;
    type YAxis;

    // Required methods
    fn set_x_axis(&mut self, axis: Self::XAxis);
    fn set_y_axis(&mut self, axis: Self::YAxis);
    fn x_axis(&self) -> ChartResult<&Self::XAxis>;
    fn y_axis(&self) -> ChartResult<&Self::YAxis>;
}
Expand description

Trait for charts with configurable axes

Required Associated Types§

Source

type XAxis

X-axis type

Source

type YAxis

Y-axis type

Required Methods§

Source

fn set_x_axis(&mut self, axis: Self::XAxis)

Set the X-axis configuration

§Arguments
  • axis - X-axis configuration
Source

fn set_y_axis(&mut self, axis: Self::YAxis)

Set the Y-axis configuration

§Arguments
  • axis - Y-axis configuration
Source

fn x_axis(&self) -> ChartResult<&Self::XAxis>

Get the X-axis configuration

Source

fn y_axis(&self) -> ChartResult<&Self::YAxis>

Get the Y-axis configuration

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<C> AxisChart<C> for LineChart<C>
where C: From<Rgb565> + PixelColor + 'static,