[][src]Struct plotters::chart::DualCoordChartContext

pub struct DualCoordChartContext<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> { /* fields omitted */ }

The chart context that has two coordinate system attached

Methods

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> DualCoordChartContext<'a, DB, CT1, CT2>[src]

pub fn into_chart_state(self) -> DualCoordChartState<CT1, CT2>[src]

Convert the chart context into a chart state

pub fn into_shared_chart_state(self) -> DualCoordChartState<Arc<CT1>, Arc<CT2>>[src]

Convert the chart context into a sharable chart state

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> DualCoordChartContext<'a, DB, CT1, CT2> where
    CT1: Clone,
    CT2: Clone
[src]

pub fn to_chart_state(&self) -> DualCoordChartState<CT1, CT2>[src]

Copy the coordinate specs and make the chart state

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> DualCoordChartContext<'a, DB, CT1, CT2>[src]

pub fn secondary_plotting_area(&self) -> &DrawingArea<DB, CT2>[src]

Get a reference to the drawing area that uses the secondary coordinate system

pub fn borrow_secondary(&self) -> &ChartContext<'a, DB, CT2>[src]

Borrow a mutable reference to the chart context that uses the secondary coordinate system

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: ReverseCoordTranslate> DualCoordChartContext<'a, DB, CT1, CT2>[src]

pub fn into_secondary_coord_trans(
    self
) -> impl Fn(BackendCoord) -> Option<CT2::From>
[src]

Convert the chart context into the secondary coordinate translation function

impl<'a, DB: DrawingBackend, CT1: ReverseCoordTranslate, CT2: ReverseCoordTranslate> DualCoordChartContext<'a, DB, CT1, CT2>[src]

pub fn into_coord_trans_pair(
    self
) -> (impl Fn(BackendCoord) -> Option<CT1::From>, impl Fn(BackendCoord) -> Option<CT2::From>)
[src]

Convert the chart context into a pair of closures that maps the pixel coordinate into the logical coordinate for both primary coordinate system and secondary coordinate system.

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, SX: Ranged, SY: Ranged> DualCoordChartContext<'a, DB, CT1, RangedCoord<SX, SY>> where
    SX::ValueType: Debug,
    SY::ValueType: Debug
[src]

pub fn configure_secondary_axes<'b>(
    &'b mut self
) -> SecondaryMeshStyle<'a, 'b, SX, SY, DB>
[src]

Start configure the style for the secondary axes

impl<'a, DB: DrawingBackend, X: Ranged, Y: Ranged, SX: Ranged, SY: Ranged> DualCoordChartContext<'a, DB, RangedCoord<X, Y>, RangedCoord<SX, SY>> where
    X::ValueType: Debug,
    Y::ValueType: Debug,
    SX::ValueType: Debug,
    SY::ValueType: Debug
[src]

pub fn draw_secondary_series<E, R, S>(
    &mut self,
    series: S
) -> Result<&mut SeriesAnno<'a, DB>, DrawingAreaErrorKind<DB::ErrorType>> where
    &'b E: PointCollection<'b, (SX::ValueType, SY::ValueType)>,
    E: Drawable<DB>,
    R: Borrow<E>,
    S: IntoIterator<Item = R>, 
[src]

Draw a series use the secondary coordinate system

  • series: The series to draw
  • Returns the series annotation object or error code

Methods from Deref<Target = ChartContext<'a, DB, CT1>>

pub fn to_chart_state(&self) -> ChartState<CT>[src]

Make the chart context, do not consume the chart context and clone the coordinate spec

pub fn configure_mesh<'b>(&'b mut self) -> MeshStyle<'a, 'b, X, Y, DB>[src]

Initialize a mesh configuration object and mesh drawing can be finalized by calling the function MeshStyle::draw

pub fn configure_series_labels<'b>(
    &'b mut self
) -> SeriesLabelStyle<'a, 'b, DB, CT>
[src]

Configure the styles for drawing series labels in the chart

pub fn plotting_area(&self) -> &DrawingArea<DB, CT>[src]

Get a reference of underlying plotting area

pub fn as_coord_spec(&self) -> &CT[src]

pub fn draw_series<E, R, S>(
    &mut self,
    series: S
) -> Result<&mut SeriesAnno<'a, DB>, DrawingAreaErrorKind<DB::ErrorType>> where
    &'b E: PointCollection<'b, (X::ValueType, Y::ValueType)>,
    E: Drawable<DB>,
    R: Borrow<E>,
    S: IntoIterator<Item = R>, 
[src]

Draw a data series. A data series in Plotters is abstracted as an iterator of elements

pub fn x_range(&self) -> Range<X::ValueType>[src]

Get the range of X axis

pub fn y_range(&self) -> Range<Y::ValueType>[src]

Get range of the Y axis

pub fn backend_coord(
    &self,
    coord: &(X::ValueType, Y::ValueType)
) -> BackendCoord
[src]

Maps the coordinate to the backend coordinate. This is typically used with an interactive chart.

pub fn draw_series<E, R, S>(
    &mut self,
    series: S
) -> Result<&mut SeriesAnno<'a, DB>, DrawingAreaErrorKind<DB::ErrorType>> where
    &'b E: PointCollection<'b, (X::ValueType, Y::ValueType)>,
    E: Drawable<DB>,
    R: Borrow<E>,
    S: IntoIterator<Item = R>, 
[src]

Draw a data series. A data series in Plotters is abstracted as an iterator of elements

Trait Implementations

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> From<DualCoordChartContext<'a, DB, CT1, CT2>> for DualCoordChartState<CT1, CT2>[src]

impl<'a, 'b, DB: DrawingBackend, CT1: CoordTranslate + Clone, CT2: CoordTranslate + Clone> From<&'b DualCoordChartContext<'a, DB, CT1, CT2>> for DualCoordChartState<CT1, CT2>[src]

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> DerefMut for DualCoordChartContext<'a, DB, CT1, CT2>[src]

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> Deref for DualCoordChartContext<'a, DB, CT1, CT2>[src]

type Target = ChartContext<'a, DB, CT1>

The resulting type after dereferencing.

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> BorrowMut<ChartContext<'a, DB, CT1>> for DualCoordChartContext<'a, DB, CT1, CT2>[src]

impl<'a, DB: DrawingBackend, CT1: CoordTranslate, CT2: CoordTranslate> Borrow<ChartContext<'a, DB, CT1>> for DualCoordChartContext<'a, DB, CT1, CT2>[src]

Auto Trait Implementations

impl<'a, DB, CT1, CT2> !Send for DualCoordChartContext<'a, DB, CT1, CT2>

impl<'a, DB, CT1, CT2> Unpin for DualCoordChartContext<'a, DB, CT1, CT2> where
    CT1: Unpin,
    CT2: Unpin,
    DB: Unpin

impl<'a, DB, CT1, CT2> !Sync for DualCoordChartContext<'a, DB, CT1, CT2>

impl<'a, DB, CT1, CT2> !UnwindSafe for DualCoordChartContext<'a, DB, CT1, CT2>

impl<'a, DB, CT1, CT2> !RefUnwindSafe for DualCoordChartContext<'a, DB, CT1, CT2>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

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]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]