class AsciiBarCharter
- AsciiBarCharter
- Reference
- Object
Defined in:
ascii_bar_charter.crConstant Summary
-
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 \"/srv/crystaldoc.info/github-drhuffman12-ascii_bar_charter-v1.4.1/src\"`).chomp.stringify }}
Constructors
Class Method Summary
- .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)
- .show_examples
- .show_examples_with_params
Instance Method Summary
- #bar(single_data, as_bar = true)
- #bar_chars : Array(Char)
- #bar_chars=(bar_chars : Array(Char))
-
#bar_colors : Array(Symbol)
TODO allow usage of colors like
Colorize::ColorRGB.new(0, 255, 255)
i.e.:getter bar_colors : Array(Symbol | Colorize::ColorRGB)
- #bar_prefixed_with_number(single_data)
- #bar_step_qty : Int32
- #bkgd_color : Symbol
- #bkgd_color=(bkgd_color : Symbol)
- #in_bw : Bool
- #inverted_chars : Bool
- #inverted_chars=(inverted_chars : Bool)
- #inverted_colors : Bool
- #inverted_colors=(inverted_colors : Bool)
- #max : Float64
- #min : Float64
- #min_max_delta : Float64
- #plot(data, prefixed = false)
- #precision : Int8
- #reset_bar_chars(new_bar_chars : Array(Char) = BAR_CHARS)
- #reset_bar_colors(new_bar_colors : Array(Symbol) = BAR_COLORS)
- #reset_bars(new_bar_chars : Array(Char) = BAR_CHARS, new_bar_colors : Array(Symbol) = BAR_COLORS)
- #toggle_bw
- #validate!
Constructor Detail
def self.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)
#
Class Method Detail
def self.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)
#
Instance Method Detail
def bar_colors : Array(Symbol)
#
TODO allow usage of colors like Colorize::ColorRGB.new(0, 255, 255)
i.e.: getter bar_colors : Array(Symbol | Colorize::ColorRGB)
def reset_bars(new_bar_chars : Array(Char) = BAR_CHARS, new_bar_colors : Array(Symbol) = BAR_COLORS)
#