pub struct TernaryChartBuilder<'root, DB: DrawingBackend> { /* private fields */ }Expand description
Builder for an owned, Cartesian-backed TernaryChart.
The implicit viewport is resolved at build time from the current geometry.
Once TernaryChartBuilder::viewport is called, later geometry changes do
not replace that explicit viewport.
Implementations§
Source§impl<'root, DB: DrawingBackend> TernaryChartBuilder<'root, DB>
impl<'root, DB: DrawingBackend> TernaryChartBuilder<'root, DB>
Sourcepub fn on(root: &'root DrawingArea<DB, Shift>) -> Self
pub fn on(root: &'root DrawingArea<DB, Shift>) -> Self
Begin a ternary chart in a Plotters root drawing area.
Sourcepub const fn geometry(self, geometry: TernaryGeometry) -> Self
pub const fn geometry(self, geometry: TernaryGeometry) -> Self
Set the triangle geometry.
An implicit full viewport follows this geometry at build time. An explicitly selected viewport is preserved.
Sourcepub const fn viewport(self, viewport: TernaryViewport) -> Self
pub const fn viewport(self, viewport: TernaryViewport) -> Self
Select an explicit logical clipping viewport.
Sourcepub const fn viewport_fit(self, fit: ViewportFit) -> Self
pub const fn viewport_fit(self, fit: ViewportFit) -> Self
Select aspect preservation or explicit stretching.
Sourcepub const fn viewport_alignment(self, alignment: ViewportAlignment) -> Self
pub const fn viewport_alignment(self, alignment: ViewportAlignment) -> Self
Align an aspect-fitted plotting subarea.
Sourcepub fn caption<S, Style>(self, caption: S, style: Style) -> Self
pub fn caption<S, Style>(self, caption: S, style: Style) -> Self
Add a Plotters-rendered caption outside the fitted ternary viewport.
Sourcepub fn build<'chart>(
self,
) -> Result<TernaryChart<'chart, DB>, TernaryChartError<DB::ErrorType>>where
DB: 'chart,
pub fn build<'chart>(
self,
) -> Result<TernaryChart<'chart, DB>, TernaryChartError<DB::ErrorType>>where
DB: 'chart,
Build the owned Cartesian chart on an aspect-fitted Plotters subarea.
Auto Trait Implementations§
impl<'root, DB> !RefUnwindSafe for TernaryChartBuilder<'root, DB>
impl<'root, DB> !Send for TernaryChartBuilder<'root, DB>
impl<'root, DB> !Sync for TernaryChartBuilder<'root, DB>
impl<'root, DB> !UnwindSafe for TernaryChartBuilder<'root, DB>
impl<'root, DB> Freeze for TernaryChartBuilder<'root, DB>
impl<'root, DB> Unpin for TernaryChartBuilder<'root, DB>
impl<'root, DB> UnsafeUnpin for TernaryChartBuilder<'root, DB>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more