<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/open_flash_chart/extras.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,4 @@
 require 'open_flash_chart'
 
-ActionView::Base.send :include, OpenFlashChart::View
-OpenFlashChart::Base.send :include, OpenFlashChart::View
-ActionController::Base.send :include, OpenFlashChart::Controller
 ActionController::Base.send :include, OpenFlashChart
-ActiveRecord::Base.send :include, OpenFlashChart::View
-ActiveRecord::Base.send :include, OpenFlashChart::Controller
-ActiveRecord::Base.send :include, OpenFlashChart
\ No newline at end of file
+ActiveRecord::Base.send :include, OpenFlashChart</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +0,0 @@
-# Workaround a problem with script/plugin and http-based repos.
-# See http://dev.rubyonrails.org/ticket/8189
-Dir.chdir(Dir.getwd.sub(/vendor.*/, '')) do
-
-  ##
-  ## Copy over asset files (javascript/css/images) from the plugin directory to public/
-  ##
-
-  def copy_files(source_path, destination_path, directory)
-    source, destination = File.join(directory, source_path), File.join(RAILS_ROOT, destination_path)
-    # FileUtils.mkdir(destination) unless File.exist?(destination)
-    FileUtils.cp_r(Dir.glob(source+'/*.*'), destination)
-  end
-
-  directory = File.dirname(__FILE__)
-  copy_files(&quot;/assets&quot;, &quot;/public&quot;, directory)
-end</diff>
      <filename>install.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,46 +1,3 @@
 require 'open_flash_chart/base'
-require 'open_flash_chart/bar_base'
-require 'open_flash_chart/bar'
-require 'open_flash_chart/bar_3d'
-require 'open_flash_chart/bar_glass'
-require 'open_flash_chart/bar_sketch'
-require 'open_flash_chart/bar_filled'
-require 'open_flash_chart/bar_stack'
-require 'open_flash_chart/candle'
-require 'open_flash_chart/chart'
-require 'open_flash_chart/h_bar'
-require 'open_flash_chart/line_base'
-require 'open_flash_chart/line'
-require 'open_flash_chart/line_dot'
-require 'open_flash_chart/line_hollow'
-require 'open_flash_chart/pie'
-require 'open_flash_chart/scatter'
-require 'open_flash_chart/scatter_line'
-require 'open_flash_chart/radar_axis_labels'
-require 'open_flash_chart/radar_axis'
-require 'open_flash_chart/radar_spoke_labels'
-require 'open_flash_chart/title'
-require 'open_flash_chart/x_axis_label'
-require 'open_flash_chart/x_axis_labels'
-require 'open_flash_chart/x_axis'
-require 'open_flash_chart/x_legend'
-require 'open_flash_chart/y_axis_base'
-require 'open_flash_chart/y_axis'
-require 'open_flash_chart/y_axis_right'
-require 'open_flash_chart/y_legend'
-require 'open_flash_chart/y_legend_right'
-require 'open_flash_chart/legend'
-require 'open_flash_chart/tooltip'
-require 'open_flash_chart/area_base'
-require 'open_flash_chart/area_hollow'
-require 'open_flash_chart/area_line'
-require 'open_flash_chart/shape'
-require 'open_flash_chart/upload_image'
-require 'open_flash_chart/scatter_line'
-require 'open_flash_chart/radar_axis_labels'
-require 'open_flash_chart/radar_axis'
-require 'open_flash_chart/radar_spoke_labels'
-require 'open_flash_chart/linear_regression'
-
-require 'open_flash_chart/ofc_ajax'
 require 'open_flash_chart/open_flash_chart_object'
+require 'open_flash_chart/extras'</diff>
      <filename>lib/open_flash_chart.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,34 @@
 module OpenFlashChart
   class Base
+    include OFCExtras
 
+    # set all the instance variables we want
+    # assuming something like this OpenFlashChart.new(:x_axis =&gt; 5, :y_axis =&gt; 10, :elements =&gt; [&quot;one&quot;, &quot;two&quot;], ...)
     def initialize(args={})
