class Tradify::Chart

Defined in:

tradify/chart.cr

Constant Summary

BACKGROUND_COLOR = LibRay::Color.new(r: 30, g: 30, b: 30, a: 0)
DATA_INTERVAL = Game::DEBUG ? 0.2 : 0.5
GRID_COLOR = LibRay::Color.new(r: 0, g: 255, b: 0, a: 30)
GRID_SIZE = 50
GRID_THICKNESS = 1
LINE_THICKNESS = 4
LINE_THICKNESS_RATIO = 2.0
PLOT_COLOR = LibRay::GREEN
POINT_SIZE = LINE_THICKNESS * 1.5

Constructors

Instance Method Summary

Instance methods inherited from class Tradify::Component

components : Array(Component) components, components=(components : Array(Component)) components=, draw(px, py)
draw
draw
, height : Int32 height, height=(height : Int32) height=, hidden? : Bool hidden?, hide hide, show show, shown? shown?, update(px, py)
update
update
, width : Int32 width, width=(width : Int32) width=, x : Int32 x, x=(x : Int32) x=, y : Int32 y, y=(y : Int32) y=

Constructor methods inherited from class Tradify::Component

new(x : Int32 = 0, y : Int32 = 0, width : Int32 = 0, height : Int32 = 0, components : Array(Tradify::Component) = [] of Component) new

Constructor Detail

def self.new(x, y, width, height, price_data : Array(Int32), order_price_avg : Int32 = 0) #

[View source]
def self.new #

[View source]

Instance Method Detail

def draw(px, py) #

[View source]
def draw_background #

[View source]
def draw_grid #

[View source]
def draw_init_price_line #

[View source]
def draw_order_price_avg_line #

[View source]
def draw_plot #

[View source]
def draw_plot_line(price, thickness, color) #

[View source]
def next_price #

[View source]
def order_price_avg : Int32 #

[View source]
def order_price_avg=(order_price_avg : Int32) #

[View source]
def price #

[View source]
def update(px, py) #

[View source]
def y_origin #

[View source]