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>
impl<'a, DB: DrawingBackend> TernaryChart<'a, DB>
Sourcepub fn configure_mesh(&mut self) -> TernaryMeshConfig<'_, 'a, DB>
pub fn configure_mesh(&mut self) -> TernaryMeshConfig<'_, 'a, DB>
Configure and draw the Milestone 3 boundary, grid, and basic names.
Sourcepub 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>,
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.
Sourcepub 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>,
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.
Sourcepub fn configure_series_labels<'chart>(
&'chart mut self,
) -> SeriesLabelStyle<'a, 'chart, DB, Cartesian2d<RangedCoordf64, RangedCoordf64>>where
DB: 'a,
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.
Sourcepub const fn cartesian_chart(&self) -> &CartesianChartContext<'a, DB>
pub const fn cartesian_chart(&self) -> &CartesianChartContext<'a, DB>
Borrow the underlying Cartesian Plotters chart.
Sourcepub fn cartesian_chart_mut(&mut self) -> &mut CartesianChartContext<'a, DB>
pub fn cartesian_chart_mut(&mut self) -> &mut CartesianChartContext<'a, DB>
Mutably borrow the underlying Cartesian Plotters chart.
Sourcepub fn plotting_area(&self) -> &CartesianPlottingArea<DB>
pub fn plotting_area(&self) -> &CartesianPlottingArea<DB>
Borrow the underlying logical Cartesian plotting area.
Sourcepub const fn geometry(&self) -> TernaryGeometry
pub const fn geometry(&self) -> TernaryGeometry
Return the triangle geometry used by this chart.
Sourcepub const fn viewport(&self) -> TernaryViewport
pub const fn viewport(&self) -> TernaryViewport
Return the requested logical clipping viewport.
Sourcepub const fn viewport_fit(&self) -> ViewportFit
pub const fn viewport_fit(&self) -> ViewportFit
Return the selected fitting policy.
Sourcepub const fn viewport_alignment(&self) -> ViewportAlignment
pub const fn viewport_alignment(&self) -> ViewportAlignment
Return the selected alignment inside unused allocated space.