pub struct BarPointLayer { /* private fields */ }Expand description
A complete strict point layer positioned at prepared ordinary-bar centers.
Category and optional series values resolve against the bar cells. Every row creates exactly one point and the layer creates no legend.
The constructor’s Color owns the complete paint, with no opacity argument:
use lichtung_plot::{BarPointLayer, CategoryValues, Color, NumericValues};
let layer = BarPointLayer::new(
CategoryValues::new("category", ["A"])?, None,
NumericValues::new("value", [2.0]), Color::rgba(20, 80, 140, 0), 4,
)?;
assert_eq!(layer.color().get_alpha(), 0);ⓘ
use lichtung_plot::{BarPointLayer, CategoryValues, Color, NumericValues};
let _ = BarPointLayer::new(
CategoryValues::new("category", ["A"]).unwrap(), None,
NumericValues::new("value", [2.0]), Color::rgb(20, 80, 140), 4, 0.5,
);Implementations§
Source§impl BarPointLayer
impl BarPointLayer
Sourcepub fn new(
category: CategoryValues,
series: Option<CategoryValues>,
value: NumericValues,
color: Color,
radius: u32,
) -> Result<BarPointLayer, Error>
pub fn new( category: CategoryValues, series: Option<CategoryValues>, value: NumericValues, color: Color, radius: u32, ) -> Result<BarPointLayer, Error>
Construct an owned bar point layer with optional positioned series.
Pass None for a single-series bar and Some(column) for a chart whose
ordinary bars use an explicit positioned series.
Sourcepub const fn category_values(&self) -> &CategoryValues
pub const fn category_values(&self) -> &CategoryValues
Categories resolved against prepared bar categories.
Sourcepub const fn series_values(&self) -> Option<&CategoryValues>
pub const fn series_values(&self) -> Option<&CategoryValues>
Optional series values resolved against prepared bar series.
Sourcepub const fn values(&self) -> &NumericValues
pub const fn values(&self) -> &NumericValues
Strict finite numeric point values.
Trait Implementations§
Source§impl Clone for BarPointLayer
impl Clone for BarPointLayer
Source§fn clone(&self) -> BarPointLayer
fn clone(&self) -> BarPointLayer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BarPointLayer
impl Debug for BarPointLayer
Source§impl From<BarPointLayerAdapter<'_>> for BarPointLayer
impl From<BarPointLayerAdapter<'_>> for BarPointLayer
Source§fn from(adapter: BarPointLayerAdapter<'_>) -> Self
fn from(adapter: BarPointLayerAdapter<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for BarPointLayer
impl Freeze for BarPointLayer
impl Move for BarPointLayer
impl RefUnwindSafe for BarPointLayer
impl Send for BarPointLayer
impl Sync for BarPointLayer
impl Unpin for BarPointLayer
impl UnsafeUnpin for BarPointLayer
impl UnwindSafe for BarPointLayer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.