highcharts_on_rails 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NDM1NWUzMjQ3OWUyY2I3MDU3ZjI2NDQxZjVlMGYzNjA1NDVmMDJiOA==
5
- data.tar.gz: !binary |-
6
- NDYyOGRjYjA1ODNlNTI4YTQ4NzRjNDE5NzI3M2I2ZmE3NGFhNDRiZg==
2
+ SHA1:
3
+ metadata.gz: 8090403871d66a42515f6b2c48ec1c8745e6b8ee
4
+ data.tar.gz: 95eb8346d041552790359fd9b04d89861dbd1399
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YmM1MDM3ODFiMTkyMTk3ZTI0YjI2N2FjN2QxNWExMDlmZGM3ODRmNGIzNmZh
10
- ODczNjZjNTAyOWRjMmE4NzQwYTNjOTIxYmVhZWFkZDhlZGJmNGYwYTA0MDAz
11
- ZDhkNGQxMTg2YWFhMDkzNjk5NGRmN2E2MDRkYzAyODI1MmI3Mjg=
12
- data.tar.gz: !binary |-
13
- ZjFjYjBmZjdhMTVmOGI5NjQxOWJiYTYwNjU3ODQ5MDU0ZDI0NmE0YjJmMGQy
14
- OThmMjU5MzE4YWY0MThmNjEzZTE2NTI2NjI3NmQ3ZDBiZTA1YjRhMjMyOGIw
15
- YjI3ZDc2ZjFmZjEwMWIyYmVhYTM0ZTUwMGEyY2FkYjY1NmUyN2I=
6
+ metadata.gz: ca5fb4645bf77e27c9466f90e34dfe70fdf88f00433d4469fe6dccf080bd6e6d873334afaaa9c5aa11a229b149c98970a260df1f6beaa9bfac696aa0c1534d6f
7
+ data.tar.gz: 90a4769b1eaaf1f8506bea6ef7e9349ce9c44552df8b438702ee8f1b0faa117388f7f7f048c57c916baea531d9615006b1b75adf2e8a9ef00beb385f47098f91
@@ -6,6 +6,8 @@ require "highcharts_on_rails/pie_chart"
6
6
  require "highcharts_on_rails/hollow_pie_chart"
7
7
  require "highcharts_on_rails/line_chart"
8
8
  require "highcharts_on_rails/stacked_bar_chart"
9
+ require "highcharts_on_rails/gauge_chart"
10
+ require "highcharts_on_rails/polar_chart"
9
11
 
10
12
  module HighchartsOnRails
11
13
  end
@@ -77,6 +77,9 @@ class HighchartsOnRails::BaseChart
77
77
  add_json({xAxis: {categories: categories}})
78
78
  end
79
79
 
80
+ def series
81
+ @_series
82
+ end
80
83
 
81
84
  private
82
85
 
@@ -115,4 +118,4 @@ class HighchartsOnRails::BaseChart
115
118
  end
116
119
  result
117
120
  end
118
- end
121
+ end
@@ -0,0 +1,44 @@
1
+ class HighchartsOnRails::GaugeChart < HighchartsOnRails::BaseChart
2
+ add_json(
3
+ {
4
+ chart: {type: 'solidgauge'},
5
+ title: nil,
6
+ tooltip: {enabled: false},
7
+ credits: {enabled: false},
8
+ pane: {
9
+ center: ['50%', '85%'],
10
+ size: '140%',
11
+ startAngle: -90,
12
+ endAngle: 90,
13
+ background: {
14
+ backgroundColor: '#EEE',
15
+ innerRadius: '60%',
16
+ outerRadius: '100%',
17
+ shape: 'arc'
18
+ }
19
+ },
20
+ plotOptions: {
21
+ solidgauge: {
22
+ dataLabels: {
23
+ y: 5,
24
+ borderWidth: 0,
25
+ useHTML: true
26
+ }
27
+ }
28
+ },
29
+ yAxis: {
30
+ lineWidth: 0,
31
+ minorTickInterval: nil,
32
+ tickPixelInterval: 400,
33
+ tickWidth: 0,
34
+ title: {y: -70},
35
+ labels: {y: 16},
36
+ },
37
+ }
38
+ )
39
+
40
+ def add_series(label, data, options={})
41
+ @_series ||= []
42
+ @_series += [{name: label, data: data}.merge(options)]
43
+ end
44
+ end
@@ -0,0 +1,35 @@
1
+ class HighchartsOnRails::PolarChart < HighchartsOnRails::BaseChart
2
+ add_json(
3
+ {
4
+ chart: {
5
+ polar: true
6
+ },
7
+ title: {
8
+ text: ''
9
+ },
10
+ pane: {
11
+ startAngle: 0,
12
+ endAngle: 360
13
+ },
14
+ xAxis: {
15
+ tickInterval: 1,
16
+ min: 0,
17
+ },
18
+ plotOptions: {
19
+ column: {
20
+ pointPadding: 0,
21
+ groupPadding: 0
22
+ }
23
+ },
24
+ }
25
+ )
26
+
27
+ def add_series(label, data, options={})
28
+ @_series ||= []
29
+ if @_series.any?
30
+ @_series += [{name: label, data: data, type: 'line'}.merge(options)]
31
+ else
32
+ @_series += [{name: label, data: data, type: 'column'}.merge(options)]
33
+ end
34
+ end
35
+ end
@@ -1,3 +1,3 @@
1
1
  module HighchartsOnRails
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,47 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highcharts_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - stevo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-02 00:00:00.000000000 Z
11
+ date: 2015-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.2.12
20
- - - <
20
+ - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: '5.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ! '>='
27
+ - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: 3.2.12
30
- - - <
30
+ - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: sqlite3
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ! '>='
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ! '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0'
47
47
  description: Create highcharts in rails with ease!
