Skip to main content

TernaryChart

Struct TernaryChart 

Source
pub struct TernaryChart<'a, DB: DrawingBackend> { /* private fields */ }
Expand description

A ternary chart backed by an owned Plotters Cartesian chart context.

The lifetime parameter belongs to Plotters’ stored series annotations. The context owns a cloned drawing area and does not borrow the builder’s root.

Implementations§

Source§

impl<'a, DB: DrawingBackend> TernaryChart<'a, DB>

Source

pub fn configure_mesh(&mut self) -> TernaryMeshConfig<'_, 'a, DB>

Configure and draw the Milestone 3 boundary, grid, and basic names.

Source

pub fn draw_series<'chart, S>( &'chart mut self, series: S, ) -> Result<&'chart mut SeriesAnno<'a, DB>, TernaryChartError<DB::ErrorType>>
where DB: 'a, S: TernarySeries<DB>,

Draw a ternary-aware series and return Plotters’ native annotation.

Source

pub fn draw_point_series<'chart, I, P, Provider, F, E>( &'chart mut self, series: TernaryPointSeries<I, Provider>, make_marker: F, ) -> Result<&'chart mut SeriesAnno<'a, DB>, TernaryChartError<DB::ErrorType>>
where DB: 'a, I: IntoIterator<Item = P>, P: Into<TernaryPoint>, Provider: PointMarkerStyleProvider, F: Fn((f64, f64), u32, ShapeStyle) -> E, for<'element> &'element E: PointCollection<'element, (f64, f64)>, E: Drawable<DB>,

Draw points with an owned ordinary Plotters element from a custom closure.

The closure receives the projected logical anchor, configured backend pixel size, and Plotters ShapeStyle. Composable elements can begin at EmptyElement::at(anchor) and use local backend coordinates thereafter.

Source

pub fn configure_series_labels<'chart>( &'chart mut self, ) -> SeriesLabelStyle<'a, 'chart, DB, Cartesian2d<RangedCoordf64, RangedCoordf64>>
where DB: 'a,

Forward ordinary Plotters legend configuration without wrapping it.

Source

pub const fn cartesian_chart(&self) -> &CartesianChartContext<'a, DB>

Borrow the underlying Cartesian Plotters chart.

Source

pub fn cartesian_chart_mut(&mut self) -> &mut CartesianChartContext<'a, DB>

Mutably borrow the underlying Cartesian Plotters chart.

Source

pub fn plotting_area(&self) -> &CartesianPlottingArea<DB>

Borrow the underlying logical Cartesian plotting area.

Source

pub const fn geometry(&self) -> TernaryGeometry

Return the triangle geometry used by this chart.

Source

pub const fn viewport(&self) -> TernaryViewport

Return the requested logical clipping viewport.

Source

pub const fn viewport_fit(&self) -> ViewportFit

Return the selected fitting policy.

Source

pub const fn viewport_alignment(&self) -> ViewportAlignment

Return the selected alignment inside unused allocated space.

Source§

impl<'a, DB: DrawingBackend + 'a> TernaryChart<'a, DB>

Auto Trait Implementations§

§

impl<'a, DB> !RefUnwindSafe for TernaryChart<'a, DB>

§

impl<'a, DB> !Send for TernaryChart<'a, DB>

§

impl<'a, DB> !Sync for TernaryChart<'a, DB>

§

impl<'a, DB> !UnwindSafe for TernaryChart<'a, DB>

§

impl<'a, DB> Freeze for TernaryChart<'a, DB>

§

impl<'a, DB> Unpin for TernaryChart<'a, DB>

§

impl<'a, DB> UnsafeUnpin for TernaryChart<'a, DB>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.