pub struct Treemap { /* private fields */ }Expand description
Squarified treemap widget.
Implementations§
Source§impl Treemap
impl Treemap
Sourcepub fn new(items: impl IntoIterator<Item = TreemapItem>) -> Self
pub fn new(items: impl IntoIterator<Item = TreemapItem>) -> Self
Create from items.
Sourcepub fn gradient(self, low: Color, high: Color) -> Self
pub fn gradient(self, low: Color, high: Color) -> Self
Color items without explicit color by value, interpolating low→high
(use Color::Rgb values for smooth results).
Sourcepub fn border_color(self, v: Color) -> Self
pub fn border_color(self, v: Color) -> Self
Border color.
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 show_values(self, v: bool) -> Self
pub fn show_values(self, v: bool) -> Self
Print the value under the label when there is room.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Treemap
impl RefUnwindSafe for Treemap
impl Send for Treemap
impl Sync for Treemap
impl Unpin for Treemap
impl UnsafeUnpin for Treemap
impl UnwindSafe for Treemap
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