@@ -51,6 +51,9 @@ executables: []
51
51
  extensions: []
52
52
  extra_rdoc_files: []
53
53
  files:
54
+ - MIT-LICENSE
55
+ - README.md
56
+ - Rakefile
54
57
  - app/assets/javascripts/highcharts_on_rails/application.js.coffee
55
58
  - app/assets/javascripts/highcharts_on_rails/charts.coffee
56
59
  - app/assets/stylesheets/highcharts_on_rails/application.css
@@ -58,25 +61,27 @@ files:
58
61
  - app/helpers/highcharts_on_rails/application_helper.rb
59
62
  - app/views/layouts/highcharts_on_rails/application.html.erb
60
63
  - config/routes.rb
64
+ - lib/highcharts_on_rails.rb
61
65
  - lib/highcharts_on_rails/bar_chart.rb
62
66
  - lib/highcharts_on_rails/base_chart.rb
63
67
  - lib/highcharts_on_rails/column_chart.rb
64
68
  - lib/highcharts_on_rails/engine.rb
69
+ - lib/highcharts_on_rails/gauge_chart.rb
65
70
  - lib/highcharts_on_rails/hollow_pie_chart.rb
66
71
  - lib/highcharts_on_rails/line_chart.rb
67
72
  - lib/highcharts_on_rails/pie_chart.rb
73
+ - lib/highcharts_on_rails/polar_chart.rb
68
74
  - lib/highcharts_on_rails/stacked_bar_chart.rb
69
75
  - lib/highcharts_on_rails/version.rb
70
- - lib/highcharts_on_rails.rb
71
76
  - lib/tasks/highcharts_on_rails_tasks.rake
72
- - MIT-LICENSE
73
- - Rakefile
74
- - README.md
77
+ - test/dummy/README.rdoc
78
+ - test/dummy/Rakefile
75
79
  - test/dummy/app/assets/javascripts/application.js
76
80
  - test/dummy/app/assets/stylesheets/application.css
77
81
  - test/dummy/app/controllers/application_controller.rb
78
82
  - test/dummy/app/helpers/application_helper.rb
79
83
  - test/dummy/app/views/layouts/application.html.erb
84
+ - test/dummy/config.ru
80
85
  - test/dummy/config/application.rb
81
86
  - test/dummy/config/boot.rb
82
87
  - test/dummy/config/database.yml
@@ -92,13 +97,10 @@ files:
92
97
  - test/dummy/config/initializers/wrap_parameters.rb
93
98
  - test/dummy/config/locales/en.yml
94
99
  - test/dummy/config/routes.rb
95
- - test/dummy/config.ru
96
100
  - test/dummy/public/404.html
97
101
  - test/dummy/public/422.html
98
102
  - test/dummy/public/500.html
99
103
  - test/dummy/public/favicon.ico
100
- - test/dummy/Rakefile
101
- - test/dummy/README.rdoc
102
104
  - test/dummy/script/rails
103
105
  - test/highcharts_on_rails_test.rb
104
106
  - test/integration/navigation_test.rb
@@ -112,17 +114,17 @@ require_paths:
112
114
  - lib
113
115
  required_ruby_version: !ruby/object:Gem::Requirement
114
116
  requirements:
115
- - - ! '>='
117
+ - - ">="
116
118
  - !ruby/object:Gem::Version
117
119
  version: '0'
118
120
  required_rubygems_version: !ruby/object:Gem::Requirement
119
121
  requirements:
120
- - - ! '>='
122
+ - - ">="
121
123
  - !ruby/object:Gem::Version
122
124
  version: '0'
123
125
  requirements: []
124
126
  rubyforge_project:
125
- rubygems_version: 2.1.10
127
+ rubygems_version: 2.2.2
126
128
  signing_key:
127
129
  specification_version: 4
128
130
  summary: Highcharts on steroids