Opal::UI::LineGraph
Inherits Opal::UI::Element < Opal::UI::Themable < Reference < Object
Renders 2D Cartesian line graphs and multi-series plots with axes, labels, tick marks, and smooth connected curves.
Constructors
Class methods
print(series : Array(LineSeries), title : String | Nil = nil, io : IO = STDOUT, width : Int32 | Nil = nil, height : Int32 = 14, min_y : Float64 | Nil = nil, max_y : Float64 | Nil = nil, show_grid : Bool = true, show_legend : Bool = true, color : Bool | Nil = nil, theme : Theme | Nil = nil) : Nil
Class convenience method printing styled line graph directly to IO
print(raw_series : Array(Tuple(String, Array(Float64))), title : String | Nil = nil, io : IO = STDOUT, width : Int32 | Nil = nil, height : Int32 = 14, min_y : Float64 | Nil = nil, max_y : Float64 | Nil = nil, show_grid : Bool = true, show_legend : Bool = true, color : Bool | Nil = nil, theme : Theme | Nil = nil) : Nil
Overload printing tuples of {name, data} directly to IO
to_string(series : Array(LineSeries), title : String | Nil = nil, width : Int32 | Nil = nil, height : Int32 = 14, min_y : Float64 | Nil = nil, max_y : Float64 | Nil = nil, show_grid : Bool = true, show_legend : Bool = true, color : Bool | Nil = nil, theme : Theme | Nil = nil) : String
Class convenience method returning styled line graph string
to_string(raw_series : Array(Tuple(String, Array(Float64))), title : String | Nil = nil, width : Int32 | Nil = nil, height : Int32 = 14, min_y : Float64 | Nil = nil, max_y : Float64 | Nil = nil, show_grid : Bool = true, show_legend : Bool = true, color : Bool | Nil = nil, theme : Theme | Nil = nil) : String
Overload accepting tuples of {name, data}
Instance methods
add_series(name : String, data : Array(Float64), color : Color | Symbol | String = :cyan) : LineSeries
Sourcemax_y
Sourcemin_y
Sourceseries
Sourceshow_grid?
Sourceshow_legend?
Sourcetitle
Source