Tradify::Chart
Inherits Tradify::Component < Reference < Object
Constants
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
new(x, y, width, height, price_data : Array(Int32), order_price_avg : Int32 = 0)
new
Instance methods
draw(px, py)
draw_background
draw_grid
draw_init_price_line
draw_order_price_avg_line
draw_plot
draw_plot_line(price, thickness, color)
next_price
order_price_avg
order_price_avg=(order_price_avg : Int32)
price
update(px, py)
y_origin