pub struct CharSet {Show 14 fields
pub horizontal: char,
pub vertical_line: char,
pub arc_down_right: char,
pub arc_down_left: char,
pub arc_up_right: char,
pub arc_up_left: char,
pub end_cap: char,
pub start_cap: char,
pub up_right: char,
pub down_horizontal: char,
pub dash_horizontal: char,
pub double_dash_horizontal: char,
pub heavy_dash_horizontal: char,
pub dot_horizontal: char,
}Expand description
Defines the set of characters used to draw a data series on the graph.
Each field controls a specific part of the line rendering — horizontal runs, vertical segments, corner arcs, NaN gap caps, axis corners, and tick marks. Swap out individual characters to change the visual style of a series without affecting the rendering logic.
Use create_char_set to create a uniform set where every character is
the same (e.g. * or •). Use struct update syntax (..Default::default())
to override only the fields you care about while keeping the rest as the
defaults from DEFAULT_CHAR_SET.
§Example
use asciigraph::options::CharSet;
// Override only the horizontal and vertical characters.
let partial = CharSet {
horizontal: '=',
vertical_line: '|',
..Default::default()
};Fields§
§horizontal: charHorizontal line character used for flat segments. Default: ─
vertical_line: charVertical line character used for steep segments. Default: │
arc_down_right: charCorner arc going down and to the right (rising series). Default: ╭
arc_down_left: charCorner arc going down and to the left (falling series). Default: ╮
arc_up_right: charCorner arc going up and to the right (falling series). Default: ╰
arc_up_left: charCorner arc going up and to the left (rising series). Default: ╯
end_cap: charEnd cap drawn at the last finite point before a NaN gap. Default: ╴
start_cap: charStart cap drawn at the first finite point after a NaN gap. Default: ╶
up_right: charBottom-left corner character for the X-axis. Default: └
down_horizontal: charTick mark character used on the X-axis. Default: ┬
dash_horizontal: charDashed horizontal character used for threshold lines. Default: ╌
double_dash_horizontal: charDashed horizontal character used for mean annotation. Default: ┄
heavy_dash_horizontal: charHeavy dashed horizontal character used for median annotation. Default: ╍
dot_horizontal: charDotted horizontal character used for standard deviation annotation. Default: ·