html5jp_graphs 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/README.rdoc +4 -4
- data/lib/html5jp_graphs/version.rb +1 -1
- data/lib/html5jp_graphs_helper.rb +17 -7
- metadata +5 -8
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzU4MDljZWRkMDIyM2RlMDQwMzZmZGUxNTU5MjljYzc5YmY4Nzc5Mg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZDQ0YmM1NzkxNTIzNjIwY2FjM2I2Y2NlMzVmMzVjZTI5MTRhYTEwNw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
M2M1ZGNhNDg2MzlkOTk0NjQzMDIxZjE4YmVmN2U2ODg4NWY1MjNiYzBkZWVi
|
10
|
+
ZTYwMTVhMjIxYjZmMGNkMjc3OTkzMzBhNjY3MDMxNmVhZGYzMGIwNzAxYWMy
|
11
|
+
YTc0ZTU4M2Q0M2VlNWE0YTkyODJjOTZkY2U5OWYzOTYzZmE0YWY=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
M2FiYWJlN2UzM2M5NDZiYjNkOTIxZWYxMzkyMjE5YzllNjYyNDExYjBlZDU2
|
14
|
+
MDQ4M2NiZDEwOTZkZWI1MGIzZGJlZDNjYTQ2NTcyMTkyMjk0NzU3ZTNjYzc3
|
15
|
+
ZmFlODBhZTY1NWE5MWQ0N2NiZWI3MDVkMjJlOTcyZmJmZmE2MjU=
|
data/README.rdoc
CHANGED
@@ -15,13 +15,13 @@ There are 4 kinds of graphs in HTML5.jp.
|
|
15
15
|
With this plugin, you can easily draw graphs using helper methods.
|
16
16
|
Helper methods accepts both simple array data and your original complex model objects.
|
17
17
|
|
18
|
-
|
18
|
+
Note you need jQuery or prototype.js.
|
19
19
|
|
20
|
-
|
20
|
+
== Install
|
21
21
|
|
22
|
-
|
22
|
+
Add html5jp_graphs in your GemFile for Bundler.
|
23
23
|
|
24
|
-
|
24
|
+
gem 'html5jp_graphs'
|
25
25
|
|
26
26
|
==Setup
|
27
27
|
|
@@ -213,14 +213,24 @@ module Html5jpGraphsHelper
|
|
213
213
|
|
214
214
|
|
215
215
|
def draw(class_name, canvas_id, records, graph_options)
|
216
|
+
script = <<-EOS
|
217
|
+
var rc = new html5jp.graph.#{class_name}("#{canvas_id}");
|
218
|
+
if( ! rc ) { return; }
|
219
|
+
var records = #{to_js_value(records)};
|
220
|
+
var options = #{options_to_json(graph_options)};
|
221
|
+
rc.draw(records, options);
|
222
|
+
EOS
|
223
|
+
|
216
224
|
javascript_tag <<-EOS
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
}
|
225
|
+
if (jQuery) {
|
226
|
+
jQuery(function(){
|
227
|
+
#{script}
|
228
|
+
})
|
229
|
+
} else {
|
230
|
+
Event.observe(window, 'load', function() {
|
231
|
+
#{script}
|
232
|
+
})
|
233
|
+
}
|
224
234
|
EOS
|
225
235
|
end
|
226
236
|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html5jp_graphs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- nay3
|
@@ -10,7 +9,7 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2013-11-23 00:00:00.000000000 Z
|
14
13
|
dependencies: []
|
15
14
|
description: html5jp_graphs is a Rails Plugin for HTML5.jp graph libraries. It supports
|
16
15
|
vertical bar chart, radar chart, pie chart, and line chart.
|
@@ -61,28 +60,26 @@ files:
|
|
61
60
|
- test/html5jp_graphs_test.rb
|
62
61
|
homepage: http://github.com/nay/html5jp_graphs
|
63
62
|
licenses: []
|
63
|
+
metadata: {}
|
64
64
|
post_install_message:
|
65
65
|
rdoc_options: []
|
66
66
|
require_paths:
|
67
67
|
- lib
|
68
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
69
|
requirements:
|
71
70
|
- - ! '>='
|
72
71
|
- !ruby/object:Gem::Version
|
73
72
|
version: '0'
|
74
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
-
none: false
|
76
74
|
requirements:
|
77
75
|
- - ! '>='
|
78
76
|
- !ruby/object:Gem::Version
|
79
77
|
version: '0'
|
80
78
|
requirements: []
|
81
79
|
rubyforge_project:
|
82
|
-
rubygems_version:
|
80
|
+
rubygems_version: 2.0.5
|
83
81
|
signing_key:
|
84
|
-
specification_version:
|
82
|
+
specification_version: 4
|
85
83
|
summary: Rails Plugin for HTML5.jp Graph Libraries.
|
86
84
|
test_files:
|
87
85
|
- test/html5jp_graphs_test.rb
|
88
|
-
has_rdoc:
|