<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -6,7 +6,7 @@ class Page &lt; ActiveRecord::Base
     @pageviews = JSON.parse(self.daily_timeline.pageviews)
     @dates = JSON.parse(self.daily_timeline.dates)    
     maxval = @pageviews.max
-    normed_values = @pageviews.collect { |x| x * (120.0 / maxval)}
+    normed_values = @pageviews.collect { |x| x * (110.0 / maxval)}
     date_view_hash = {}
     @dates.each_with_index do |date, index|
       date_view_hash[date] = normed_values[index]
@@ -16,8 +16,13 @@ class Page &lt; ActiveRecord::Base
     return sorted_pageviews
   end
   
-  def sparkline
-    dataset = GC4R::API::GoogleChartDataset.new :data =&gt; self.normed_daily_pageviews, :color =&gt; '0000FF'
+  def sparkline( fillcolor='76A4FB' )
+    dataset = GC4R::API::GoogleChartDataset.new :data =&gt; self.normed_daily_pageviews, 
+      :color =&gt; '000000', :fill =&gt; ['B', fillcolor ,'0','0','0']
+    # red =&gt; FF0000
+    # lightblue =&gt; 76A4FB
+    # green =&gt; 33FF00
+    # darkblue =&gt; 0000FF    
     data = GC4R::API::GoogleChartData.new :datasets =&gt; dataset , :min =&gt; 0, :max =&gt; 120
     # @chart = GoogleBarChart.new :width =&gt; 120, :height =&gt; 12
     @chart = GC4R::API::GoogleSparklinesChart.new :width =&gt; 120, :height =&gt; 12</diff>
      <filename>app/models/page.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@
         &lt;tr&gt;
           &lt;td&gt;&lt;%= index + 1 + APP_CONFIG['articles_per_page']*(params[:page].to_i - 1) %&gt;&lt;/td&gt;
           &lt;td&gt;&lt;%= number_with_delimiter(page.total_pageviews, ',') %&gt;&lt;/td&gt;  
-          &lt;td&gt;&lt;%= link_to page.title, page  %&gt;&lt;BR&gt;&lt;%= image_tag page.sparkline.to_url %&gt; &lt;/td&gt;
+          &lt;td&gt;&lt;%= link_to page.title, page  %&gt;&lt;BR&gt;&lt;%= image_tag page.sparkline('76A4FB').to_url %&gt; &lt;/td&gt;
           &lt;td&gt;&lt;%= link_to 'http://en.wikipedia.org/wiki/' + page.url, 'http://en.wikipedia.org/wiki/' + page.url %&gt;&lt;/td&gt;
         &lt;/tr&gt;
       &lt;% end %&gt;</diff>
      <filename>app/views/pages/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -124,6 +124,18 @@ module GC4R
       !min.nil? &amp;&amp; !max.nil?
     end
   end
+  class ChartFillArea &lt; Struct.new :fill
+    include GoogleChartsObject
+    def get_param
+      &quot;chm&quot;
+    end
+    def get_value
+      expand_multiple fill, &quot;,&quot;
+    end
+    def valid?
+      !fill.nil? &amp;&amp; !fill.empty?
+    end
+  end  
   class ChartDataColor &lt; Struct.new :colors
     include GoogleChartsObject
     def get_param
@@ -288,11 +300,12 @@ module GC4R
     
     # data and dataset
     class GoogleChartDataset 
-      attr_accessor :data, :color, :title
+      attr_accessor :data, :color, :title, :fill
       def initialize options={}
         @data = options[:data]
         @color = options[:color]
         @title = options[:title]
+        @fill = options[:fill]
       end
     end
     class GoogleChartData &lt; ChartContainer
@@ -300,19 +313,23 @@ module GC4R
         datasets = [] 
         colors = []
         legend = []
+        fill = []
         if options[:datasets].is_a?(Array)
           options[:datasets].each do |dataset|
             datasets &lt;&lt; dataset.data
             colors &lt;&lt; dataset.color
+            fill &lt;&lt; dataset.fill            
             legend &lt;&lt; dataset.title
           end
         else
           datasets &lt;&lt; options[:datasets].data
           colors &lt;&lt; options[:datasets].color
+          fill &lt;&lt; options[:datasets].fill
           legend &lt;&lt; options[:datasets].title
         end
         add ChartData.new(datasets.compact)
         add ChartDataColor.new(colors.compact)
+        add ChartFillArea.new(fill.compact)
         add ChartDataLegend.new(legend.compact)
         add ChartDataPieLabels.new(legend.compact)
         add ChartDataScale.new(options[:min], options[:max])</diff>
      <filename>vendor/plugins/svn/lib/gc4r.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/gc4r.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>daceb7483e53a8ec1ab967c191afa1045a5085d4</id>
    </parent>
  </parents>
  <author>
    <name>Pete Skomoroch</name>
    <email>pete@datawrangling.com</email>
  </author>
  <url>http://github.com/datawrangling/trendingtopics/commit/061a94fbb6a0690a51748524bb60cf652fa83cc4</url>
  <id>061a94fbb6a0690a51748524bb60cf652fa83cc4</id>
  <committed-date>2009-06-03T16:16:13-07:00</committed-date>
  <authored-date>2009-06-03T16:16:13-07:00</authored-date>
  <message>extended gc4r to take sparkline fill areas</message>
  <tree>e396b5c34625434e4db42848180c92365235cd51</tree>
  <committer>
    <name>Pete Skomoroch</name>
    <email>pete@datawrangling.com</email>
  </committer>
</commit>
