pub struct RingStack { /* private fields */ }Expand description
Concentric 270° rings, one per (label, percent), with a legend.
§Example
use tui_chart::RingStack;
let stack = RingStack::new([("CPU", 72.0), ("RAM", 48.0), ("Disk", 91.0)]);Implementations§
Source§impl RingStack
impl RingStack
Sourcepub fn new<S: Into<String>>(items: impl IntoIterator<Item = (S, f64)>) -> Self
pub fn new<S: Into<String>>(items: impl IntoIterator<Item = (S, f64)>) -> Self
Create a ring stack from (label, percent) pairs, outermost first.
Sourcepub fn colors(self, colors: impl IntoIterator<Item = Color>) -> Self
pub fn colors(self, colors: impl IntoIterator<Item = Color>) -> Self
Ring colors by position (the theme / palette fills in the rest).
Hide rings by index, see RadialBar::hidden.
Sourcepub fn base_style(self, style: Style) -> Self
pub fn base_style(self, style: Style) -> Self
Base style painted over the whole area.
Trait Implementations§
Source§impl Themed for RingStack
Available on crate feature theme only.
impl Themed for RingStack
Available on crate feature
theme only.Source§fn apply_theme(self, theme: &Theme) -> Self
fn apply_theme(self, theme: &Theme) -> Self
Return
self styled from theme. Explicit per-item colors set on the
widget should keep winning over the theme.Source§fn themed(self, provider: &impl ThemeProvider) -> Self
fn themed(self, provider: &impl ThemeProvider) -> Self
Apply the theme produced by any
ThemeProvider.Auto Trait Implementations§
impl Forget for RingStack
impl Freeze for RingStack
impl RefUnwindSafe for RingStack
impl Send for RingStack
impl Sync for RingStack
impl Unpin for RingStack
impl UnsafeUnpin for RingStack
impl UnwindSafe for RingStack
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