Browse files

Make it possible to disable has_last when labeled.

  • Loading branch information...
1 parent d13d2ea commit e60e076a0ace964daf83ccc9c527dba0c9ad76ec @jloveces jloveces committed Feb 16, 2009
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/sparklines.rb
View
6 lib/sparklines.rb
@@ -106,7 +106,7 @@ def plot_to_image(data=[], options={})
:has_min => false,
:has_max => false,
- :has_last => false,
+ :has_last => nil,
:has_std_dev => false,
:label => nil
@@ -689,7 +689,9 @@ def create_canvas(w, h, bkg_col)
# Make room for label and last value
unless @options[:label].nil?
- @options[:has_last] = true
+ if (@options[:has_last].nil?)
+ @options[:has_last] = true
+ end
@label_width = calculate_width(@options[:label])
@data_last_width = calculate_width(@data.last)
# HACK The 7.0 is a severe hack. Must figure out correct spacing

0 comments on commit e60e076

Please sign in to comment.