Opal::UI::BarChart
Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object
Renders horizontal bar charts with labels, percentage scaling, and values.
Constructors
Class methods
print(items : Array(BarItem), title : String | Nil = nil, io : IO = STDOUT, width : Int32 | Nil = nil, bar_char : Char = '█', max_value : Float64 | Nil = nil, color : Bool | Nil = nil, theme : Theme | Nil = nil) : Nil
Class convenience method printing styled barchart directly to IO
print(raw_items : Array(Tuple(String, Float64)), title : String | Nil = nil, io : IO = STDOUT, width : Int32 | Nil = nil, bar_char : Char = '█', max_value : Float64 | Nil = nil, color : Bool | Nil = nil, theme : Theme | Nil = nil) : Nil
Overload printing tuples of {label, value} directly to IO
Instance methods
add(label : String, value : Float64, color : Color | Symbol | String = :cyan, formatted_value : String | Nil = nil) : Nil
Sourcebar_char
Sourceitems
Sourcemax_value
SourcePreferred size in print mode: full item count plus title lines
title
Source