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 +4 -4
- data/lib/charts/line.rb +7 -1
- data/lib/charts/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7907093021c39dab0170487f82dcc831e32c4915
|
4
|
+
data.tar.gz: a6c37ce10b103848bdc8769238be16af36ed6a22
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 229a12296dccac7bcb467f59e795d9dae4842ab247ba1b2a59b54478ff67fb396706c84a7faaa9250a413ff60a23c4b2afd247bcb6686ea7f080cb32c1944ce3
|
7
|
+
data.tar.gz: d5a23184c4f432e4efb7ab5810148c579ae7bd2bbffe285a2dcce7c09b09e75aa0bd75b8428974e51409587743ac242bf83ce5cb263f83e07fb6cac94406e5fc
|
data/lib/charts/line.rb
CHANGED
@@ -121,7 +121,13 @@ module SVGCharts
|
|
121
121
|
@coordinates = []
|
122
122
|
|
123
123
|
y_positions = (@height - @y_retreat)/data.max
|
124
|
-
x_positions =
|
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)
|
data/lib/charts/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|