Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make it possible to disable has_last when labeled.

  • Loading branch information...
commit e60e076a0ace964daf83ccc9c527dba0c9ad76ec 1 parent d13d2ea
@jloveces jloveces authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.