pub struct BubbleChart { /* private fields */ }Expand description
Bubble chart widget. Bubble area is proportional to size.
§Example
use ratatui::{buffer::Buffer, layout::Rect, widgets::Widget};
use tui_chart::{BubbleChart, BubbleSeries};
let chart = BubbleChart::new([BubbleSeries::new("a", [(1.0, 2.0, 5.0), (3.0, 1.0, 9.0)])]);
let area = Rect::new(0, 0, 40, 12);
let mut buf = Buffer::empty(area);
chart.render(area, &mut buf);Implementations§
Source§impl BubbleChart
impl BubbleChart
Sourcepub fn new(series: impl IntoIterator<Item = BubbleSeries>) -> Self
pub fn new(series: impl IntoIterator<Item = BubbleSeries>) -> Self
Create a bubble chart.
Sourcepub fn max_radius(self, v: u16) -> Self
pub fn max_radius(self, v: u16) -> Self
Largest bubble radius in dots (default: a fraction of the plot size).
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).
Trait Implementations§
Source§impl Clone for BubbleChart
impl Clone for BubbleChart
Source§impl Debug for BubbleChart
impl Debug for BubbleChart
Source§impl Default for BubbleChart
impl Default for BubbleChart
Source§impl Widget for &BubbleChart
impl Widget for &BubbleChart
Auto Trait Implementations§
impl Freeze for BubbleChart
impl RefUnwindSafe for BubbleChart
impl Send for BubbleChart
impl Sync for BubbleChart
impl Unpin for BubbleChart
impl UnsafeUnpin for BubbleChart
impl UnwindSafe for BubbleChart
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