pub enum Resolution {
Standard,
Braille,
}Expand description
Rendering resolution mode for pie charts.
Different resolution modes provide varying levels of detail by using different Unicode block drawing characters with different dot densities.
§Examples
use tui_piechart::{PieChart, PieSlice, Resolution};
use ratatui::style::Color;
let slices = vec![PieSlice::new("Rust", 45.0, Color::Red)];
// Standard resolution (1 dot per character)
let standard = PieChart::new(slices.clone())
.resolution(Resolution::Standard);
// High resolution with braille patterns (8 dots per character)
let braille = PieChart::new(slices)
.resolution(Resolution::Braille);Variants§
Standard
Standard resolution using full characters (1 dot per cell).
Uses regular Unicode characters like ●. This is the default mode.
Braille
Braille resolution using 2×4 dot patterns (8 dots per cell).
Uses Unicode braille patterns (U+2800-U+28FF) providing 8x resolution. This provides the highest resolution available for terminal rendering.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Resolution
impl Debug for Resolution
Source§impl Default for Resolution
impl Default for Resolution
Source§fn default() -> Resolution
fn default() -> Resolution
Returns the “default value” for a type. Read more
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl Copy for Resolution
impl Eq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnwindSafe for Resolution
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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