class OFC2::Graph
title
x_axis
y_axis
y_axis_right
x_legend
y_legend
bg_colour
elements
Public Class Methods
new(opts = {})
click to toggle source
# File lib/ofc2.rb, line 277 def initialize(opts = {}) @title = Title.new(:text => "Graph" ) @elements = [] opts.each do |name, value| self.send("#{name}=", value) end end
Public Instance Methods
add_element( e )
click to toggle source
# File lib/ofc2.rb, line 285 def add_element( e ) @elements << e end
Also aliased as: <<
render()
click to toggle source
# File lib/ofc2.rb, line 290 def render s = to_json # about underscores s.gsub!('___','') # that is for @___3d variable s.gsub!('__','-') # that is for @smt__smt variables # variables @smt_smt should go without changes s end