cleaned up asset tage helper - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 2233c8215611f8dce155dff4597175d8dce8c155
(DIR) parent eacfacec016559287039c506ecb0cc88ec265488
(HTM) Author: Marco Otte-Witte <marco.otte-witte@simplabs.com>
Date: Wed, 14 Jan 2009 00:39:49 +0800
cleaned up asset tage helper
Signed-off-by: Marco Otte-Witte <marco.otte-witte@simplabs.com>
Diffstat:
M lib/kvlr/reports_as_sparkline/asse⦠| 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/lib/kvlr/reports_as_sparkline/asset_tag_helper.rb b/lib/kvlr/reports_as_sparkline/asset_tag_helper.rb
@@ -20,7 +20,7 @@ module Kvlr #:nodoc:
# <%= sparkline_tag(User.registrations_report, :width => 200, :height => 100, :color => '000') %>
def sparkline_tag(data, options = {})
options.reverse_merge!({:width => 300, :height => 34, :color => '0077cc'})
- data.collect! { |element| element[1].to_s }
+ data.collect! { |d| d[1] }
image_tag(
"http://chart.apis.google.com/chart?cht=ls&chs=#{options[:width]}x#{options[:height]}&chd=t:#{data.join(',')}&chco=#{options[:color]}&chm=B,E6F2FA,0,0,0&chls=1,0,0&chds=#{data.min},#{data.max}"
)