-      # set all the instance variables we want
-      # assuming something like this OpenFlashChart.new(:x_axis =&gt; 5, :y_axis =&gt; 10, :elements =&gt; [&quot;one&quot;, &quot;two&quot;], ...)
-      args.each do |k,v|
-        self.instance_variable_set(&quot;@#{k}&quot;, v)
-      end
+      args.each{|k,v| self.send(&quot;#{k}=&quot;,v)}
+      self.type= self.class.to_s.underscore unless [Title].include?(self.class)
       yield self if block_given?  # magic pen pattern
     end
 
+    def method_missing(method_name, *args, &amp;blk)
+      case method_name.to_s
+      when /(.*)=/   # i.e., if it is something x_legend=
+        # if the user wants to set an instance variable then let them
+        # the other args (args[0]) are ignored since it is a set method
+        self.instance_variable_set(&quot;@#{$1}&quot;, args[0])
+      when /^set_(.*)/
+        # backwards compatible ... the user can still use the same set_y_legend methods if they want
+        self.instance_variable_set(&quot;@#{$1}&quot;, args[0])
+      else
+          if inst = self.instance_variable_get(&quot;@#{method_name}&quot;)
+            inst
+          else
+            # if the method/attribute is missing and it is not a set method then hmmmm better let the user know
+            super
+          end
+      end
+    end
+
     # same as to_s but won't stack overflow ... use this instead of to_s
     def render
       # need to return the following like this
@@ -24,81 +43,19 @@ module OpenFlashChart
       # 9) tick_length as tick-length
       # 10) visible_steps as visible-steps
       # 11) key_on_click as key-on-click
-      returning self.to_json2 do |output|
+      returning self.to_json do |output|
         output.gsub!(&quot;threed&quot;,&quot;3d&quot;)
-        %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 visible_steps key_on_click).each do |replace|
+        output.gsub!(&quot;default_dot_style&quot;,&quot;dot_style&quot;)
+        %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 visible_steps key_on_click dot_style).each do |replace|
           output.gsub!(replace, replace.gsub(&quot;_&quot;, &quot;-&quot;))
         end
       end
     end
-
-    def to_json2
-      self.instance_values.to_json
-    end    
-
-    alias_method :to_s, :render
-
-    def add_element(element)
-      @elements ||= []
-      @elements &lt;&lt; element
-    end
-
-    def &lt;&lt;(e)
-      add_element e
-    end
-
-    def set_key(text, size)
-      @text      = text
-      @font_size = size
-    end
-
-    def append_value(v)
-      @values ||= []
-      @values &lt;&lt; v
-    end
-
-    def set_range(min,max,steps=1)
-      @min   = min
-      @max   = max
-      @steps = steps
-    end
-
-    def set_offset(v)
-      @offset = v ? true : false
-    end
-
-    def set_colours(colour, grid_colour)
-      @colour      = colour
-      @grid_colour = grid_colour
-    end
-
-    def set_tooltip(tip)
-      if tip.is_a?(Tooltip)
-        #we have a style for our chart's tooltips
-        @tooltip = tip
-      else
-        # the user could just use set_tip(tip) or tip=(tip) to just set the text of the tooltip
-        @tip = tip
-      end
-    end
-    alias_method &quot;tooltip=&quot;, :set_tooltip
-
-
-
-    def method_missing(method_name, *args, &amp;blk)
-      case method_name.to_s
-      when /(.*)=/   # i.e., if it is something x_legend=
-        # if the user wants to set an instance variable then let them
-        # the other args (args[0]) are ignored since it is a set method
-        self.instance_variable_set(&quot;@#{$1}&quot;, args[0])
-      when /^set_(.*)/
-        # backwards compatible ... the user can still use the same set_y_legend methods if they want
-        self.instance_variable_set(&quot;@#{$1}&quot;, args[0])
-      else
-        # if the method/attribute is missing and it is not a set method then hmmmm better let the user know
-        super
-      end
-    end
-
   end
 end
+
+def OpenFlashChart.const_missing(const)
+  klass = Class.new OpenFlashChart::Base
+  Object.const_set const, klass
+  return klass
+end</diff>
      <filename>lib/open_flash_chart/base.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>assets/open-flash-chart-bar-clicking.swf</filename>
    </removed>
    <removed>
      <filename>assets/open-flash-chart.swf</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/area_base.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/area_hollow.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/area_line.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar_3d.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar_base.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar_filled.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar_glass.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar_sketch.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/bar_stack.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/candle.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/chart.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/h_bar.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/legend.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/line.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/line_base.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/line_dot.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/line_hollow.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/linear_regression.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/ofc_ajax.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/pie.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/radar_axis.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/radar_axis_labels.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/radar_spoke_labels.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/scatter.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/scatter_line.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/shape.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/title.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/tooltip.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/upload_image.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/x_axis.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/x_axis_label.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/x_axis_labels.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/x_legend.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/y_axis.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/y_axis_base.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/y_axis_right.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/y_legend.rb</filename>
    </removed>
    <removed>
      <filename>lib/open_flash_chart/y_legend_right.rb</filename>
    </removed>
    <removed>
      <filename>tasks/open_flash_chart_tasks.rake</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>f739d74be7423de823a814eb4f484089d7cf4eae</id>
    </parent>
  </parents>
  <author>
    <name>PullMonkey</name>
    <email>charlie@pullmonkey.com</email>
  </author>
  <url>http://github.com/pullmonkey/open_flash_chart/commit/f280c3714bd64d38fb49835893eff0afff452913</url>
  <id>f280c3714bd64d38fb49835893eff0afff452913</id>
  <committed-date>2009-04-13T09:53:31-07:00</committed-date>
  <authored-date>2009-04-13T09:53:31-07:00</authored-date>
  <message>make it lean</message>
  <tree>8c3eb0104c041e7014094a7f53a96aaa6a71bd39</tree>
  <committer>
    <name>PullMonkey</name>
    <email>charlie@pullmonkey.com</email>
  </committer>
</commit>
