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>
impl<'chart, 'series, DB: DrawingBackend> TernaryMeshConfig<'chart, 'series, DB>
Sourcepub fn axis<F>(self, axis: TernaryAxis, configure: F) -> Selfwhere
F: FnOnce(&mut TernaryAxisConfig),
pub fn axis<F>(self, axis: TernaryAxis, configure: F) -> Selfwhere
F: FnOnce(&mut TernaryAxisConfig),
Configure an independent semantic axis without exposing geometric edge ids.
pub fn axis_a<F>(self, configure: F) -> Selfwhere
F: FnOnce(&mut TernaryAxisConfig),
pub fn axis_b<F>(self, configure: F) -> Selfwhere
F: FnOnce(&mut TernaryAxisConfig),
pub fn axis_c<F>(self, configure: F) -> Selfwhere
F: FnOnce(&mut TernaryAxisConfig),
Sourcepub fn major_step(self, step: f64) -> Self
pub fn major_step(self, step: f64) -> Self
Compatibility shortcut: use one major-grid step for all three axes.
pub fn boundary_style<S: Into<ShapeStyle>>(self, style: S) -> Self
pub fn major_grid_style<S: Into<ShapeStyle>>(self, style: S) -> Self
pub fn minor_grid_style<S: Into<ShapeStyle>>(self, style: S) -> Self
Sourcepub fn text_style<'style, S>(self, style: S) -> Selfwhere
S: IntoTextStyle<'style>,
pub fn text_style<'style, S>(self, style: S) -> Selfwhere
S: IntoTextStyle<'style>,
Backwards-compatible common text style; explicit per-axis setters take precedence when called later.
pub fn axis_name_style<'style, S>(self, style: S) -> Selfwhere
S: IntoTextStyle<'style>,
pub fn corner_label_style<'style, S>(self, style: S) -> Selfwhere
S: IntoTextStyle<'style>,
pub fn axis_a_name<S: Into<String>>(self, value: S) -> Self
pub fn axis_b_name<S: Into<String>>(self, value: S) -> Self
pub fn axis_c_name<S: Into<String>>(self, value: S) -> Self
pub fn corner_a_name<S: Into<String>>(self, value: S) -> Self
pub fn corner_b_name<S: Into<String>>(self, value: S) -> Self
pub fn corner_c_name<S: Into<String>>(self, value: S) -> Self
pub fn axis_label_offset(self, value: u32) -> Self
pub fn corner_label_offset(self, value: u32) -> Self
pub fn corner_label_visibility(self, value: CornerLabelVisibility) -> Self
pub fn hide_axis_names(self) -> Self
pub fn hide_corner_names(self) -> Self
pub fn hide_grid_lines(self) -> Self
pub fn hide_triangle_boundary(self) -> Self
pub fn hide_ticks(self) -> Self
pub fn hide_tick_labels(self) -> Self
Sourcepub fn build(self) -> TernaryMesh
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.
Sourcepub fn draw(self) -> Result<(), TernaryChartError<DB::ErrorType>>
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.
Sourcepub fn draw_geometry(self) -> Result<(), TernaryChartError<DB::ErrorType>>
pub fn draw_geometry(self) -> Result<(), TernaryChartError<DB::ErrorType>>
Draw all geometry immediately at native resolution.
Sourcepub fn draw_geometry_scaled(
self,
scale: u32,
) -> Result<(), TernaryChartError<DB::ErrorType>>
pub fn draw_geometry_scaled( self, scale: u32, ) -> Result<(), TernaryChartError<DB::ErrorType>>
Draw all geometry immediately with final-layout dimensions scaled for PNG supersampling.