rorschart 0.19.0 → 0.19.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2b55168d6f50301ffd2f698540699c686874737
4
- data.tar.gz: 76861bf80a11170d98a4c66a7250a012386165be
3
+ metadata.gz: 89b2471922171f15ed9895d9d20cc97cf5cd4ab2
4
+ data.tar.gz: 835fa0f0f9817fdde4bd12070bd2f7f9542030cd
5
5
  SHA512:
6
- metadata.gz: f06736ba362401c0177ddf36ea82a6ce94b64119a15ce802e897f8422bf3b4df5cd256689a35d2e418dfc3521fdb8f170fb808be77f1d29c443d0587d49ae6bf
7
- data.tar.gz: 75fcdd82886dbadb1bb2163744736a509b16001017ad868212c7c2cf7419341a05f29208475d713d35de85d7700d9c9887d19765d042202dcb68672e82fc1631
6
+ metadata.gz: 16778d1b4366785d7173c9f24b6d418bfe4e3f87142f2991bf1ed8a3314aa82b88a601f20ad4185ffafeb6aaef3557600af0cedad0686455d6bc4719d99e2e2a
7
+ data.tar.gz: 43fb93f4e00c05f1fd3fa35251af475942f37ad9ebd3252934467cc2fc4fcd04179beedcc3c6a530b32e3f3b618c601bf975128ca228136ba9797293b2557427
@@ -32,14 +32,20 @@ module Rorschart
32
32
  # The Merge:
33
33
  # For abscisse value, grab for each serie the corresponding row - or nil
34
34
  union_series = []
35
+ asc = true
35
36
  union_x.each { |x|
36
37
  row = [x]
37
38
  series_indexed.each { |serie_hash|
38
39
  row << serie_hash[x]
40
+ asc = asc && ascending?(serie_hash)
39
41
  }
40
42
  union_series << row.flatten
41
43
  }
42
44
 
45
+ if !asc
46
+ union_series = union_series.reverse
47
+ end
48
+
43
49
  # Return union of all series
44
50
  union_series
45
51
  end
@@ -64,5 +70,9 @@ module Rorschart
64
70
  serie_hash
65
71
  end
66
72
 
73
+ def ascending? hsh
74
+ hsh.keys == hsh.keys.sort
75
+ end
76
+
67
77
  end
68
78
  end
@@ -1,3 +1,3 @@
1
1
  module Rorschart
2
- VERSION = "0.19.0"
2
+ VERSION = "0.19.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rorschart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Pantera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-30 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  requirements: []
134
134
  rubyforge_project:
135
- rubygems_version: 2.2.2
135
+ rubygems_version: 2.2.5
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: Beautiful Google Charts from Rails data structures