diff --git a/src/symbols.rs b/src/symbols.rs index 33566c23..1b99fbfc 100644 --- a/src/symbols.rs +++ b/src/symbols.rs @@ -244,14 +244,21 @@ pub mod braille { /// Marker to use when plotting data points #[derive(Debug, Default, Display, EnumString, Clone, Copy, Eq, PartialEq, Hash)] pub enum Marker { - /// One point per cell in shape of dot + /// One point per cell in shape of dot ("•") #[default] Dot, - /// One point per cell in shape of a block + /// One point per cell in shape of a block ("█") Block, - /// One point per cell in the shape of a bar + /// One point per cell in the shape of a bar ("▄") Bar, - /// Up to 8 points per cell + /// Use the [Unicode Braille Patterns](https://en.wikipedia.org/wiki/Braille_Patterns) block to + /// represent data points. + /// + /// This is a 2x4 grid of dots, where each dot can be either on or off. + /// + /// Note: Support for this marker is limited to terminals and fonts that support Unicode + /// Braille Patterns. If your terminal does not support this, you will see unicode replacement + /// characters (�) instead of Braille dots. Braille, } diff --git a/src/widgets/canvas/mod.rs b/src/widgets/canvas/mod.rs index 8b4c94ff..679e9ea8 100644 --- a/src/widgets/canvas/mod.rs +++ b/src/widgets/canvas/mod.rs @@ -320,8 +320,16 @@ impl<'a> Context<'a> { } } -/// The Canvas widget may be used to draw more detailed figures using braille patterns (each -/// cell can have a braille character in 8 different positions). +/// The Canvas widget provides a means to draw shapes (Lines, Rectangles, Circles, etc.) on a grid. +/// +/// By default the grid is made of Braille patterns but you may change the marker to use a different +/// set of symbols. If your terminal or font does not support this unicode block, you will see +/// unicode replacement characters (�) instead of braille dots. The Braille patterns provide a more +/// fine grained result (2x4 dots) but you might want to use a simple dot, block, or bar instead by +/// calling the [`marker`] method if your target environment does not support those symbols, +/// +/// See [Unicode Braille Patterns](https://en.wikipedia.org/wiki/Braille_Patterns) for more info. +/// /// # Examples /// /// ``` @@ -355,6 +363,8 @@ impl<'a> Context<'a> { /// }); /// }); /// ``` +/// +/// [`marker`]: #method.marker #[derive(Debug, Clone, PartialEq)] pub struct Canvas<'a, F> where