pub struct Funnel { /* private fields */ }Expand description
Funnel chart widget: centered bars whose width follows the value.
Implementations§
Source§impl Funnel
impl Funnel
Sourcepub fn new(stages: impl IntoIterator<Item = FunnelStage>) -> Self
pub fn new(stages: impl IntoIterator<Item = FunnelStage>) -> Self
Create a funnel from stages (first stage is the 100 % reference).
Sourcepub fn show_percent(self, v: bool) -> Self
pub fn show_percent(self, v: bool) -> Self
Show conversion percentage vs. the first stage (default on).
Sourcepub fn show_dropoff(self, v: bool) -> Self
pub fn show_dropoff(self, v: bool) -> Self
Show the drop-off vs. the previous stage (default on).
Sourcepub fn taper(self, v: bool) -> Self
pub fn taper(self, v: bool) -> Self
Connect stages into one tapering funnel (default on); off draws separate bars.
Sourcepub fn base_style(self, style: Style) -> Self
pub fn base_style(self, style: Style) -> Self
Base style painted over the whole area (beats the theme).
Sourcepub fn conversions(&self) -> Vec<f64>
pub fn conversions(&self) -> Vec<f64>
Conversion of each stage relative to the first (0..=1; 0 if the first is 0).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Funnel
impl RefUnwindSafe for Funnel
impl Send for Funnel
impl Sync for Funnel
impl Unpin for Funnel
impl UnsafeUnpin for Funnel
impl UnwindSafe for Funnel
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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