pub struct AreaChartDataset {
pub alpha: f64,
pub points: Vec<(f64, f64)>,
pub color: [u8; 3],
pub label: String,
}Expand description
A dataset for an area chart, containing data points, appearance properties, and metadata.
Fields§
§alpha: f64Transparency level of the area fill (0.0 for fully transparent, 1.0 for fully opaque).
points: Vec<(f64, f64)>A collection of (x, y) data points for the area chart.
color: [u8; 3]Color of the area fill in RGB format.
label: StringLabel for the dataset, used in legends or annotations.
Implementations§
source§impl AreaChartDataset
impl AreaChartDataset
sourcepub fn new(color: [u8; 3], label: &str, alpha: f64) -> Self
pub fn new(color: [u8; 3], label: &str, alpha: f64) -> Self
Creates a new AreaChartDataset instance with the specified appearance and metadata.
§Parameters
color: The RGB color of the area fill.label: A descriptive label for the dataset.alpha: The transparency level of the area fill (0.0 to 1.0).
§Returns
A new AreaChartDataset instance with an empty list of points.
§Example
let dataset = AreaChartDataset::new([255, 0, 0], "Example Dataset", 0.5);Trait Implementations§
source§impl Dataset for AreaChartDataset
impl Dataset for AreaChartDataset
Auto Trait Implementations§
impl Freeze for AreaChartDataset
impl RefUnwindSafe for AreaChartDataset
impl Send for AreaChartDataset
impl Sync for AreaChartDataset
impl Unpin for AreaChartDataset
impl UnwindSafe for AreaChartDataset
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.