<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,6 +2,7 @@
 
 * Fixed manifest to list dot graph [theirishpenguin]
 * Fixed color cycling error [Gunnar Wolf]
+* Handle case where a line graph data set only has one value [Ron Colwill]
 
 == 0.3.5
 </diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -16,10 +16,10 @@ class Gruff::Line &lt; Gruff::Base
 
   # Draw a dashed line at the given value
   attr_accessor :baseline_value
-	
+
   # Color of the baseline
   attr_accessor :baseline_color
-  
+
   # Hide parts of the graph to fit more datapoints, or for a different appearance.
   attr_accessor :hide_dots, :hide_lines
 
@@ -30,7 +30,7 @@ class Gruff::Line &lt; Gruff::Base
   #  g = Gruff::Line.new(400, false) # 400px wide, no lines (for backwards compatibility)
   #
   #  g = Gruff::Line.new(false) # Defaults to 800px wide, no lines (for backwards compatibility)
-  # 
+  #
   # The preferred way is to call hide_dots or hide_lines instead.
   def initialize(*args)
     raise ArgumentError, &quot;Wrong number of arguments&quot; if args.length &gt; 2
@@ -39,7 +39,7 @@ class Gruff::Line &lt; Gruff::Base
     else
       super args.shift
     end
-    
+
     @hide_dots = @hide_lines = false
     @baseline_color = 'red'
     @baseline_value = nil
@@ -49,10 +49,10 @@ class Gruff::Line &lt; Gruff::Base
     super
 
     return unless @has_data
-    
-    # Check to see if more than one datapoint was given. NaN can result otherwise.  
+
+    # Check to see if more than one datapoint was given. NaN can result otherwise.
     @x_increment = (@column_count &gt; 1) ? (@graph_width / (@column_count - 1).to_f) : @graph_width
-     
+
     if (defined?(@norm_baseline)) then
       level = @graph_top + (@graph_height - @norm_baseline * @graph_height)
       @d = @d.push
@@ -64,9 +64,11 @@ class Gruff::Line &lt; Gruff::Base
       @d = @d.pop
     end
 
-    @norm_data.each do |data_row|      
+    @norm_data.each do |data_row|
       prev_x = prev_y = nil
 
+      @one_point = contains_one_point_only?(data_row)
+
       data_row[DATA_VALUES_INDEX].each_with_index do |data_point, index|
         new_x = @graph_left + (@x_increment * index)
         next if data_point.nil?
@@ -81,10 +83,15 @@ class Gruff::Line &lt; Gruff::Base
         @d = @d.stroke_opacity 1.0
         @d = @d.stroke_width clip_value_if_greater_than(@columns / (@norm_data.first[DATA_VALUES_INDEX].size * 4), 5.0)
 
-        if !@hide_lines and !prev_x.nil? and !prev_y.nil? then          
+
+        circle_radius = clip_value_if_greater_than(@columns / (@norm_data.first[DATA_VALUES_INDEX].size * 2.5), 5.0)
+
+        if !@hide_lines and !prev_x.nil? and !prev_y.nil? then
           @d = @d.line(prev_x, prev_y, new_x, new_y)
+        elsif @one_point
+          # Show a circle if there's just one_point
+          @d = @d.circle(new_x, new_y, new_x - circle_radius, new_y)
         end
-        circle_radius = clip_value_if_greater_than(@columns / (@norm_data.first[DATA_VALUES_INDEX].size * 2.5), 5.0)
         @d = @d.circle(new_x, new_y, new_x - circle_radius, new_y) unless @hide_dots
 
         prev_x = new_x
@@ -101,5 +108,22 @@ class Gruff::Line &lt; Gruff::Base
     super
     @norm_baseline = (@baseline_value.to_f / @maximum_value.to_f) if @baseline_value
   end
-  
+
+  def contains_one_point_only?(data_row)
+    # Spin through data to determine if there is just one_value present.
+    one_point = false
+    data_row[DATA_VALUES_INDEX].each do |data_point|
+      if !data_point.nil?
+        if one_point
+          # more than one point, bail
+          return false
+        else
+          # there is at least one data point
+          return true
+        end
+      end
+    end
+    return one_point
+  end
+
 end</diff>
      <filename>lib/gruff/line.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ff7f5fa17810b35e61cc6562676c7a3062c77ed8</id>
    </parent>
  </parents>
  <author>
    <name>Geoffrey Grosenbach</name>
    <email>boss@topfunky.com</email>
  </author>
  <url>http://github.com/topfunky/gruff/commit/04cb4198a08c1c14e3766c30177c3ee0066ad925</url>
  <id>04cb4198a08c1c14e3766c30177c3ee0066ad925</id>
  <committed-date>2009-03-23T12:26:26-07:00</committed-date>
  <authored-date>2009-03-23T12:26:26-07:00</authored-date>
  <message>Handle a case where a line graph data set only has one value [Ron Colwill]</message>
  <tree>36ac3382ee2f8b9ec70eac1c165e2473b74bf62b</tree>
  <committer>
    <name>Geoffrey Grosenbach</name>
    <email>boss@topfunky.com</email>
  </committer>
</commit>
