chartjs-ror 3.6.3 → 3.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/chartjs/chart_helpers.rb +9 -8
- data/lib/chartjs/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 729e3dae1f744ad547dadaf6a02c6bdb61074e1032d53f1c65c3a69bc159a664
|
4
|
+
data.tar.gz: b1f8ce563ce6c3be24852b5b346d7ae3bcbe448ace6ded3e85c7c36d00d15890
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 509d95ce759c852cad539c8fe41cd2961e3e7434c7caa13d4126bb0b37ef75d7dc81539ca4328b1d6083a93920379146376e00c90ad75a3ed71fbf8a09cf4d52
|
7
|
+
data.tar.gz: 4c05d01c2cf142d0ab1d1aecd0d9dff17c96ab75a055952cd3b070836b741cc884a9fdeae7353838032af2e6cbfb95ff8b6b519714a851c7fd2369cd27220a26
|
data/CHANGELOG.md
CHANGED
@@ -8,25 +8,25 @@ module Chartjs
|
|
8
8
|
|
9
9
|
module Explicit
|
10
10
|
CHART_TYPES.each do |type|
|
11
|
-
define_method "chartjs_#{type}_chart" do |data, options = {}| # def chartjs_polar_area_chart(data, options = {})
|
12
|
-
chart type, data, options
|
13
|
-
end
|
11
|
+
define_method "chartjs_#{type}_chart" do |data, options = {}, plugins = {}| # def chartjs_polar_area_chart(data, options = {}, plugins = {})
|
12
|
+
chart type, data, options, plugins # chart 'polar_area', data, options, plugins
|
13
|
+
end # end
|
14
14
|
end
|
15
15
|
include Chartjs::ChartHelpers
|
16
16
|
end
|
17
17
|
|
18
18
|
module Implicit
|
19
19
|
CHART_TYPES.each do |type|
|
20
|
-
define_method "#{type}_chart" do |data, options = {}| # def polar_area_chart(data, options = {})
|
21
|
-
chart type, data, options
|
22
|
-
end
|
20
|
+
define_method "#{type}_chart" do |data, options = {}, plugins = {}| # def polar_area_chart(data, options = {}, plugins = {})
|
21
|
+
chart type, data, options, plugins # chart 'polar_area', data, options, plugins
|
22
|
+
end # end
|
23
23
|
end
|
24
24
|
include Chartjs::ChartHelpers
|
25
25
|
end
|
26
26
|
|
27
27
|
private
|
28
28
|
|
29
|
-
def chart(type, data, options)
|
29
|
+
def chart(type, data, options, plugins)
|
30
30
|
opts = options.dup
|
31
31
|
|
32
32
|
@chart_id ||= -1
|
@@ -45,7 +45,8 @@ module Chartjs
|
|
45
45
|
var chart = new Chart(ctx, {
|
46
46
|
type: "#{camel_case type}",
|
47
47
|
data: #{to_javascript_string data},
|
48
|
-
options: #{to_javascript_string opts}
|
48
|
+
options: #{to_javascript_string opts},
|
49
|
+
plugins: #{to_javascript_string plugins},
|
49
50
|
});
|
50
51
|
};
|
51
52
|
|
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: 3.6.
|
4
|
+
version: 3.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Stewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -79,8 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
|
-
|
83
|
-
rubygems_version: 2.7.3
|
82
|
+
rubygems_version: 3.0.1
|
84
83
|
signing_key:
|
85
84
|
specification_version: 4
|
86
85
|
summary: Simplifies using Chart.js in Rails
|