highcharts-rails 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,262 @@
1
+ /**
2
+ * Gray theme for Highcharts JS
3
+ * @author Torstein Hønsi
4
+ */
5
+
6
+ Highcharts.theme = {
7
+ colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
8
+ "#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
9
+ chart: {
10
+ backgroundColor: {
11
+ linearGradient: [0, 0, 0, 400],
12
+ stops: [
13
+ [0, 'rgb(96, 96, 96)'],
14
+ [1, 'rgb(16, 16, 16)']
15
+ ]
16
+ },
17
+ borderWidth: 0,
18
+ borderRadius: 15,
19
+ plotBackgroundColor: null,
20
+ plotShadow: false,
21
+ plotBorderWidth: 0
22
+ },
23
+ title: {
24
+ style: {
25
+ color: '#FFF',
26
+ font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
27
+ }
28
+ },
29
+ subtitle: {
30
+ style: {
31
+ color: '#DDD',
32
+ font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
33
+ }
34
+ },
35
+ xAxis: {
36
+ gridLineWidth: 0,
37
+ lineColor: '#999',
38
+ tickColor: '#999',
39
+ labels: {
40
+ style: {
41
+ color: '#999',
42
+ fontWeight: 'bold'
43
+ }
44
+ },
45
+ title: {
46
+ style: {
47
+ color: '#AAA',
48
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
49
+ }
50
+ }
51
+ },
52
+ yAxis: {
53
+ alternateGridColor: null,
54
+ minorTickInterval: null,
55
+ gridLineColor: 'rgba(255, 255, 255, .1)',
56
+ lineWidth: 0,
57
+ tickWidth: 0,
58
+ labels: {
59
+ style: {
60
+ color: '#999',
61
+ fontWeight: 'bold'
62
+ }
63
+ },
64
+ title: {
65
+ style: {
66
+ color: '#AAA',
67
+ font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
68
+ }
69
+ }
70
+ },
71
+ legend: {
72
+ itemStyle: {
73
+ color: '#CCC'
74
+ },
75
+ itemHoverStyle: {
76
+ color: '#FFF'
77
+ },
78
+ itemHiddenStyle: {
79
+ color: '#333'
80
+ }
81
+ },
82
+ labels: {
83
+ style: {
84
+ color: '#CCC'
85
+ }
86
+ },
87
+ tooltip: {
88
+ backgroundColor: {
89
+ linearGradient: [0, 0, 0, 50],
90
+ stops: [
91
+ [0, 'rgba(96, 96, 96, .8)'],
92
+ [1, 'rgba(16, 16, 16, .8)']
93
+ ]
94
+ },
95
+ borderWidth: 0,
96
+ style: {
97
+ color: '#FFF'
98
+ }
99
+ },
100
+
101
+
102
+ plotOptions: {
103
+ line: {
104
+ dataLabels: {
105
+ color: '#CCC'
106
+ },
107
+ marker: {
108
+ lineColor: '#333'
109
+ }
110
+ },
111
+ spline: {
112
+ marker: {
113
+ lineColor: '#333'
114
+ }
115
+ },
116
+ scatter: {
117
+ marker: {
118
+ lineColor: '#333'
119
+ }
120
+ },
121
+ candlestick: {
122
+ lineColor: 'white'
123
+ }
124
+ },
125
+
126
+ toolbar: {
127
+ itemStyle: {
128
+ color: '#CCC'
129
+ }
130
+ },
131
+
132
+ navigation: {
133
+ buttonOptions: {
134
+ backgroundColor: {
135
+ linearGradient: [0, 0, 0, 20],
136
+ stops: [
137
+ [0.4, '#606060'],
138
+ [0.6, '#333333']
139
+ ]
140
+ },
141
+ borderColor: '#000000',
142
+ symbolStroke: '#C0C0C0',
143
+ hoverSymbolStroke: '#FFFFFF'
144
+ }
145
+ },
146
+
147
+ exporting: {
148
+ buttons: {
149
+ exportButton: {
150
+ symbolFill: '#55BE3B'
151
+ },
152
+ printButton: {
153
+ symbolFill: '#7797BE'
154
+ }
155
+ }
156
+ },
157
+
158
+ // scroll charts
159
+ rangeSelector: {
160
+ buttonTheme: {
161
+ fill: {
162
+ linearGradient: [0, 0, 0, 20],
163
+ stops: [
164
+ [0.4, '#888'],
165
+ [0.6, '#555']
166
+ ]
167
+ },
168
+ stroke: '#000000',
169
+ style: {
170
+ color: '#CCC',
171
+ fontWeight: 'bold'
172
+ },
173
+ states: {
174
+ hover: {
175
+ fill: {
176
+ linearGradient: [0, 0, 0, 20],
177
+ stops: [
178
+ [0.4, '#BBB'],
179
+ [0.6, '#888']
180
+ ]
181
+ },
182
+ stroke: '#000000',
183
+ style: {
184
+ color: 'white'
185
+ }
186
+ },
187
+ select: {
188
+ fill: {
189
+ linearGradient: [0, 0, 0, 20],
190
+ stops: [
191
+ [0.1, '#000'],
192
+ [0.3, '#333']
193
+ ]
194
+ },
195
+ stroke: '#000000',
196
+ style: {
197
+ color: 'yellow'
198
+ }
199
+ }
200
+ }
201
+ },
202
+ inputStyle: {
203
+ backgroundColor: '#333',
204
+ color: 'silver'
205
+ },
206
+ labelStyle: {
207
+ color: 'silver'
208
+ }
209
+ },
210
+
211
+ navigator: {
212
+ handles: {
213
+ backgroundColor: '#666',
214
+ borderColor: '#AAA'
215
+ },
216
+ outlineColor: '#CCC',
217
+ maskFill: 'rgba(16, 16, 16, 0.5)',
218
+ series: {
219
+ color: '#7798BF',
220
+ lineColor: '#A6C7ED'
221
+ }
222
+ },
223
+
224
+ scrollbar: {
225
+ barBackgroundColor: {
226
+ linearGradient: [0, 0, 0, 20],
227
+ stops: [
228
+ [0.4, '#888'],
229
+ [0.6, '#555']
230
+ ]
231
+ },
232
+ barBorderColor: '#CCC',
233
+ buttonArrowColor: '#CCC',
234
+ buttonBackgroundColor: {
235
+ linearGradient: [0, 0, 0, 20],
236
+ stops: [
237
+ [0.4, '#888'],
238
+ [0.6, '#555']
239
+ ]
240
+ },
241
+ buttonBorderColor: '#CCC',
242
+ rifleColor: '#FFF',
243
+ trackBackgroundColor: {
244
+ linearGradient: [0, 0, 0, 10],
245
+ stops: [
246
+ [0, '#000'],
247
+ [1, '#333']
248
+ ]
249
+ },
250
+ trackBorderColor: '#666'
251
+ },
252
+
253
+ // special colors for some of the demo examples
254
+ legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
255
+ legendBackgroundColorSolid: 'rgb(70, 70, 70)',
256
+ dataLabelsColor: '#444',
257
+ textColor: '#E0E0E0',
258
+ maskColor: 'rgba(255,255,255,0.3)'
259
+ };
260
+
261
+ // Apply the theme
262
+ var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Grid theme for Highcharts JS
3
+ * @author Torstein Hønsi
4
+ */
5
+
6
+ Highcharts.theme = {
7
+ colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
8
+ chart: {
9
+ backgroundColor: {
10
+ linearGradient: [0, 0, 500, 500],
11
+ stops: [
12
+ [0, 'rgb(255, 255, 255)'],
13
+ [1, 'rgb(240, 240, 255)']
14
+ ]
15
+ }
16
+ ,
17
+ borderWidth: 2,
18
+ plotBackgroundColor: 'rgba(255, 255, 255, .9)',
19
+ plotShadow: true,
20
+ plotBorderWidth: 1
21
+ },
22
+ title: {
23
+ style: {
24
+ color: '#000',
25
+ font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
26
+ }
27
+ },
28
+ subtitle: {
29
+ style: {
30
+ color: '#666666',
31
+ font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
32
+ }
33
+ },
34
+ xAxis: {
35
+ gridLineWidth: 1,
36
+ lineColor: '#000',
37
+ tickColor: '#000',
38
+ labels: {
39
+ style: {
40
+ color: '#000',
41
+ font: '11px Trebuchet MS, Verdana, sans-serif'
42
+ }
43
+ },
44
+ title: {
45
+ style: {
46
+ color: '#333',
47
+ fontWeight: 'bold',
48
+ fontSize: '12px',
49
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
50
+
51
+ }
52
+ }
53
+ },
54
+ yAxis: {
55
+ minorTickInterval: 'auto',
56
+ lineColor: '#000',
57
+ lineWidth: 1,
58
+ tickWidth: 1,
59
+ tickColor: '#000',
60
+ labels: {
61
+ style: {
62
+ color: '#000',
63
+ font: '11px Trebuchet MS, Verdana, sans-serif'
64
+ }
65
+ },
66
+ title: {
67
+ style: {
68
+ color: '#333',
69
+ fontWeight: 'bold',
70
+ fontSize: '12px',
71
+ fontFamily: 'Trebuchet MS, Verdana, sans-serif'
72
+ }
73
+ }
74
+ },
75
+ legend: {
76
+ itemStyle: {
77
+ font: '9pt Trebuchet MS, Verdana, sans-serif',
78
+ color: 'black'
79
+
80
+ },
81
+ itemHoverStyle: {
82
+ color: '#039'
83
+ },
84
+ itemHiddenStyle: {
85
+ color: 'gray'
86
+ }
87
+ },
88
+ labels: {
89
+ style: {
90
+ color: '#99b'
91
+ }
92
+ }
93
+ };
94
+
95
+ // Apply the theme
96
+ var highchartsOptions = Highcharts.setOptions(Highcharts.theme);
97
+
metadata ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: highcharts-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Per Christian B. Viken
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-10 00:00:00.000000000 +02:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: railties
17
+ requirement: &70131087262380 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '3.1'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: *70131087262380
26
+ - !ruby/object:Gem::Dependency
27
+ name: bundler
28
+ requirement: &70131087261860 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *70131087261860
37
+ - !ruby/object:Gem::Dependency
38
+ name: rails
39
+ requirement: &70131087261400 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '3.1'
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *70131087261400
48
+ description: Gem that includes Highcharts, Interactive JavaScript charts for your
49
+ web projects, in the Rails Asset Pipeline introduced in Rails 3.1
50
+ email:
51
+ - perchr@northblue.org
52
+ executables: []
53
+ extensions: []
54
+ extra_rdoc_files: []
55
+ files:
56
+ - .gitignore
57
+ - Gemfile
58
+ - LICENSE
59
+ - README.markdown
60
+ - Rakefile
61
+ - highcharts-rails.gemspec
62
+ - lib/highcharts-rails.rb
63
+ - lib/highcharts/rails.rb
64
+ - lib/highcharts/version.rb
65
+ - vendor/assets/javascripts/highcharts.js
66
+ - vendor/assets/javascripts/highcharts/adapters/mootools.js
67
+ - vendor/assets/javascripts/highcharts/adapters/prototype.js
68
+ - vendor/assets/javascripts/highcharts/modules/exporting.js
69
+ - vendor/assets/javascripts/highcharts/themes/dark-blue.js
70
+ - vendor/assets/javascripts/highcharts/themes/dark-green.js
71
+ - vendor/assets/javascripts/highcharts/themes/gray.js
72
+ - vendor/assets/javascripts/highcharts/themes/grid.js
73
+ has_rdoc: true
74
+ homepage: http://northblue.org/
75
+ licenses: []
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ none: false
88
+ requirements:
89
+ - - ! '>='
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 1.6.2
95
+ signing_key:
96
+ specification_version: 3
97
+ summary: Gem for easily adding Highcharts to the Rails Asset Pipeline
98
+ test_files: []