chartjs-ror 2.1.1 → 2.1.2
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 +4 -4
- data/README.md +1 -1
- data/lib/chartjs/chart_helpers.rb +5 -1
- data/lib/chartjs/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: 223baba16a8ea746361628eafb3a4fdef27ffb0f
|
|
4
|
+
data.tar.gz: bed00fc2642beffc2ddb300b0b0fca9f3dafda06
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8807f62f6515e5e6b1f975507d1cf3a2f15dfbcd7b86a6d9d8270b4d19f5641394f4d34277ba0fad3ef8d69432bc0c7d4146c9c3ed44d96a012821f352922d62
|
|
7
|
+
data.tar.gz: 6721a4a5e0ade6a04ab0be10be73a235d0750c92091f351c519b40311a009668217e4db528ffafa09ee46f41f25e98fa3889569c33950406ae63265069fd74f0
|
data/README.md
CHANGED
|
@@ -135,7 +135,7 @@ options = {}
|
|
|
135
135
|
You can put anything in the `options` hash that Chart.js recognises. It also supports these non-Chart.js settings:
|
|
136
136
|
|
|
137
137
|
* `:class` - class of the enclosing `<figure/>` - default is `chart`.
|
|
138
|
-
* `:
|
|
138
|
+
* `:id` - id of the `<canvas/>` - default is `chart-n` where `n` is the 0-based index of the chart on the page.
|
|
139
139
|
* `:width` - width of the canvas in px - default is `400`.
|
|
140
140
|
* `:height` - height of the canvas in px - default is `400`.
|
|
141
141
|
* `:generateLegend` - whether or not to generate a legend - default is `false`.
|
|
@@ -40,7 +40,11 @@ module Chartjs
|
|
|
40
40
|
window.Chart && window.Chart[#{element_id.to_json}] && window.Chart[#{element_id.to_json}].destroy();
|
|
41
41
|
|
|
42
42
|
var data = #{data.to_json};
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
var opts = #{options.reject { |k,_| ['onAnimationComplete', 'onAnimationProgress'].include? k }.to_json};
|
|
45
|
+
opts["onAnimationComplete"] = #{options[:onAnimationComplete] || 'function(){}'};
|
|
46
|
+
opts["onAnimationProgress"] = #{options[:onAnimationProgress] || 'function(){}'};
|
|
47
|
+
|
|
44
48
|
if (!("animation" in opts)) {
|
|
45
49
|
opts["animation"] = (typeof Modernizr == "undefined") || Modernizr.canvas;
|
|
46
50
|
}
|
data/lib/chartjs/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chartjs-ror
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Stewart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|