0
+require 'open_flash_chart/base'
0
+require 'open_flash_chart/bar_base'
0
+require 'open_flash_chart/bar'
0
+require 'open_flash_chart/bar_3d'
0
+require 'open_flash_chart/bar_glass'
0
+require 'open_flash_chart/bar_sketch'
0
+require 'open_flash_chart/bar_filled'
0
+require 'open_flash_chart/bar_stack'
0
+require 'open_flash_chart/h_bar'
0
+require 'open_flash_chart/line_base'
0
+require 'open_flash_chart/line'
0
+require 'open_flash_chart/line_dot'
0
+require 'open_flash_chart/line_hollow'
0
+require 'open_flash_chart/pie'
0
+require 'open_flash_chart/scatter'
0
+require 'open_flash_chart/title'
0
+require 'open_flash_chart/x_axis_label'
0
+require 'open_flash_chart/x_axis_labels'
0
+require 'open_flash_chart/x_axis'
0
+require 'open_flash_chart/x_legend'
0
+require 'open_flash_chart/y_axis_base'
0
+require 'open_flash_chart/y_axis'
0
+require 'open_flash_chart/y_axis_right'
0
+require 'open_flash_chart/y_legend'
0
+require 'open_flash_chart/tooltip'
0
+require 'open_flash_chart/area_base'
0
+require 'open_flash_chart/area_hollow'
0
+require 'open_flash_chart/area_line'
0
+require 'open_flash_chart/shape'
0
+require 'open_flash_chart/upload_image'
0
- def initialize(args={})
0
- # set all the instance variables we want
0
- # assuming something like this OpenFlashChart.new(:x_axis => 5, :y_axis => 10, :elements => ["one", "two"], ...)
0
- self.instance_variable_set("@#{k}", v)
0
- # same as to_s but won't stack overflow ... use this instead of to_s
0
- # need to return the following like this
0
- # 1) font_size as font-size
0
- # 2) dot_size as dot-size
0
- # 3) outline_colour as outline-colour
0
- # 4) halo_size as halo-size
0
- # 5) start_angle as start-angle
0
- # 6) tick_height as tick-height
0
- # 7) grid_colour as grid-colour
0
- # 9) tick_length as tick-length
0
- to_return = self.to_json.gsub("threed","3d")
0
- %w(font_size dot_size outline_colour halo_size start_angle tick_height grid_colour tick_length no_labels label_colour gradient_fill fill_alpha on_click spoke_labels).each do |replace|
0
- to_return = to_return.gsub(replace, replace.gsub("_", "-"))
0
- # for those still using to_s and that do not get a stack overflow
0
- alias_method :to_s, :render
0
- def add_element(element)
0
- def set_key(text, size)
0
- def set_range(min,max,steps=1)
0
- @offset = v ? true : false
0
- def set_colours(colour, grid_colour)
0
- @grid_colour = grid_colour
0
- #we have a style for our chart's tooltips
0
- # the user could just use set_tip(tip) or tip=(tip) to just set the text of the tooltip
0
- alias_method "tooltip=", :set_tooltip
0
- def method_missing(method_name, *args)
0
- method_name = method_name.to_s
0
- if method_name =~ /(.*)=/ # i.e., if it is something x_legend=
0
- # if the user wants to set an instance variable then let them
0
- # the other args (args[0]) are ignored since it is a set method
0
- return self.instance_variable_set("@#{$1}", args[0])
0
- elsif method_name =~/^set_(.*)/
0
- # backwards compatible ... the user can still use the same set_y_legend methods if they want
0
- return self.instance_variable_set("@#{$1}", args[0])
0
- # if the method/attribute is missing and it is not a set method then hmmmm better let the user know
0
+require 'open_flash_chart/ofc_ajax'
0
+require 'open_flash_chart/open_flash_chart_object'