class CrystalCliGraph::Legend

Defined in:

crystal_cli_graph/legend.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(data : Array(Int32), labels : Array(String), key_chars : Array(String), max_width : Int32) #

Warning: assumes there will be a space between each word. This is not a valid assumption for all languages


[View source]

Instance Method Detail

def data : Array(Int32) #

[View source]
def generate : String #

[View source]
def generate_horizantal_edge(max_width : Int32) : String #

[View source]
def generate_legend_row(legend : String, key : String, max_width : Int32, max_key_chars : Int32) : Array(String) #

[View source]
def labels : Array(String) #

[View source]
def max_width : Int32 #

[View source]
def pad_rows_to_width(rows : Array(String), largest_legend_size : Int32) : Array(String) #

[View source]
def wrap_string_to_width(string : String, width : Int32) : Array(String) #

[View source]