pub enum NumberFormat {
Fixed(u8),
Auto(u8),
Percent(u8),
Compact,
}Expand description
How numbers are written on axes and labels (price axis, Plot axes,
value labels).
use ferrochart_core::format::NumberFormat;
let mut s = String::new();
NumberFormat::Auto(8).write(&mut s, 0.000_012_34);
assert_eq!(s, "0.0₄1234");
s.clear();
NumberFormat::Compact.write(&mut s, 1_250_000.0);
assert_eq!(s, "1.25M");Variants§
Fixed(u8)
Fixed decimals (a price series with a set precision).
Auto(u8)
Automatic precision with these decimals: subscript zeros below 1.
Percent(u8)
Fixed decimals with a % suffix (percentage scales).
Compact
K/M/B suffixes (a volume-only pane).
Implementations§
Source§impl NumberFormat
impl NumberFormat
Trait Implementations§
Source§impl Clone for NumberFormat
impl Clone for NumberFormat
impl Copy for NumberFormat
Source§impl Debug for NumberFormat
impl Debug for NumberFormat
impl Eq for NumberFormat
Source§impl PartialEq for NumberFormat
impl PartialEq for NumberFormat
impl StructuralPartialEq for NumberFormat
Auto Trait Implementations§
impl Forget for NumberFormat
impl Freeze for NumberFormat
impl Move for NumberFormat
impl RefUnwindSafe for NumberFormat
impl Send for NumberFormat
impl Sync for NumberFormat
impl Unpin for NumberFormat
impl UnsafeUnpin for NumberFormat
impl UnwindSafe for NumberFormat
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