Added title tag - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 562e7a1a4f5b7f4958b2138c05ca6ed0b371f9ad
(DIR) parent 11f18a2208ec2ba6e7983fba47a671290fbf3ac4
(HTM) Author: Jan Bromberger <janbromberger@JBMBP2-2.local>
Date: Tue, 29 Dec 2009 17:21:54 +0800
Added title tag
Diffstat:
M lib/simplabs/reports_as_sparkline/… | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/lib/simplabs/reports_as_sparkline/sparkline_tag_helper.rb b/lib/simplabs/reports_as_sparkline/sparkline_tag_helper.rb
@@ -22,7 +22,7 @@ module Simplabs #:nodoc:
# ==== Example
# <tt><%= sparkline_tag(User.registrations_report, :width => 200, :height => 100, :color => '000') %></tt>
def sparkline_tag(data, options = {})
- options.reverse_merge!({ :width => 300, :height => 34, :line_color => '0077cc', :fill_color => 'e6f2fa', :labels => [], :alt => '' })
+ options.reverse_merge!({ :width => 300, :height => 34, :line_color => '0077cc', :fill_color => 'e6f2fa', :labels => [], :alt => '', :title => '' })
data = data.collect { |d| d[1] }
labels = ""
unless options[:labels].empty?
@@ -34,7 +34,8 @@ module Simplabs #:nodoc:
end
image_tag(
"http://chart.apis.google.com/chart?cht=ls&chs=#{options[:width]}x#{options[:height]}&chd=t:#{data.join(',')}&chco=#{options[:line_color]}&chm=B,#{options[:fill_color]},0,0,0&chls=1,0,0&chds=#{data.min},#{data.max}#{labels}",
- :alt => options[:alt]
+ :alt => options[:alt],
+ :title => options[:title]
)
end