Skip to main content

SkeletonLineChart

Struct SkeletonLineChart 

Source
pub struct SkeletonLineChart<'a> { /* private fields */ }
Expand description

Skeleton line chart rendered with braille traces over filled area.

Generates deterministic sine-wave paths that drift over time, rendered as braille dot traces with solid fill below each line. The filled area makes skeleton animations (Breathe, Sweep, Plasma) clearly visible, while the braille edge gives the chart its line-chart silhouette.

Implementations§

Source§

impl<'a> SkeletonLineChart<'a>

Source

pub fn new(elapsed_ms: u64) -> Self

Source

pub fn drift_ms(self, drift_ms: u64) -> Self

Override the timestamp used for wave drift.

When set, the wave shape is computed from this fixed value while color animation still uses elapsed_ms. Pass 0 to freeze the wave in place.

Source

pub fn mode(self, mode: AnimationMode) -> Self

Source

pub fn braille(self, braille: bool) -> Self

Source

pub fn base(self, color: impl Into<Color>) -> Self

Source

pub fn highlight(self, color: impl Into<Color>) -> Self

Source

pub fn lines(self, lines: u16) -> Self

Number of overlapping line traces. Default: 2.

Source

pub fn filled(self, filled: bool) -> Self

Fill the area below each line with . Default: true.

When enabled, the filled region carries the skeleton animation (Breathe/Sweep/Plasma) while the braille trace sits on top as the edge. Disable for line-only rendering.

Source

pub fn block(self, block: Block<'a>) -> Self

Trait Implementations§

Source§

impl<'a> Clone for SkeletonLineChart<'a>

Source§

fn clone(&self) -> SkeletonLineChart<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for SkeletonLineChart<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Widget for SkeletonLineChart<'_>

Source§

fn render(self, area: Rect, buf: &mut Buffer)

Draws the current state of the widget in the given buffer. That is the only method required to implement a custom widget.

Auto Trait Implementations§

§

impl<'a> Freeze for SkeletonLineChart<'a>

§

impl<'a> RefUnwindSafe for SkeletonLineChart<'a>

§

impl<'a> Send for SkeletonLineChart<'a>

§

impl<'a> Sync for SkeletonLineChart<'a>

§

impl<'a> Unpin for SkeletonLineChart<'a>

§

impl<'a> UnsafeUnpin for SkeletonLineChart<'a>

§

impl<'a> UnwindSafe for SkeletonLineChart<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.