svg_charts 2.2 → 2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95960a7842d17f41416b6bccec1fb00315d44cae
4
- data.tar.gz: 06a45740bb7b801adc3312dccf04c9e2e3b7d596
3
+ metadata.gz: 7907093021c39dab0170487f82dcc831e32c4915
4
+ data.tar.gz: a6c37ce10b103848bdc8769238be16af36ed6a22
5
5
  SHA512:
6
- metadata.gz: c5956d9cc923e43e3ac1f63e0d4956cc0030ebd646ea2d012bf855905d6fdd81db96631f63e34a098462ec7f2edf682e9542e0f6efcec19bb57290f9aea24838
7
- data.tar.gz: e204a35495b3d68dbc9749f2724991aaa3f5f980f8ba414adb90df518fab37c25a22c36db88d63509812da075371d8e088f7dfac3569bf13f463af73bc3811c8
6
+ metadata.gz: 229a12296dccac7bcb467f59e795d9dae4842ab247ba1b2a59b54478ff67fb396706c84a7faaa9250a413ff60a23c4b2afd247bcb6686ea7f080cb32c1944ce3
7
+ data.tar.gz: d5a23184c4f432e4efb7ab5810148c579ae7bd2bbffe285a2dcce7c09b09e75aa0bd75b8428974e51409587743ac242bf83ce5cb263f83e07fb6cac94406e5fc
@@ -121,7 +121,13 @@ module SVGCharts
121
121
  @coordinates = []
122
122
 
123
123
  y_positions = (@height - @y_retreat)/data.max
124
- x_positions = (@width - (@x_retreat * 2))/(data.size - 1)
124
+ x_positions = @width - (@x_retreat * 2)
125
+
126
+ if data.size == 1
127
+ x_positions = x_positions/data.size
128
+ else
129
+ x_positions = x_positions/(data.size - 1)
130
+ end
125
131
 
126
132
  data.each_with_index do |value, i|
127
133
  x1 = @x_retreat + (x_positions * i)
@@ -1,3 +1,3 @@
1
1
  module SVGCharts
2
- VERSION = "2.2"
2
+ VERSION = "2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svg_charts
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: '2.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rogério Zambon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-07 00:00:00.000000000 Z
11
+ date: 2013-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec