report_builder 0.1.6 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/LICENSE +2 -2
- data/README.md +7 -10
- data/bin/report_builder +3 -8
- data/lib/report_builder.rb +14 -8
- data/lib/report_builder/builder.rb +48 -524
- data/report_builder.gemspec +3 -4
- data/template/html_report.erb +338 -0
- metadata +5 -28
- data/vendor/assets/javascripts/highcharts-3d.js +0 -48
- data/vendor/assets/javascripts/highcharts.js +0 -337
- data/vendor/assets/javascripts/jquery-min.js +0 -4
- data/vendor/assets/javascripts/jquery-ui.min.js +0 -7
- data/vendor/assets/stylesheets/jquery-ui.min.css +0 -7
data/report_builder.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'report_builder'
|
3
|
-
s.version = '
|
3
|
+
s.version = '1.0'
|
4
4
|
s.bindir = 'bin'
|
5
5
|
s.summary = 'ReportBuilder'
|
6
|
-
s.description = '
|
6
|
+
s.description = 'Ruby gem to merge Cucumber JSON reports and build mobile friendly HTML Test Report, JSON report and retry file.'
|
7
7
|
s.post_install_message = 'Happy reporting!'
|
8
8
|
s.authors = ['Rajat Thareja']
|
9
9
|
s.email = 'rajat.thareja.1990@gmail.com'
|
@@ -12,11 +12,10 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.required_ruby_version = '>= 1.9.1'
|
13
13
|
s.requirements << 'Cucumber >= 2.1.0 test results in JSON format'
|
14
14
|
|
15
|
-
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(pkg|testing|coverage)/}) }
|
15
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(docs|css|js|pkg|testing|coverage)/}) }
|
16
16
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
s.test_files = s.files.grep(%r{^(testing)/})
|
18
18
|
|
19
|
-
s.add_runtime_dependency 'builder', '~>3.2', '>= 3.2.2'
|
20
19
|
s.add_runtime_dependency 'json', '>= 1.8.1'
|
21
20
|
|
22
21
|
s.add_development_dependency 'rake', '< 13.0'
|
@@ -0,0 +1,338 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title><%=options[:report_title]%></title>
|
6
|
+
<link rel="icon" href="http://reportbuilder.rajatthareja.com/rb.ico">
|
7
|
+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
8
|
+
<link href="https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css" rel="stylesheet">
|
9
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css" media="screen,projection"/>
|
10
|
+
<link href="https://cdn.rawgit.com/rajatthareja/ReportBuilder/770f5c65792926ef8318e95238ed0ef44addbec8/css/report.builder.min.css" rel="stylesheet">
|
11
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
12
|
+
</head>
|
13
|
+
<body>
|
14
|
+
|
15
|
+
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
|
16
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
|
17
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.min.js"></script>
|
18
|
+
<script src="https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script>
|
19
|
+
|
20
|
+
<%errors = []%>
|
21
|
+
<%features.each_with_index do |feature, f|%>
|
22
|
+
<%feature['elements'].each_with_index do |scenario, s|%>
|
23
|
+
<div id="f<%=f%>s<%=s%>" class="modal modal-fixed-footer">
|
24
|
+
<div class="modal-content">
|
25
|
+
|
26
|
+
<%if scenario['tags']%>
|
27
|
+
<%scenario['tags'].each do |tag|%>
|
28
|
+
<div class="chip"><i class="material-icons rotate-45">label</i><%=tag['name']%></div>
|
29
|
+
<%end%>
|
30
|
+
<%end%>
|
31
|
+
|
32
|
+
<h5><%=scenario['name']%></h5>
|
33
|
+
|
34
|
+
<%if scenario['before']%>
|
35
|
+
<%scenario['before'].each do |before|%>
|
36
|
+
|
37
|
+
<%if before['output']%>
|
38
|
+
<%before['output'].each do |output|%>
|
39
|
+
<pre><%=output%></pre>
|
40
|
+
<%end%>
|
41
|
+
<%end%>
|
42
|
+
|
43
|
+
<%if before['result']['error_message']%>
|
44
|
+
<pre><%=before['result']['error_message']%></pre>
|
45
|
+
<%end%>
|
46
|
+
|
47
|
+
<%end%>
|
48
|
+
<%end%>
|
49
|
+
|
50
|
+
<ul class="collection stepList">
|
51
|
+
<%scenario['steps'].each_with_index do |step|%>
|
52
|
+
<li class="collection-item step <%=step['status']%>">
|
53
|
+
|
54
|
+
<%if scenario['before']%>
|
55
|
+
<%scenario['before'].each do |before|%>
|
56
|
+
|
57
|
+
<%if before['output']%>
|
58
|
+
<%before['output'].each do |output|%>
|
59
|
+
<pre><%=output%></pre>
|
60
|
+
<%end%>
|
61
|
+
<%end%>
|
62
|
+
|
63
|
+
<%if before['result']['error_message']%>
|
64
|
+
<pre><%=before['result']['error_message']%></pre>
|
65
|
+
<%end%>
|
66
|
+
|
67
|
+
<%end%>
|
68
|
+
<%end%>
|
69
|
+
|
70
|
+
<b><%=step['keyword']%></b> <%=step['name']%>
|
71
|
+
|
72
|
+
<%if step['rows']%>
|
73
|
+
<table>
|
74
|
+
<tbody>
|
75
|
+
<%step['rows'].each do |row|%>
|
76
|
+
<tr>
|
77
|
+
<td>|
|
78
|
+
<%row['cells'].each do |cell|%>
|
79
|
+
<%=cell + ' |'%>
|
80
|
+
<%end%>
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
<%end%>
|
84
|
+
</tbody>
|
85
|
+
</table>
|
86
|
+
<%end%>
|
87
|
+
|
88
|
+
<%if step['output']%>
|
89
|
+
<%step['output'].each do |output|%>
|
90
|
+
<pre><%=output%></pre>
|
91
|
+
<%end%>
|
92
|
+
<%end%>
|
93
|
+
|
94
|
+
<%if step['result']['error_message']%>
|
95
|
+
<%scenario['error'] = step['result']['error_message'].split("\n").first%>
|
96
|
+
<%errors << scenario['error']%>
|
97
|
+
<pre class="error"><%=step['result']['error_message']%></pre>
|
98
|
+
<%end%>
|
99
|
+
|
100
|
+
<%if step['embeddings']%>
|
101
|
+
<%step['embeddings'].each do |embedding|%>
|
102
|
+
<%data=decode(embedding['data'])%>
|
103
|
+
<%if embedding['mime_type'] =~ /^image\/(png|gif|jpg|jpeg)/ %>
|
104
|
+
<%if options[:include_images]%>
|
105
|
+
<img class="materialboxed" data-caption='<%=scenario['name']%>' width="250" src="data:<%=embedding['mime_type']%>;base64,<%=data%>">
|
106
|
+
<%end%>
|
107
|
+
<%elsif embedding['mime_type'] =~ /^text\/plain/%>
|
108
|
+
<%if data.include?('|||')%>
|
109
|
+
<%title, link = src.split('|||')%><a href="<%=link%>"><%title%></a>
|
110
|
+
<%else%>
|
111
|
+
<%data%>
|
112
|
+
<%end%>
|
113
|
+
<%end%>
|
114
|
+
<%end%>
|
115
|
+
<%end%>
|
116
|
+
|
117
|
+
<%if step['after']%>
|
118
|
+
<%step['after'].each do |after|%>
|
119
|
+
|
120
|
+
<%if after['output']%>
|
121
|
+
<%after['output'].each do |output|%>
|
122
|
+
<pre><%=output%></pre>
|
123
|
+
<%end%>
|
124
|
+
<%end%>
|
125
|
+
|
126
|
+
<%if after['result']['error_message']%>
|
127
|
+
<pre><%=after['result']['error_message']%></pre>
|
128
|
+
<%end%>
|
129
|
+
|
130
|
+
<%if after['embeddings']%>
|
131
|
+
<%after['embeddings'].each do |embedding|%>
|
132
|
+
<%data=decode(embedding['data'])%>
|
133
|
+
<%if embedding['mime_type'] =~ /^image\/(png|gif|jpg|jpeg)/ %>
|
134
|
+
<%if options[:include_images]%>
|
135
|
+
<img class="materialboxed" data-caption='<%=scenario['name']%>' width="250" src="data:<%=embedding['mime_type']%>;base64,<%=data%>">
|
136
|
+
<%end%>
|
137
|
+
<%elsif embedding['mime_type'] =~ /^text\/plain/%>
|
138
|
+
<%if data.include?('|||')%>
|
139
|
+
<%title, link = src.split('|||')%><a href="<%=link%>"><%title%></a>
|
140
|
+
<%else%>
|
141
|
+
<%data%>
|
142
|
+
<%end%>
|
143
|
+
<%end%>
|
144
|
+
<%end%>
|
145
|
+
<%end%>
|
146
|
+
|
147
|
+
<%end%>
|
148
|
+
<%end%>
|
149
|
+
|
150
|
+
</li>
|
151
|
+
<%end%>
|
152
|
+
|
153
|
+
<%if scenario['after']%>
|
154
|
+
<%scenario['after'].each do |after|%>
|
155
|
+
|
156
|
+
<%if after['output']%>
|
157
|
+
<%after['output'].each do |output|%>
|
158
|
+
<pre><%=output%></pre>
|
159
|
+
<%end%>
|
160
|
+
<%end%>
|
161
|
+
|
162
|
+
<%if after['result']['error_message']%>
|
163
|
+
<pre><%=after['result']['error_message']%></pre>
|
164
|
+
<%end%>
|
165
|
+
|
166
|
+
<%if after['embeddings']%>
|
167
|
+
<%after['embeddings'].each do |embedding|%>
|
168
|
+
<%data=decode(embedding['data'])%>
|
169
|
+
<%if embedding['mime_type'] =~ /^image\/(png|gif|jpg|jpeg)/ %>
|
170
|
+
<%if options[:include_images]%>
|
171
|
+
<img class="materialboxed" data-caption='<%=scenario['name']%>' width="250" src="data:<%=embedding['mime_type']%>;base64,<%=data%>">
|
172
|
+
<%end%>
|
173
|
+
<%elsif embedding['mime_type'] =~ /^text\/plain/%>
|
174
|
+
<%if data.include?('|||')%>
|
175
|
+
<%title, link = src.split('|||')%><a href="<%=link%>"><%title%></a>
|
176
|
+
<%else%>
|
177
|
+
<%data%>
|
178
|
+
<%end%>
|
179
|
+
<%end%>
|
180
|
+
<%end%>
|
181
|
+
<%end%>
|
182
|
+
|
183
|
+
<%end%>
|
184
|
+
<%end%>
|
185
|
+
</ul>
|
186
|
+
</div>
|
187
|
+
<div class="modal-footer">
|
188
|
+
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat"><i class="material-icons">close</i></a>
|
189
|
+
</div>
|
190
|
+
</div>
|
191
|
+
<%end%>
|
192
|
+
<%end%>
|
193
|
+
|
194
|
+
<header class="brown lighten-5">
|
195
|
+
<div class="row brown lighten-1">
|
196
|
+
<div class="col m8 hide-on-small-only">
|
197
|
+
<h5 class="truncate white-text tooltipped" data-tooltip="<%=options[:report_title]%>"><%=options[:report_title]%></h5>
|
198
|
+
</div>
|
199
|
+
<div class="col m4 s12 brown lighten-1">
|
200
|
+
<ul class="tabs brown lighten-1">
|
201
|
+
<li class="tab col s3">
|
202
|
+
<a class="btn brown lighten-3 active blue-text waves-effect waves-light tooltipped" data-tooltip="Overview" href="#overview"><i class="material-icons">public</i></a>
|
203
|
+
</li>
|
204
|
+
<li class="tab col s3">
|
205
|
+
<a class="btn brown lighten-3 white-text waves-effect waves-light tooltipped" data-tooltip="Features" href="#features"><i class="material-icons">view_headline</i></a>
|
206
|
+
</li>
|
207
|
+
<li class="tab col s3">
|
208
|
+
<a class="btn brown lighten-3 white-text waves-effect waves-light tooltipped" data-tooltip="Summary" href="#summary"><i class="material-icons">view_comfy</i></a></li>
|
209
|
+
<li class="tab col s3">
|
210
|
+
<a class="btn brown lighten-3 white-text waves-effect waves-light tooltipped" data-tooltip="Errors" href="#errors"><i class="material-icons">bug_report</i></a>
|
211
|
+
</li>
|
212
|
+
</ul>
|
213
|
+
</div>
|
214
|
+
</div>
|
215
|
+
</header>
|
216
|
+
|
217
|
+
<main class="brown lighten-5">
|
218
|
+
<div class="row">
|
219
|
+
<div id="overview" class="col s12 brown lighten-5">
|
220
|
+
<div class="row">
|
221
|
+
<div class="col m4 s12">
|
222
|
+
<canvas id="featuresDoughnut" width="400" height="400"></canvas>
|
223
|
+
<table id="metaDataFeatures" class="bordered">
|
224
|
+
<tbody></tbody>
|
225
|
+
</table>
|
226
|
+
</div>
|
227
|
+
<div class="col m4 s12">
|
228
|
+
<canvas id="scenariosDoughnut" width="400" height="400"></canvas>
|
229
|
+
<table id="metaDataScenarios" class="bordered">
|
230
|
+
<tbody></tbody>
|
231
|
+
</table>
|
232
|
+
</div>
|
233
|
+
<div class="col m4 s12">
|
234
|
+
<table id="metaData" class="bordered">
|
235
|
+
<tbody>
|
236
|
+
<%options[:additional_info].each do |key, value|%>
|
237
|
+
<tr><th><%=key%></th><td><%=value%></td></tr>
|
238
|
+
<%end%>
|
239
|
+
</tbody>
|
240
|
+
</table>
|
241
|
+
</div>
|
242
|
+
</div>
|
243
|
+
</div>
|
244
|
+
<div id="features" class="col s12 brown lighten-5">
|
245
|
+
<ul class="featureList collapsible popout" data-collapsible="expandable">
|
246
|
+
<%features.each_with_index do |feature, f|%>
|
247
|
+
<li class="feature <%=feature['status']%>">
|
248
|
+
<div class="collapsible-header brown lighten-1 white-text waves-effect waves-light">
|
249
|
+
<i class="material-icons white-text">featured_play_list</i>
|
250
|
+
<b><%=feature['keyword']%></b> <%=feature['name']%>
|
251
|
+
</div>
|
252
|
+
<div class="collapsible-body brown lighten-4">
|
253
|
+
<ul class="collection scenarioList">
|
254
|
+
<%feature['elements'].each_with_index do |scenario, s|%>
|
255
|
+
<li class="collection-item scenario <%=scenario['status']%>">
|
256
|
+
<a class="waves-effect waves-light modal-trigger white-text" href="#f<%=f%>s<%=s%>">
|
257
|
+
<b><%=scenario['keyword']%></b> <%=scenario['name']%>
|
258
|
+
</a>
|
259
|
+
</li>
|
260
|
+
<%end%>
|
261
|
+
</ul>
|
262
|
+
</div>
|
263
|
+
</li>
|
264
|
+
<%end%>
|
265
|
+
</ul>
|
266
|
+
</div>
|
267
|
+
<div id="summary" class="col s12 brown lighten-5">
|
268
|
+
<table id="summaryTable" class="bordered brown lighten-1 white-text">
|
269
|
+
<thead>
|
270
|
+
<tr>
|
271
|
+
<th>Feature</th>
|
272
|
+
<th>Scenario</th>
|
273
|
+
<th>Status</th>
|
274
|
+
<th class="hide-on-small-only">Error</th>
|
275
|
+
</tr>
|
276
|
+
</thead>
|
277
|
+
<tbody>
|
278
|
+
<%features.each_with_index do |feature, f|%>
|
279
|
+
<%feature['elements'].each_with_index do |scenario, s|%>
|
280
|
+
<tr class="<%=scenario['status']%>">
|
281
|
+
<td class="hoverable"><%=feature['name']%></td>
|
282
|
+
<td class="hoverable"><a class="modal-trigger white-text" href="#f<%=f%>s<%=s%>"><%=scenario['name']%></a></td>
|
283
|
+
<td class="hoverable uppercase"><%=scenario['status']%></td>
|
284
|
+
<td class="hoverable hide-on-small-only"><%if scenario['error']%><%=scenario['error']%><%end%></td>
|
285
|
+
</tr>
|
286
|
+
<%end%>
|
287
|
+
<%end%>
|
288
|
+
</tbody>
|
289
|
+
</table>
|
290
|
+
</div>
|
291
|
+
<div id="errors" class="col s12 brown lighten-5">
|
292
|
+
<ul class="errorList collapsible popout" data-collapsible="expandable">
|
293
|
+
<%errors.uniq.each do |error|%>
|
294
|
+
<li class="error">
|
295
|
+
<div class="collapsible-header red lighten-2 white-text waves-effect waves-light">
|
296
|
+
<i class="material-icons">bug_report</i><%=error%>
|
297
|
+
</div>
|
298
|
+
<div class="collapsible-body brown lighten-4">
|
299
|
+
<ul class="collection failedScenarioList">
|
300
|
+
<%features.each_with_index do |feature, f|%>
|
301
|
+
<%feature['elements'].each_with_index do |scenario, s|%>
|
302
|
+
<%if scenario['error']%>
|
303
|
+
<%if scenario['error'] == error%>
|
304
|
+
<li class="collection-item failedScenario brown lighten-5">
|
305
|
+
<i class="material-icons red-text">highlight_off</i> <a class="modal-trigger red-text"href="#f<%=f%>s<%=s%>"><%=scenario['name']%></a>
|
306
|
+
</li>
|
307
|
+
<%end%>
|
308
|
+
<%end%>
|
309
|
+
<%end%>
|
310
|
+
<%end%>
|
311
|
+
</ul>
|
312
|
+
</div>
|
313
|
+
</li>
|
314
|
+
<%end%>
|
315
|
+
</ul>
|
316
|
+
</div>
|
317
|
+
</div>
|
318
|
+
</main>
|
319
|
+
|
320
|
+
<footer class="page-footer brown lighten-4">
|
321
|
+
<div class="footer-copyright brown lighten-1">
|
322
|
+
<div class="container">
|
323
|
+
Happy Reporting!
|
324
|
+
<a class="white-text text-lighten-4 right" href="https://rubygems.org/gems/report_builder">Generated by Report Builder</a>
|
325
|
+
</div>
|
326
|
+
</div>
|
327
|
+
</footer>
|
328
|
+
|
329
|
+
<script>
|
330
|
+
$(document).ready(function () {
|
331
|
+
<%features.each_with_index do |feature, f|%><%(0..feature['elements'].size).each do |s|%>
|
332
|
+
$('#f<%=f%>s<%=s%>').modal();
|
333
|
+
<%end%><%end%>
|
334
|
+
});
|
335
|
+
</script>
|
336
|
+
<script src="https://cdn.rawgit.com/rajatthareja/ReportBuilder/770f5c65792926ef8318e95238ed0ef44addbec8/js/report.builder.min.js"></script>
|
337
|
+
</body>
|
338
|
+
</html>
|
metadata
CHANGED
@@ -1,35 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: report_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: '1.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rajat Thareja
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: builder
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3.2'
|
20
|
-
- - '>='
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 3.2.2
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ~>
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3.2'
|
30
|
-
- - '>='
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 3.2.2
|
33
13
|
- !ruby/object:Gem::Dependency
|
34
14
|
name: json
|
35
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,7 +52,8 @@ dependencies:
|
|
72
52
|
- - <
|
73
53
|
- !ruby/object:Gem::Version
|
74
54
|
version: '4.0'
|
75
|
-
description:
|
55
|
+
description: Ruby gem to merge Cucumber JSON reports and build mobile friendly HTML
|
56
|
+
Test Report, JSON report and retry file.
|
76
57
|
email: rajat.thareja.1990@gmail.com
|
77
58
|
executables:
|
78
59
|
- report_builder
|
@@ -90,11 +71,7 @@ files:
|
|
90
71
|
- lib/report_builder/builder.rb
|
91
72
|
- lib/report_builder/core-ext/hash.rb
|
92
73
|
- report_builder.gemspec
|
93
|
-
-
|
94
|
-
- vendor/assets/javascripts/highcharts.js
|
95
|
-
- vendor/assets/javascripts/jquery-min.js
|
96
|
-
- vendor/assets/javascripts/jquery-ui.min.js
|
97
|
-
- vendor/assets/stylesheets/jquery-ui.min.css
|
74
|
+
- template/html_report.erb
|
98
75
|
homepage: https://github.com/rajatthareja/ReportBuilder
|
99
76
|
licenses:
|
100
77
|
- MIT
|
@@ -1,48 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Highcharts JS v4.2.1 (2015-12-21)
|
3
|
-
|
4
|
-
3D features for Highcharts JS
|
5
|
-
|
6
|
-
@license: www.highcharts.com/license
|
7
|
-
*/
|
8
|
-
(function(d){typeof module==="object"&&module.exports?module.exports=d:d(Highcharts)})(function(d){function r(c,b,a){var e,f,g=b.options.chart.options3d,d=!1;a?(d=b.inverted,a=b.plotWidth/2,b=b.plotHeight/2,e=g.depth/2,f=u(g.depth,1)*u(g.viewDistance,0)):(a=b.plotLeft+b.plotWidth/2,b=b.plotTop+b.plotHeight/2,e=g.depth/2,f=u(g.depth,1)*u(g.viewDistance,0));var j=[],k=a,i=b,l=e,w=f,a=A*(d?g.beta:-g.beta),g=A*(d?-g.alpha:g.alpha),o=p(a),q=m(a),n=p(g),y=m(g),x,s,z,t,v,C;B(c,function(a){x=(d?a.y:a.x)-
|
9
|
-
k;s=(d?a.x:a.y)-i;z=(a.z||0)-l;t=q*x-o*z;v=-o*n*x+y*s-q*n*z;C=o*y*x+n*s+q*y*z;w>0&&w<Number.POSITIVE_INFINITY&&(t*=w/(C+l+w),v*=w/(C+l+w));t+=k;v+=i;C+=l;j.push({x:d?v:t,y:d?t:v,z:C})});return j}function D(c){return c!==void 0&&c!==null}function I(c){var b=0,a,e;for(a=0;a<c.length;a++)e=(a+1)%c.length,b+=c[a].x*c[e].y-c[e].x*c[a].y;return b/2}function E(c){var b=0,a;for(a=0;a<c.length;a++)b+=c[a].z;return c.length?b/c.length:0}function q(c,b,a,e,f,g,d,j){var k=[];g>f&&g-f>o/2+1.0E-4?(k=k.concat(q(c,
|
10
|
-
b,a,e,f,f+o/2,d,j)),k=k.concat(q(c,b,a,e,f+o/2,g,d,j))):g<f&&f-g>o/2+1.0E-4?(k=k.concat(q(c,b,a,e,f,f-o/2,d,j)),k=k.concat(q(c,b,a,e,f-o/2,g,d,j))):(k=g-f,k=["C",c+a*m(f)-a*F*k*p(f)+d,b+e*p(f)+e*F*k*m(f)+j,c+a*m(g)+a*F*k*p(g)+d,b+e*p(g)-e*F*k*m(g)+j,c+a*m(g)+d,b+e*p(g)+j]);return k}function J(c){if(this.chart.is3d()){var b=this.chart.options.plotOptions.column.grouping;if(b!==void 0&&!b&&this.group.zIndex!==void 0&&!this.zIndexSet)this.group.attr({zIndex:this.group.zIndex*10}),this.zIndexSet=!0;var a=
|
11
|
-
this.options,e=this.options.states;this.borderWidth=a.borderWidth=D(a.edgeWidth)?a.edgeWidth:1;d.each(this.data,function(b){if(b.y!==null)b=b.pointAttr,this.borderColor=d.pick(a.edgeColor,b[""].fill),b[""].stroke=this.borderColor,b.hover.stroke=d.pick(e.hover.edgeColor,this.borderColor),b.select.stroke=d.pick(e.select.edgeColor,this.borderColor)})}c.apply(this,[].slice.call(arguments,1))}var B=d.each,M=d.extend,N=d.inArray,G=d.merge,u=d.pick,K=d.wrap,o=Math.PI,A=o/180,p=Math.sin,m=Math.cos,L=Math.round;
|
12
|
-
d.perspective=r;var F=4*(Math.sqrt(2)-1)/3/(o/2);d.SVGRenderer.prototype.toLinePath=function(c,b){var a=[];d.each(c,function(b){a.push("L",b.x,b.y)});c.length&&(a[0]="M",b&&a.push("Z"));return a};d.SVGRenderer.prototype.cuboid=function(c){var b=this.g(),c=this.cuboidPath(c);b.front=this.path(c[0]).attr({zIndex:c[3],"stroke-linejoin":"round"}).add(b);b.top=this.path(c[1]).attr({zIndex:c[4],"stroke-linejoin":"round"}).add(b);b.side=this.path(c[2]).attr({zIndex:c[5],"stroke-linejoin":"round"}).add(b);
|
13
|
-
b.fillSetter=function(a){var b=d.Color(a).brighten(0.1).get(),c=d.Color(a).brighten(-0.1).get();this.front.attr({fill:a});this.top.attr({fill:b});this.side.attr({fill:c});this.color=a;return this};b.opacitySetter=function(a){this.front.attr({opacity:a});this.top.attr({opacity:a});this.side.attr({opacity:a});return this};b.attr=function(a){if(a.shapeArgs||D(a.x))a=this.renderer.cuboidPath(a.shapeArgs||a),this.front.attr({d:a[0],zIndex:a[3]}),this.top.attr({d:a[1],zIndex:a[4]}),this.side.attr({d:a[2],
|
14
|
-
zIndex:a[5]});else return d.SVGElement.prototype.attr.call(this,a);return this};b.animate=function(a,b,c){D(a.x)&&D(a.y)?(a=this.renderer.cuboidPath(a),this.front.attr({zIndex:a[3]}).animate({d:a[0]},b,c),this.top.attr({zIndex:a[4]}).animate({d:a[1]},b,c),this.side.attr({zIndex:a[5]}).animate({d:a[2]},b,c),this.attr({zIndex:-a[6]})):a.opacity?(this.front.animate(a,b,c),this.top.animate(a,b,c),this.side.animate(a,b,c)):d.SVGElement.prototype.animate.call(this,a,b,c);return this};b.destroy=function(){this.front.destroy();
|
15
|
-
this.top.destroy();this.side.destroy();return null};b.attr({zIndex:-c[6]});return b};d.SVGRenderer.prototype.cuboidPath=function(c){function b(a){return i[a]}var a=c.x,e=c.y,f=c.z,g=c.height,h=c.width,j=c.depth,k=d.map,i=[{x:a,y:e,z:f},{x:a+h,y:e,z:f},{x:a+h,y:e+g,z:f},{x:a,y:e+g,z:f},{x:a,y:e+g,z:f+j},{x:a+h,y:e+g,z:f+j},{x:a+h,y:e,z:f+j},{x:a,y:e,z:f+j}],i=r(i,d.charts[this.chartIndex],c.insidePlotArea),f=function(a,c){var e=[],a=k(a,b),c=k(c,b);I(a)<0?e=a:I(c)<0&&(e=c);return e},c=f([3,2,1,0],
|
16
|
-
[7,6,5,4]),a=[4,5,2,3],e=f([1,6,7,0],a),f=f([1,2,5,6],[0,7,4,3]);return[this.toLinePath(c,!0),this.toLinePath(e,!0),this.toLinePath(f,!0),E(c),E(e),E(f),E(k(a,b))*9E9]};d.SVGRenderer.prototype.arc3d=function(c){function b(a){var b=!1,c={},e;for(e in a)N(e,f)!==-1&&(c[e]=a[e],delete a[e],b=!0);return b?c:!1}var a=this.g(),e=a.renderer,f="x,y,r,innerR,start,end".split(","),c=G(c);c.alpha*=A;c.beta*=A;a.top=e.path();a.side1=e.path();a.side2=e.path();a.inn=e.path();a.out=e.path();a.onAdd=function(){var b=
|
17
|
-
a.parentGroup;a.top.add(a);a.out.add(b);a.inn.add(b);a.side1.add(b);a.side2.add(b)};a.setPaths=function(b){var c=a.renderer.arc3dPath(b),e=c.zTop*100;a.attribs=b;a.top.attr({d:c.top,zIndex:c.zTop});a.inn.attr({d:c.inn,zIndex:c.zInn});a.out.attr({d:c.out,zIndex:c.zOut});a.side1.attr({d:c.side1,zIndex:c.zSide1});a.side2.attr({d:c.side2,zIndex:c.zSide2});a.zIndex=e;a.attr({zIndex:e});b.center&&(a.top.setRadialReference(b.center),delete b.center)};a.setPaths(c);a.fillSetter=function(a){var b=d.Color(a).brighten(-0.1).get();
|
18
|
-
this.fill=a;this.side1.attr({fill:b});this.side2.attr({fill:b});this.inn.attr({fill:b});this.out.attr({fill:b});this.top.attr({fill:a});return this};B(["opacity","translateX","translateY","visibility"],function(b){a[b+"Setter"]=function(b,c){a[c]=b;B(["out","inn","side1","side2","top"],function(e){a[e].attr(c,b)})}});K(a,"attr",function(c,e,d){var f;if(typeof e==="object"&&(f=b(e)))M(a.attribs,f),a.setPaths(a.attribs);return c.call(this,e,d)});K(a,"animate",function(a,c,e,d){var f,l=this.attribs,
|
19
|
-
m;delete c.center;delete c.z;delete c.depth;delete c.alpha;delete c.beta;if(e=u(e,this.renderer.globalAnimation))if(typeof e!=="object"&&(e={}),c=G(c),f=b(c))m=f,e.step=function(a,b){function c(a){return l[a]+(u(m[a],l[a])-l[a])*b.pos}b.elem.setPaths(G(l,{x:c("x"),y:c("y"),r:c("r"),innerR:c("innerR"),start:c("start"),end:c("end")}))};return a.call(this,c,e,d)});a.destroy=function(){this.top.destroy();this.out.destroy();this.inn.destroy();this.side1.destroy();this.side2.destroy();d.SVGElement.prototype.destroy.call(this)};
|
20
|
-
a.hide=function(){this.top.hide();this.out.hide();this.inn.hide();this.side1.hide();this.side2.hide()};a.show=function(){this.top.show();this.out.show();this.inn.show();this.side1.show();this.side2.show()};return a};d.SVGRenderer.prototype.arc3dPath=function(c){function b(a){a%=2*o;a>o&&(a=2*o-a);return a}var a=c.x,e=c.y,d=c.start,g=c.end-1.0E-5,h=c.r,j=c.innerR,k=c.depth,i=c.alpha,l=c.beta,w=m(d),u=p(d),c=m(g),r=p(g),n=h*m(l);h*=m(i);var y=j*m(l),x=j*m(i),j=k*p(l),s=k*p(i),k=["M",a+n*w,e+h*u],k=
|
21
|
-
k.concat(q(a,e,n,h,d,g,0,0)),k=k.concat(["L",a+y*c,e+x*r]),k=k.concat(q(a,e,y,x,g,d,0,0)),k=k.concat(["Z"]),z=l>0?o/2:0,l=i>0?0:o/2,z=d>-z?d:g>-z?-z:d,t=g<o-l?g:d<o-l?o-l:g,v=2*o-l,i=["M",a+n*m(z),e+h*p(z)],i=i.concat(q(a,e,n,h,z,t,0,0));g>v&&d<v?(i=i.concat(["L",a+n*m(t)+j,e+h*p(t)+s]),i=i.concat(q(a,e,n,h,t,v,j,s)),i=i.concat(["L",a+n*m(v),e+h*p(v)]),i=i.concat(q(a,e,n,h,v,g,0,0)),i=i.concat(["L",a+n*m(g)+j,e+h*p(g)+s]),i=i.concat(q(a,e,n,h,g,v,j,s)),i=i.concat(["L",a+n*m(v),e+h*p(v)]),i=i.concat(q(a,
|
22
|
-
e,n,h,v,t,0,0))):g>o-l&&d<o-l&&(i=i.concat(["L",a+n*m(t)+j,e+h*p(t)+s]),i=i.concat(q(a,e,n,h,t,g,j,s)),i=i.concat(["L",a+n*m(g),e+h*p(g)]),i=i.concat(q(a,e,n,h,g,t,0,0)));i=i.concat(["L",a+n*m(t)+j,e+h*p(t)+s]);i=i.concat(q(a,e,n,h,t,z,j,s));i=i.concat(["Z"]);l=["M",a+y*w,e+x*u];l=l.concat(q(a,e,y,x,d,g,0,0));l=l.concat(["L",a+y*m(g)+j,e+x*p(g)+s]);l=l.concat(q(a,e,y,x,g,d,j,s));l=l.concat(["Z"]);w=["M",a+n*w,e+h*u,"L",a+n*w+j,e+h*u+s,"L",a+y*w+j,e+x*u+s,"L",a+y*w,e+x*u,"Z"];a=["M",a+n*c,e+h*r,"L",
|
23
|
-
a+n*c+j,e+h*r+s,"L",a+y*c+j,e+x*r+s,"L",a+y*c,e+x*r,"Z"];r=Math.atan2(s,-j);e=Math.abs(g+r);c=Math.abs(d+r);d=Math.abs((d+g)/2+r);e=b(e);c=b(c);d=b(d);d*=1E5;g=c*1E5;e*=1E5;return{top:k,zTop:o*1E5+1,out:i,zOut:Math.max(d,g,e),inn:l,zInn:Math.max(d,g,e),side1:w,zSide1:e*0.99,side2:a,zSide2:g*0.99}};d.Chart.prototype.is3d=function(){return this.options.chart.options3d&&this.options.chart.options3d.enabled};d.wrap(d.Chart.prototype,"isInsidePlot",function(c){return this.is3d()||c.apply(this,[].slice.call(arguments,
|
24
|
-
1))});d.getOptions().chart.options3d={enabled:!1,alpha:0,beta:0,depth:100,viewDistance:25,frame:{bottom:{size:1,color:"rgba(255,255,255,0)"},side:{size:1,color:"rgba(255,255,255,0)"},back:{size:1,color:"rgba(255,255,255,0)"}}};d.wrap(d.Chart.prototype,"init",function(c){var b=[].slice.call(arguments,1),a;if(b[0].chart&&b[0].chart.options3d&&b[0].chart.options3d.enabled)b[0].chart.options3d.alpha=(b[0].chart.options3d.alpha||0)%360,b[0].chart.options3d.beta=(b[0].chart.options3d.beta||0)%360,a=b[0].plotOptions||
|
25
|
-
{},a=a.pie||{},a.borderColor=d.pick(a.borderColor,void 0);c.apply(this,b)});d.wrap(d.Chart.prototype,"setChartSize",function(c){c.apply(this,[].slice.call(arguments,1));if(this.is3d()){var b=this.inverted,a=this.clipBox,e=this.margin;a[b?"y":"x"]=-(e[3]||0);a[b?"x":"y"]=-(e[0]||0);a[b?"height":"width"]=this.chartWidth+(e[3]||0)+(e[1]||0);a[b?"width":"height"]=this.chartHeight+(e[0]||0)+(e[2]||0)}});d.wrap(d.Chart.prototype,"redraw",function(c){if(this.is3d())this.isDirtyBox=!0;c.apply(this,[].slice.call(arguments,
|
26
|
-
1))});d.wrap(d.Chart.prototype,"renderSeries",function(c){var b=this.series.length;if(this.is3d())for(;b--;)c=this.series[b],c.translate(),c.render();else c.call(this)});d.Chart.prototype.retrieveStacks=function(c){var b=this.series,a={},e,f=1;d.each(this.series,function(d){e=u(d.options.stack,c?0:b.length-1-d.index);a[e]?a[e].series.push(d):(a[e]={series:[d],position:f},f++)});a.totalStacks=f+1;return a};d.wrap(d.Axis.prototype,"setOptions",function(c,b){var a;c.call(this,b);if(this.chart.is3d())a=
|
27
|
-
this.options,a.tickWidth=d.pick(a.tickWidth,0),a.gridLineWidth=d.pick(a.gridLineWidth,1)});d.wrap(d.Axis.prototype,"render",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,a=b.renderer,e=b.options.chart.options3d,d=e.frame,g=d.bottom,h=d.back,d=d.side,j=e.depth,k=this.height,i=this.width,l=this.left,m=this.top;if(!this.isZAxis)this.horiz?(h={x:l,y:m+(b.xAxis[0].opposite?-g.size:k),z:0,width:i,height:g.size,depth:j,insidePlotArea:!1},this.bottomFrame?this.bottomFrame.animate(h):
|
28
|
-
this.bottomFrame=a.cuboid(h).attr({fill:g.color,zIndex:b.yAxis[0].reversed&&e.alpha>0?4:-1}).css({stroke:g.color}).add()):(e={x:l+(b.yAxis[0].opposite?0:-d.size),y:m+(b.xAxis[0].opposite?-g.size:0),z:j,width:i+d.size,height:k+g.size,depth:h.size,insidePlotArea:!1},this.backFrame?this.backFrame.animate(e):this.backFrame=a.cuboid(e).attr({fill:h.color,zIndex:-3}).css({stroke:h.color}).add(),b={x:l+(b.yAxis[0].opposite?i:-d.size),y:m+(b.xAxis[0].opposite?-g.size:0),z:0,width:d.size,height:k+g.size,depth:j,
|
29
|
-
insidePlotArea:!1},this.sideFrame?this.sideFrame.animate(b):this.sideFrame=a.cuboid(b).attr({fill:d.color,zIndex:-2}).css({stroke:d.color}).add())}});d.wrap(d.Axis.prototype,"getPlotLinePath",function(c){var b=c.apply(this,[].slice.call(arguments,1));if(!this.chart.is3d())return b;if(b===null)return b;var a=this.chart,d=a.options.chart.options3d,a=this.isZAxis?a.plotWidth:d.depth,d=this.opposite;this.horiz&&(d=!d);b=[this.swapZ({x:b[1],y:b[2],z:d?a:0}),this.swapZ({x:b[1],y:b[2],z:a}),this.swapZ({x:b[4],
|
30
|
-
y:b[5],z:a}),this.swapZ({x:b[4],y:b[5],z:d?0:a})];b=r(b,this.chart,!1);return b=this.chart.renderer.toLinePath(b,!1)});d.wrap(d.Axis.prototype,"getLinePath",function(c){return this.chart.is3d()?[]:c.apply(this,[].slice.call(arguments,1))});d.wrap(d.Axis.prototype,"getPlotBandPath",function(c){if(!this.chart.is3d())return c.apply(this,[].slice.call(arguments,1));var b=arguments,a=b[1],b=this.getPlotLinePath(b[2]);(a=this.getPlotLinePath(a))&&b?a.push("L",b[10],b[11],"L",b[7],b[8],"L",b[4],b[5],"L",
|
31
|
-
b[1],b[2]):a=null;return a});d.wrap(d.Tick.prototype,"getMarkPath",function(c){var b=c.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return b;b=[this.axis.swapZ({x:b[1],y:b[2],z:0}),this.axis.swapZ({x:b[4],y:b[5],z:0})];b=r(b,this.axis.chart,!1);return b=["M",b[0].x,b[0].y,"L",b[1].x,b[1].y]});d.wrap(d.Tick.prototype,"getLabelPosition",function(c){var b=c.apply(this,[].slice.call(arguments,1));if(!this.axis.chart.is3d())return b;var a=r([this.axis.swapZ({x:b.x,y:b.y,z:0})],this.axis.chart,
|
32
|
-
!1)[0];a.x-=!this.axis.horiz&&this.axis.opposite?this.axis.transA:0;a.old=b;return a});d.wrap(d.Tick.prototype,"handleOverflow",function(c,b){if(this.axis.chart.is3d())b=b.old;return c.call(this,b)});d.wrap(d.Axis.prototype,"getTitlePosition",function(c){var b=this.chart.is3d(),a,d;if(b)d=this.axisTitleMargin,this.axisTitleMargin=0;a=c.apply(this,[].slice.call(arguments,1));if(b)a=r([this.swapZ({x:a.x,y:a.y,z:0})],this.chart,!1)[0],a[this.horiz?"y":"x"]+=(this.horiz?1:-1)*(this.opposite?-1:1)*d,this.axisTitleMargin=
|
33
|
-
d;return a});d.wrap(d.Axis.prototype,"drawCrosshair",function(c){var b=arguments;this.chart.is3d()&&b[2]&&(b[2]={plotX:b[2].plotXold||b[2].plotX,plotY:b[2].plotYold||b[2].plotY});c.apply(this,[].slice.call(b,1))});d.Axis.prototype.swapZ=function(c,b){if(this.isZAxis){var a=b?0:this.chart.plotLeft,d=this.chart;return{x:a+(d.yAxis[0].opposite?c.z:d.xAxis[0].width-c.z),y:c.y,z:c.x-a}}return c};var H=d.ZAxis=function(){this.isZAxis=!0;this.init.apply(this,arguments)};d.extend(H.prototype,d.Axis.prototype);
|
34
|
-
d.extend(H.prototype,{setOptions:function(c){c=d.merge({offset:0,lineWidth:0},c);d.Axis.prototype.setOptions.call(this,c);this.coll="zAxis"},setAxisSize:function(){d.Axis.prototype.setAxisSize.call(this);this.width=this.len=this.chart.options.chart.options3d.depth;this.right=this.chart.chartWidth-this.width-this.left},getSeriesExtremes:function(){var c=this,b=c.chart;c.hasVisibleSeries=!1;c.dataMin=c.dataMax=c.ignoreMinPadding=c.ignoreMaxPadding=null;c.buildStacks&&c.buildStacks();d.each(c.series,
|
35
|
-
function(a){if(a.visible||!b.options.chart.ignoreHiddenSeries)if(c.hasVisibleSeries=!0,a=a.zData,a.length)c.dataMin=Math.min(u(c.dataMin,a[0]),Math.min.apply(null,a)),c.dataMax=Math.max(u(c.dataMax,a[0]),Math.max.apply(null,a))})}});d.wrap(d.Chart.prototype,"getAxes",function(c){var b=this,a=this.options,a=a.zAxis=d.splat(a.zAxis||{});c.call(this);if(b.is3d())this.zAxis=[],d.each(a,function(a,c){a.index=c;a.isX=!0;(new H(b,a)).setScale()})});d.wrap(d.seriesTypes.column.prototype,"translate",function(c){c.apply(this,
|
36
|
-
[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,a=this.options,e=a.depth||25,f=(a.stacking?a.stack||0:this._i)*(e+(a.groupZPadding||1));a.grouping!==!1&&(f=0);f+=a.groupZPadding||1;d.each(this.data,function(a){if(a.y!==null){var c=a.shapeArgs,d=a.tooltipPos;a.shapeType="cuboid";c.z=f;c.depth=e;c.insidePlotArea=!0;d=r([{x:d[0],y:d[1],z:f}],b,!1)[0];a.tooltipPos=[d.x,d.y]}});this.z=f}});d.wrap(d.seriesTypes.column.prototype,"animate",function(c){if(this.chart.is3d()){var b=arguments[1],
|
37
|
-
a=this.yAxis,e=this,f=this.yAxis.reversed;if(d.svg)b?d.each(e.data,function(b){if(b.y!==null&&(b.height=b.shapeArgs.height,b.shapey=b.shapeArgs.y,b.shapeArgs.height=1,!f))b.shapeArgs.y=b.stackY?b.plotY+a.translate(b.stackY):b.plotY+(b.negative?-b.height:b.height)}):(d.each(e.data,function(a){if(a.y!==null)a.shapeArgs.height=a.height,a.shapeArgs.y=a.shapey,a.graphic&&a.graphic.animate(a.shapeArgs,e.options.animation)}),this.drawDataLabels(),e.animate=null)}else c.apply(this,[].slice.call(arguments,
|
38
|
-
1))});d.wrap(d.seriesTypes.column.prototype,"init",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.options,a=b.grouping,d=b.stacking,f=u(this.yAxis.options.reversedStacks,!0),g=0;if(a===void 0||a){a=this.chart.retrieveStacks(d);g=b.stack||0;for(d=0;d<a[g].series.length;d++)if(a[g].series[d]===this)break;g=10*(a.totalStacks-a[g].position)+(f?d:-d);this.xAxis.reversed||(g=a.totalStacks*10-g)}b.zIndex=g}});d.wrap(d.Series.prototype,"alignDataLabel",function(c){if(this.chart.is3d()&&
|
39
|
-
(this.type==="column"||this.type==="columnrange")){var b=arguments[4],a={x:b.x,y:b.y,z:this.z},a=r([a],this.chart,!0)[0];b.x=a.x;b.y=a.y}c.apply(this,[].slice.call(arguments,1))});d.seriesTypes.columnrange&&d.wrap(d.seriesTypes.columnrange.prototype,"drawPoints",J);d.wrap(d.seriesTypes.column.prototype,"drawPoints",J);d.wrap(d.seriesTypes.pie.prototype,"translate",function(c){c.apply(this,[].slice.call(arguments,1));if(this.chart.is3d()){var b=this,a=b.options,d=a.depth||0,f=b.chart.options.chart.options3d,
|
40
|
-
g=f.alpha,h=f.beta,j=a.stacking?(a.stack||0)*d:b._i*d;j+=d/2;a.grouping!==!1&&(j=0);B(b.data,function(c){var f=c.shapeArgs;c.shapeType="arc3d";f.z=j;f.depth=d*0.75;f.alpha=g;f.beta=h;f.center=b.center;f=(f.end+f.start)/2;c.slicedTranslation={translateX:L(m(f)*a.slicedOffset*m(g*A)),translateY:L(p(f)*a.slicedOffset*m(g*A))}})}});d.wrap(d.seriesTypes.pie.prototype.pointClass.prototype,"haloPath",function(c){var b=arguments;return this.series.chart.is3d()?[]:c.call(this,b[1])});d.wrap(d.seriesTypes.pie.prototype,
|
41
|
-
"drawPoints",function(c){var b=this.options,a=b.states;if(this.chart.is3d())this.borderWidth=b.borderWidth=b.edgeWidth||1,this.borderColor=b.edgeColor=d.pick(b.edgeColor,b.borderColor,void 0),a.hover.borderColor=d.pick(a.hover.edgeColor,this.borderColor),a.hover.borderWidth=d.pick(a.hover.edgeWidth,this.borderWidth),a.select.borderColor=d.pick(a.select.edgeColor,this.borderColor),a.select.borderWidth=d.pick(a.select.edgeWidth,this.borderWidth),B(this.data,function(b){var c=b.pointAttr;c[""].stroke=
|
42
|
-
b.series.borderColor||b.color;c[""]["stroke-width"]=b.series.borderWidth;c.hover.stroke=a.hover.borderColor;c.hover["stroke-width"]=a.hover.borderWidth;c.select.stroke=a.select.borderColor;c.select["stroke-width"]=a.select.borderWidth});c.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&B(this.points,function(a){var b=a.graphic;if(b)b[a.y?"show":"hide"]()})});d.wrap(d.seriesTypes.pie.prototype,"drawDataLabels",function(c){if(this.chart.is3d()){var b=this.chart.options.chart.options3d;B(this.data,
|
43
|
-
function(a){var c=a.shapeArgs,d=c.r,g=(c.beta||b.beta)*A,h=(c.start+c.end)/2,j=a.labelPos,k=-d*(1-m((c.alpha||b.alpha)*A))*p(h),i=d*(m(g)-1)*m(h);B([0,2,4],function(a){j[a]+=i;j[a+1]+=k})})}c.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.pie.prototype,"addPoint",function(c){c.apply(this,[].slice.call(arguments,1));this.chart.is3d()&&this.update(this.userOptions,!0)});d.wrap(d.seriesTypes.pie.prototype,"animate",function(c){if(this.chart.is3d()){var b=arguments[1],a=this.options.animation,
|
44
|
-
e=this.center,f=this.group,g=this.markerGroup;if(d.svg)if(a===!0&&(a={}),b){if(f.oldtranslateX=f.translateX,f.oldtranslateY=f.translateY,b={translateX:e[0],translateY:e[1],scaleX:0.001,scaleY:0.001},f.attr(b),g)g.attrSetters=f.attrSetters,g.attr(b)}else b={translateX:f.oldtranslateX,translateY:f.oldtranslateY,scaleX:1,scaleY:1},f.animate(b,a),g&&g.animate(b,a),this.animate=null}else c.apply(this,[].slice.call(arguments,1))});d.wrap(d.seriesTypes.scatter.prototype,"translate",function(c){c.apply(this,
|
45
|
-
[].slice.call(arguments,1));if(this.chart.is3d()){var b=this.chart,a=d.pick(this.zAxis,b.options.zAxis[0]),e=[],f,g,h;for(h=0;h<this.data.length;h++)f=this.data[h],g=a.isLog&&a.val2lin?a.val2lin(f.z):f.z,f.plotZ=a.translate(g),f.isInside=f.isInside?g>=a.min&&g<=a.max:!1,e.push({x:f.plotX,y:f.plotY,z:f.plotZ});b=r(e,b,!0);for(h=0;h<this.data.length;h++)f=this.data[h],a=b[h],f.plotXold=f.plotX,f.plotYold=f.plotY,f.plotX=a.x,f.plotY=a.y,f.plotZ=a.z}});d.wrap(d.seriesTypes.scatter.prototype,"init",function(c,
|
46
|
-
b,a){if(b.is3d())this.axisTypes=["xAxis","yAxis","zAxis"],this.pointArrayMap=["x","y","z"],this.parallelArrays=["x","y","z"];c=c.apply(this,[b,a]);if(this.chart.is3d())this.tooltipOptions.pointFormat=this.userOptions.tooltip?this.userOptions.tooltip.pointFormat||"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>":"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>z: <b>{point.z}</b><br/>";return c});if(d.VMLRenderer)d.setOptions({animate:!1}),d.VMLRenderer.prototype.cuboid=d.SVGRenderer.prototype.cuboid,
|
47
|
-
d.VMLRenderer.prototype.cuboidPath=d.SVGRenderer.prototype.cuboidPath,d.VMLRenderer.prototype.toLinePath=d.SVGRenderer.prototype.toLinePath,d.VMLRenderer.prototype.createElement3D=d.SVGRenderer.prototype.createElement3D,d.VMLRenderer.prototype.arc3d=function(c){c=d.SVGRenderer.prototype.arc3d.call(this,c);c.css({zIndex:c.zIndex});return c},d.VMLRenderer.prototype.arc3dPath=d.SVGRenderer.prototype.arc3dPath,d.wrap(d.Axis.prototype,"render",function(c){c.apply(this,[].slice.call(arguments,1));this.sideFrame&&
|
48
|
-
(this.sideFrame.css({zIndex:0}),this.sideFrame.front.attr({fill:this.sideFrame.color}));this.bottomFrame&&(this.bottomFrame.css({zIndex:1}),this.bottomFrame.front.attr({fill:this.bottomFrame.color}));this.backFrame&&(this.backFrame.css({zIndex:0}),this.backFrame.front.attr({fill:this.backFrame.color}))})});
|