ghazel-googlecharts 1.4.0.3 → 1.4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/gchart/version.rb +1 -0
  2. data/lib/gchart.rb +2 -4
  3. metadata +2 -3
@@ -3,6 +3,7 @@ module GchartInfo #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 4
5
5
  TINY = 0
6
+ MICRO = 4
6
7
 
7
8
  STRING = [MAJOR, MINOR, TINY].join('.')
8
9
  end
data/lib/gchart.rb CHANGED
@@ -141,8 +141,6 @@ class Gchart
141
141
  # global limits override individuals. is this preferred?
142
142
  mds[:min_value] = @min_value if not @min_value.nil?
143
143
  mds[:max_value] = @max_value if not @max_value.nil?
144
-
145
- # TODO: can you have grouped stacked bars?
146
144
 
147
145
  if mds_index == 0 and @type == :bar
148
146
  # TODO: unless you specify a zero line (using chp or chds),
@@ -390,7 +388,7 @@ class Gchart
390
388
 
391
389
  def set_labels
392
390
  if @legend.is_a?(Array)
393
- "chl=#{@legend.map{|label| "#{label}"}.join('|')}"
391
+ "chl=#{@legend.map{|label| "#{CGI::escape(label)}"}.join('|')}"
394
392
  else
395
393
  "chl=#{@legend}"
396
394
  end
@@ -488,7 +486,7 @@ class Gchart
488
486
  nil_char
489
487
  else
490
488
  if not range.nil?
491
- number = chars.size * (number - ds[:min_value]) / range
489
+ number = chars.size * (number - ds[:min_value]) / range.to_f
492
490
  number = [number, chars.size - 1].min
493
491
  end
494
492
  chars[number.to_i]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghazel-googlecharts
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.3
4
+ version: 1.4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Aimonetti
@@ -48,7 +48,6 @@ files:
48
48
  - website/index.txt
49
49
  has_rdoc: true
50
50
  homepage: http://googlecharts.rubyforge.org
51
- licenses:
52
51
  post_install_message:
53
52
  rdoc_options:
54
53
  - --main
@@ -70,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
69
  requirements: []
71
70
 
72
71
  rubyforge_project: googlecharts
73
- rubygems_version: 1.3.5
72
+ rubygems_version: 1.2.0
74
73
  signing_key:
75
74
  specification_version: 2
76
75
  summary: Sexy Charts using Google API & Ruby