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.
Each explicit Color owns its complete paint, including zero opacity:
use lichtung_plot::{CategoryValues, Color, NumericValues, elements::BarPointLayer};
let layer = BarPointLayer::new(
CategoryValues::new("category", ["A"])?,
NumericValues::new("value", [2.0]),
).color(Color::rgba(20, 80, 140, 0.0)?).radius(4)?;
assert_eq!(layer.get_color().unwrap().get_alpha(), 0.0);Implementations§
Source§impl BarPointLayer
impl BarPointLayer
Sourcepub fn new(category: CategoryValues, value: NumericValues) -> BarPointLayer
pub fn new(category: CategoryValues, value: NumericValues) -> BarPointLayer
Construct independent observations at their native category slots. Omitted paint and radius are resolved from the effective plot theme.
Sourcepub fn series(self, series: CategoryValues) -> BarPointLayer
pub fn series(self, series: CategoryValues) -> BarPointLayer
Bind positioned series independently of the main plot’s source.
Sourcepub fn color(self, color: Color) -> BarPointLayer
pub fn color(self, color: Color) -> BarPointLayer
Supply a complete fixed point paint, with its original opacity.
Sourcepub fn radius(self, radius: u32) -> Result<BarPointLayer, Error>
pub fn radius(self, radius: u32) -> Result<BarPointLayer, Error>
Supply a fixed positive CSS point radius.
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.
Sourcepub const fn get_color(&self) -> Option<Color>
pub const fn get_color(&self) -> Option<Color>
The explicit complete paint, or None for theme paint.
Sourcepub const fn get_radius(&self) -> Option<u32>
pub const fn get_radius(&self) -> Option<u32>
The explicit radius, or None for the theme radius.
Trait Implementations§
Source§impl Clone for BarPointLayer
impl Clone for BarPointLayer
Source§fn clone(&self) -> BarPointLayer
fn clone(&self) -> BarPointLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Auto Trait Implementations§
impl Forget for BarPointLayer
impl Freeze for BarPointLayerwhere
*const ArcInner<()> is !null: Freeze,
PhantomData<ArcInner<()>>: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<[String]> is !null: Freeze,
PhantomData<ArcInner<[String]>>: Freeze,
*const ArcInner<[u32]> is !null: Freeze,
PhantomData<ArcInner<[u32]>>: Freeze,
*const ArcInner<[u64]> is !null: Freeze,
PhantomData<ArcInner<[u64]>>: Freeze,
*const ArcInner<KeyValues> is !null: Freeze,
PhantomData<ArcInner<KeyValues>>: Freeze,
*const ArcInner<(RawKey, Arc<str>)> is !null: Freeze,
PhantomData<ArcInner<(RawKey, Arc<str>)>>: Freeze,
*const ArcInner<SourceInfo> is !null: Freeze,
PhantomData<ArcInner<SourceInfo>>: Freeze,
*const ArcInner<SourceProjection> is !null: Freeze,
PhantomData<ArcInner<SourceProjection>>: Freeze,
*const ArcInner<[f64]> is !null: Freeze,
PhantomData<ArcInner<[f64]>>: Freeze,
impl Move for BarPointLayer
impl RefUnwindSafe for BarPointLayer
impl Send for BarPointLayer
impl Sync for BarPointLayer
impl Unpin for BarPointLayer
impl UnsafeUnpin for BarPointLayerwhere
*const ArcInner<()> is !null: UnsafeUnpin,
PhantomData<ArcInner<()>>: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<[String]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[String]>>: UnsafeUnpin,
*const ArcInner<[u32]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u32]>>: UnsafeUnpin,
*const ArcInner<[u64]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u64]>>: UnsafeUnpin,
*const ArcInner<KeyValues> is !null: UnsafeUnpin,
PhantomData<ArcInner<KeyValues>>: UnsafeUnpin,
*const ArcInner<(RawKey, Arc<str>)> is !null: UnsafeUnpin,
PhantomData<ArcInner<(RawKey, Arc<str>)>>: UnsafeUnpin,
*const ArcInner<SourceInfo> is !null: UnsafeUnpin,
PhantomData<ArcInner<SourceInfo>>: UnsafeUnpin,
*const ArcInner<SourceProjection> is !null: UnsafeUnpin,
PhantomData<ArcInner<SourceProjection>>: UnsafeUnpin,
*const ArcInner<[f64]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[f64]>>: UnsafeUnpin,
impl UnwindSafe for BarPointLayerwhere
Arc<()>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<[String]>: UnwindSafe,
Arc<[u32]>: UnwindSafe,
Arc<[u64]>: UnwindSafe,
Arc<KeyValues>: UnwindSafe,
Arc<(RawKey, Arc<str>)>: UnwindSafe,
Arc<SourceInfo>: UnwindSafe,
Arc<SourceProjection>: UnwindSafe,
Arc<[f64]>: UnwindSafe,
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
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.