class

AsciiBarCharter

Inherits Reference < Object

Constants

BAR_CHARS = ['▿', '_', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█', '▴']
BAR_CHARS_ALT = ['■', '□', '▫', '☾', '◵', '◉', '◷', '☽', '▹', '▷', '▶']
BAR_COLORS = [:blue, :light_blue, :cyan, :light_cyan, :green, :light_green, :yellow, :light_magenta, :magenta, :light_red, :red]
BAR_COLORS_ALT = [:magenta, :red, :light_red, :light_yellow, :yellow, :black, :cyan, :light_cyan, :light_green, :green, :blue]
BKGD_COLOR = :white
VERSION = {{ (`shards version \"/tmp/tmp.OEifcB/src/src\"`).chomp.stringify }}

Constructors

new(min : Float64, max : Float64, precision : Int8, bar_chars : Array(Char) = BAR_CHARS, bar_colors : Array(Symbol) = BAR_COLORS, bkgd_color : Symbol = BKGD_COLOR, in_bw : Bool = false, inverted_chars : Bool = false, inverted_colors : Bool = false)
Source

Class methods

permutations(min = -1.0, max = 1.0, precision = 3.to_i8, bar_chars = AsciiBarCharter::BAR_CHARS, bar_colors = AsciiBarCharter::BAR_COLORS, bkgd_color = AsciiBarCharter::BKGD_COLOR, in_bw = false, inverted_chars = false, inverted_colors = false)
Source
show_examples
Source
show_examples_with_params
Source

Instance methods

bar(single_data, as_bar = true)
Source
bar_chars
Source
bar_chars=(bar_chars : Array(Char))
Source
bar_colors

TODO: allow usage of colors like Colorize::ColorRGB.new(0, 255, 255) i.e.: getter bar_colors : Array(Symbol | Colorize::ColorRGB)

Source
bar_prefixed_with_number(single_data)
Source
bar_step_qty
Source
bkgd_color
Source
bkgd_color=(bkgd_color : Symbol)
Source
in_bw
Source
inverted_chars
Source
inverted_chars=(inverted_chars : Bool)
Source
inverted_colors
Source
inverted_colors=(inverted_colors : Bool)
Source
min_max_delta
Source
plot(data, prefixed = false)
Source
precision
Source
reset_bar_chars(new_bar_chars : Array(Char) = BAR_CHARS)
Source
reset_bar_colors(new_bar_colors : Array(Symbol) = BAR_COLORS)
Source
reset_bars(new_bar_chars : Array(Char) = BAR_CHARS, new_bar_colors : Array(Symbol) = BAR_COLORS)
Source
toggle_bw
Source
validate!
Source

Nested types