pub struct AreaGenerator { /* private fields */ }Expand description
Generates SVG path d strings for area charts.
Implementations§
Source§impl AreaGenerator
impl AreaGenerator
Sourcepub fn generate_line(&self, points: &[(f64, f64, f64)]) -> String
pub fn generate_line(&self, points: &[(f64, f64, f64)]) -> String
Generate an SVG path for just the top edge of the area (the stroke line).
This traces only the (x, y1) points — no baseline return, no close. Used to render a visible stroke line on top of the filled area.
Sourcepub fn generate(&self, points: &[(f64, f64, f64)]) -> String
pub fn generate(&self, points: &[(f64, f64, f64)]) -> String
Generate an SVG path from a series of (x, y0, y1) points.
The area is formed by:
- Forward path along (x, y1) – the top line
- Reverse path along (x, y0) – the bottom line (reversed)
- Close with “Z”
For non-stacked areas, y0 is typically the baseline (e.g., the bottom of the chart).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AreaGenerator
impl RefUnwindSafe for AreaGenerator
impl Send for AreaGenerator
impl Sync for AreaGenerator
impl Unpin for AreaGenerator
impl UnsafeUnpin for AreaGenerator
impl UnwindSafe for AreaGenerator
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