amcharts.rb 3.11.2.16 → 3.11.2.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/amcharts/_function.erb +1 -0
- data/app/views/amcharts/chart_builder.erb +3 -1
- data/lib/amcharts/chart.rb +6 -1
- data/lib/amcharts/chart_builder.rb +7 -1
- data/lib/amcharts/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1126b2a118fa04b97ba281e798c9c8c33879902
|
4
|
+
data.tar.gz: 1a658158276448377dbd9666944449aaa779b3f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc84fae07d61e742d37e9f7b858b2b16ff9e568181c6a882fa22e276840fb01e7bdab3d16bcbafae1ec4d26c6dd5cce114727626050f4b5be18692a6bce7109c
|
7
|
+
data.tar.gz: 12f6abb7f8751a68dde8ed4f44ff76fc9816d421f905cd48e08908b195812bc78787a0417bd6e3a7c4463f1f2dd21003cfa0b84589a5fff5dec3b4bed5de0b0d
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= function %>(chart);
|
data/lib/amcharts/chart.rb
CHANGED
@@ -18,7 +18,7 @@ module AmCharts
|
|
18
18
|
class_attribute :default_settings
|
19
19
|
attr_accessor :data_provider, :data_source, :container
|
20
20
|
attr_accessor :width, :height, :loading_indicator
|
21
|
-
attr_reader :titles, :labels, :graphs, :legends, :data, :settings, :listeners, :legend_div, :export
|
21
|
+
attr_reader :titles, :labels, :graphs, :legends, :data, :settings, :listeners, :legend_div, :export, :functions
|
22
22
|
|
23
23
|
def initialize(*data, &block)
|
24
24
|
@data = data.flatten
|
@@ -30,6 +30,7 @@ module AmCharts
|
|
30
30
|
@export = nil
|
31
31
|
@titles = []
|
32
32
|
@labels = []
|
33
|
+
@functions = []
|
33
34
|
|
34
35
|
update_settings(&block) if block_given?
|
35
36
|
end
|
@@ -148,6 +149,10 @@ module AmCharts
|
|
148
149
|
[]
|
149
150
|
end
|
150
151
|
|
152
|
+
def call_function(fn)
|
153
|
+
@functions << fn
|
154
|
+
end
|
155
|
+
|
151
156
|
private
|
152
157
|
|
153
158
|
def get_dimension_value(value)
|
@@ -97,6 +97,12 @@ module AmCharts
|
|
97
97
|
concat render_js('export', object: chart.export)
|
98
98
|
end
|
99
99
|
|
100
|
+
def render_functions
|
101
|
+
chart.functions.each do |fn|
|
102
|
+
concat render_js('function', object: fn)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
100
106
|
private
|
101
107
|
|
102
108
|
def method_missing(*args, &block)
|
@@ -109,4 +115,4 @@ module AmCharts
|
|
109
115
|
super
|
110
116
|
end
|
111
117
|
end
|
112
|
-
end
|
118
|
+
end
|
data/lib/amcharts/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amcharts.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.11.2.
|
4
|
+
version: 3.11.2.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Vandersluis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- app/views/amcharts/_data.erb
|
175
175
|
- app/views/amcharts/_data_source.erb
|
176
176
|
- app/views/amcharts/_export.erb
|
177
|
+
- app/views/amcharts/_function.erb
|
177
178
|
- app/views/amcharts/_immediate_data_load.erb
|
178
179
|
- app/views/amcharts/_label.erb
|
179
180
|
- app/views/amcharts/_legend.erb
|