Skip to main content

TernaryMeshConfig

Struct TernaryMeshConfig 

Source
pub struct TernaryMeshConfig<'chart, 'series, DB: DrawingBackend> { /* private fields */ }
Expand description

Plotters-like configuration for ternary mesh, ticks, and labels.

Implementations§

Source§

impl<'chart, 'series, DB: DrawingBackend> TernaryMeshConfig<'chart, 'series, DB>

Source

pub fn axis<F>(self, axis: TernaryAxis, configure: F) -> Self
where F: FnOnce(&mut TernaryAxisConfig),

Configure an independent semantic axis without exposing geometric edge ids.

Source

pub fn axis_a<F>(self, configure: F) -> Self
where F: FnOnce(&mut TernaryAxisConfig),

Source

pub fn axis_b<F>(self, configure: F) -> Self
where F: FnOnce(&mut TernaryAxisConfig),

Source

pub fn axis_c<F>(self, configure: F) -> Self
where F: FnOnce(&mut TernaryAxisConfig),

Source

pub fn major_step(self, step: f64) -> Self

Compatibility shortcut: use one major-grid step for all three axes.

Source

pub fn boundary_style<S: Into<ShapeStyle>>(self, style: S) -> Self

Source

pub fn major_grid_style<S: Into<ShapeStyle>>(self, style: S) -> Self

Source

pub fn minor_grid_style<S: Into<ShapeStyle>>(self, style: S) -> Self

Source

pub fn text_style<'style, S>(self, style: S) -> Self
where S: IntoTextStyle<'style>,

Backwards-compatible common text style; explicit per-axis setters take precedence when called later.

Source

pub fn axis_name_style<'style, S>(self, style: S) -> Self
where S: IntoTextStyle<'style>,

Source

pub fn corner_label_style<'style, S>(self, style: S) -> Self
where S: IntoTextStyle<'style>,

Source

pub fn axis_a_name<S: Into<String>>(self, value: S) -> Self

Source

pub fn axis_b_name<S: Into<String>>(self, value: S) -> Self

Source

pub fn axis_c_name<S: Into<String>>(self, value: S) -> Self

Source

pub fn corner_a_name<S: Into<String>>(self, value: S) -> Self

Source

pub fn corner_b_name<S: Into<String>>(self, value: S) -> Self

Source

pub fn corner_c_name<S: Into<String>>(self, value: S) -> Self

Source

pub fn axis_label_offset(self, value: u32) -> Self

Source

pub fn corner_label_offset(self, value: u32) -> Self

Source

pub fn corner_label_visibility(self, value: CornerLabelVisibility) -> Self

Source

pub fn hide_axis_names(self) -> Self

Source

pub fn hide_corner_names(self) -> Self

Source

pub fn hide_grid_lines(self) -> Self

Source

pub fn hide_triangle_boundary(self) -> Self

Source

pub fn hide_ticks(self) -> Self

Source

pub fn hide_tick_labels(self) -> Self

Source

pub fn build(self) -> TernaryMesh

Freeze this configuration for layered drawing.

The returned mesh is independent of the chart borrow. It can therefore draw grid geometry, release the chart for data series, then draw the foreground simplex frame and final-resolution text.

Source

pub fn draw(self) -> Result<(), TernaryChartError<DB::ErrorType>>

Draw every mesh phase immediately for backwards compatibility.

Prefer TernaryMesh::draw_background, data series, TernaryMesh::draw_foreground, and TernaryMesh::draw_text when data must remain behind a thick triangle frame.

Source

pub fn draw_geometry(self) -> Result<(), TernaryChartError<DB::ErrorType>>

Draw all geometry immediately at native resolution.

Source

pub fn draw_geometry_scaled( self, scale: u32, ) -> Result<(), TernaryChartError<DB::ErrorType>>

Draw all geometry immediately with final-layout dimensions scaled for PNG supersampling.

Source

pub fn draw_text(self) -> Result<(), TernaryChartError<DB::ErrorType>>

Draw only final-resolution text. This emits no line, grid, or boundary geometry.

Auto Trait Implementations§

§

impl<'chart, 'series, DB> !RefUnwindSafe for TernaryMeshConfig<'chart, 'series, DB>

§

impl<'chart, 'series, DB> !Send for TernaryMeshConfig<'chart, 'series, DB>

§

impl<'chart, 'series, DB> !Sync for TernaryMeshConfig<'chart, 'series, DB>

§

impl<'chart, 'series, DB> !UnwindSafe for TernaryMeshConfig<'chart, 'series, DB>

§

impl<'chart, 'series, DB> Freeze for TernaryMeshConfig<'chart, 'series, DB>
where &'chart mut TernaryChart<'series, DB>: Freeze,

§

impl<'chart, 'series, DB> Unpin for TernaryMeshConfig<'chart, 'series, DB>
where &'chart mut TernaryChart<'series, DB>: Unpin,

§

impl<'chart, 'series, DB> UnsafeUnpin for TernaryMeshConfig<'chart, 'series, DB>
where &'chart mut TernaryChart<'series, DB>: UnsafeUnpin,

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.