echarts 5.3.2-rc.1 → 5.3.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.
@@ -1,320 +1,296 @@
1
-
2
- /*
3
- * Licensed to the Apache Software Foundation (ASF) under one
4
- * or more contributor license agreements. See the NOTICE file
5
- * distributed with this work for additional information
6
- * regarding copyright ownership. The ASF licenses this file
7
- * to you under the Apache License, Version 2.0 (the
8
- * "License"); you may not use this file except in compliance
9
- * with the License. You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing,
14
- * software distributed under the License is distributed on an
15
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
- * KIND, either express or implied. See the License for the
17
- * specific language governing permissions and limitations
18
- * under the License.
19
- */
20
-
21
- (function (global, factory) {
22
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
23
- typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
24
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dataTool = {}, global.echarts));
25
- }(this, (function (exports, echarts) { 'use strict';
26
-
27
- var BUILTIN_OBJECT = reduce([
28
- 'Function',
29
- 'RegExp',
30
- 'Date',
31
- 'Error',
32
- 'CanvasGradient',
33
- 'CanvasPattern',
34
- 'Image',
35
- 'Canvas'
36
- ], function (obj, val) {
37
- obj['[object ' + val + ']'] = true;
38
- return obj;
39
- }, {});
40
- var TYPED_ARRAY = reduce([
41
- 'Int8',
42
- 'Uint8',
43
- 'Uint8Clamped',
44
- 'Int16',
45
- 'Uint16',
46
- 'Int32',
47
- 'Uint32',
48
- 'Float32',
49
- 'Float64'
50
- ], function (obj, val) {
51
- obj['[object ' + val + 'Array]'] = true;
52
- return obj;
53
- }, {});
54
- var arrayProto = Array.prototype;
55
- var nativeSlice = arrayProto.slice;
56
- var nativeMap = arrayProto.map;
57
- var ctorFunction = function () { }.constructor;
58
- var protoFunction = ctorFunction ? ctorFunction.prototype : null;
59
- function map(arr, cb, context) {
60
- if (!arr) {
61
- return [];
62
- }
63
- if (!cb) {
64
- return slice(arr);
65
- }
66
- if (arr.map && arr.map === nativeMap) {
67
- return arr.map(cb, context);
68
- }
69
- else {
70
- var result = [];
71
- for (var i = 0, len = arr.length; i < len; i++) {
72
- result.push(cb.call(context, arr[i], i, arr));
73
- }
74
- return result;
75
- }
76
- }
77
- function reduce(arr, cb, memo, context) {
78
- if (!(arr && cb)) {
79
- return;
80
- }
81
- for (var i = 0, len = arr.length; i < len; i++) {
82
- memo = cb.call(context, memo, arr[i], i, arr);
83
- }
84
- return memo;
85
- }
86
- function bindPolyfill(func, context) {
87
- var args = [];
88
- for (var _i = 2; _i < arguments.length; _i++) {
89
- args[_i - 2] = arguments[_i];
90
- }
91
- return function () {
92
- return func.apply(context, args.concat(nativeSlice.call(arguments)));
93
- };
94
- }
95
- var bind = (protoFunction && isFunction(protoFunction.bind))
96
- ? protoFunction.call.bind(protoFunction.bind)
97
- : bindPolyfill;
98
- function isFunction(value) {
99
- return typeof value === 'function';
100
- }
101
- function slice(arr) {
102
- var args = [];
103
- for (var _i = 1; _i < arguments.length; _i++) {
104
- args[_i - 1] = arguments[_i];
105
- }
106
- return nativeSlice.apply(arr, args);
107
- }
108
-
109
- function parse(xml) {
110
- var doc;
111
-
112
- if (typeof xml === 'string') {
113
- var parser = new DOMParser();
114
- doc = parser.parseFromString(xml, 'text/xml');
115
- } else {
116
- doc = xml;
117
- }
118
-
119
- if (!doc || doc.getElementsByTagName('parsererror').length) {
120
- return null;
121
- }
122
-
123
- var gexfRoot = getChildByTagName(doc, 'gexf');
124
-
125
- if (!gexfRoot) {
126
- return null;
127
- }
128
-
129
- var graphRoot = getChildByTagName(gexfRoot, 'graph');
130
- var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
131
- var attributesMap = {};
132
-
133
- for (var i = 0; i < attributes.length; i++) {
134
- attributesMap[attributes[i].id] = attributes[i];
135
- }
136
-
137
- return {
138
- nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
139
- links: parseEdges(getChildByTagName(graphRoot, 'edges'))
140
- };
141
- }
142
-
143
- function parseAttributes(parent) {
144
- return parent ? map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
145
- return {
146
- id: getAttr(attribDom, 'id'),
147
- title: getAttr(attribDom, 'title'),
148
- type: getAttr(attribDom, 'type')
149
- };
150
- }) : [];
151
- }
152
-
153
- function parseNodes(parent, attributesMap) {
154
- return parent ? map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
155
- var id = getAttr(nodeDom, 'id');
156
- var label = getAttr(nodeDom, 'label');
157
- var node = {
158
- id: id,
159
- name: label,
160
- itemStyle: {
161
- normal: {}
162
- }
163
- };
164
- var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
165
- var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
166
- var vizColorDom = getChildByTagName(nodeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
167
-
168
- var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
169
-
170
- if (vizSizeDom) {
171
- node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
172
- }
173
-
174
- if (vizPosDom) {
175
- node.x = parseFloat(getAttr(vizPosDom, 'x'));
176
- node.y = parseFloat(getAttr(vizPosDom, 'y')); // z
177
- }
178
-
179
- if (vizColorDom) {
180
- node.itemStyle.normal.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
181
- } // if (vizShapeDom) {
182
- // node.shape = getAttr(vizShapeDom, 'shape');
183
- // }
184
-
185
-
186
- if (attvaluesDom) {
187
- var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
188
- node.attributes = {};
189
-
190
- for (var j = 0; j < attvalueDomList.length; j++) {
191
- var attvalueDom = attvalueDomList[j];
192
- var attId = getAttr(attvalueDom, 'for');
193
- var attValue = getAttr(attvalueDom, 'value');
194
- var attribute = attributesMap[attId];
195
-
196
- if (attribute) {
197
- switch (attribute.type) {
198
- case 'integer':
199
- case 'long':
200
- attValue = parseInt(attValue, 10);
201
- break;
202
-
203
- case 'float':
204
- case 'double':
205
- attValue = parseFloat(attValue);
206
- break;
207
-
208
- case 'boolean':
209
- attValue = attValue.toLowerCase() === 'true';
210
- break;
211
- }
212
-
213
- node.attributes[attId] = attValue;
214
- }
215
- }
216
- }
217
-
218
- return node;
219
- }) : [];
220
- }
221
-
222
- function parseEdges(parent) {
223
- return parent ? map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
224
- var id = getAttr(edgeDom, 'id');
225
- var label = getAttr(edgeDom, 'label');
226
- var sourceId = getAttr(edgeDom, 'source');
227
- var targetId = getAttr(edgeDom, 'target');
228
- var edge = {
229
- id: id,
230
- name: label,
231
- source: sourceId,
232
- target: targetId,
233
- lineStyle: {
234
- normal: {}
235
- }
236
- };
237
- var lineStyle = edge.lineStyle.normal;
238
- var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
239
- var vizColorDom = getChildByTagName(edgeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
240
-
241
- if (vizThicknessDom) {
242
- lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
243
- }
244
-
245
- if (vizColorDom) {
246
- lineStyle.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
247
- } // if (vizShapeDom) {
248
- // edge.shape = vizShapeDom.getAttribute('shape');
249
- // }
250
-
251
-
252
- return edge;
253
- }) : [];
254
- }
255
-
256
- function getAttr(el, attrName) {
257
- return el.getAttribute(attrName);
258
- }
259
-
260
- function getChildByTagName(parent, tagName) {
261
- var node = parent.firstChild;
262
-
263
- while (node) {
264
- if (node.nodeType !== 1 || node.nodeName.toLowerCase() !== tagName.toLowerCase()) {
265
- node = node.nextSibling;
266
- } else {
267
- return node;
268
- }
269
- }
270
-
271
- return null;
272
- }
273
-
274
- function getChildrenByTagName(parent, tagName) {
275
- var node = parent.firstChild;
276
- var children = [];
277
-
278
- while (node) {
279
- if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
280
- children.push(node);
281
- }
282
-
283
- node = node.nextSibling;
284
- }
285
-
286
- return children;
287
- }
288
-
289
- var gexf = /*#__PURE__*/Object.freeze({
290
- __proto__: null,
291
- parse: parse
292
- });
293
-
294
- /*
295
- * Licensed to the Apache Software Foundation (ASF) under one
296
- * or more contributor license agreements. See the NOTICE file
297
- * distributed with this work for additional information
298
- * regarding copyright ownership. The ASF licenses this file
299
- * to you under the Apache License, Version 2.0 (the
300
- * "License"); you may not use this file except in compliance
301
- * with the License. You may obtain a copy of the License at
302
- *
303
- * http://www.apache.org/licenses/LICENSE-2.0
304
- *
305
- * Unless required by applicable law or agreed to in writing,
306
- * software distributed under the License is distributed on an
307
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
308
- * KIND, either express or implied. See the License for the
309
- * specific language governing permissions and limitations
310
- * under the License.
311
- */
312
-
313
-
314
- /**
315
- * AUTO-GENERATED FILE. DO NOT MODIFY.
316
- */
317
-
1
+
2
+ /*
3
+ * Licensed to the Apache Software Foundation (ASF) under one
4
+ * or more contributor license agreements. See the NOTICE file
5
+ * distributed with this work for additional information
6
+ * regarding copyright ownership. The ASF licenses this file
7
+ * to you under the Apache License, Version 2.0 (the
8
+ * "License"); you may not use this file except in compliance
9
+ * with the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing,
14
+ * software distributed under the License is distributed on an
15
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ * KIND, either express or implied. See the License for the
17
+ * specific language governing permissions and limitations
18
+ * under the License.
19
+ */
20
+
21
+ (function (global, factory) {
22
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('echarts')) :
23
+ typeof define === 'function' && define.amd ? define(['exports', 'echarts'], factory) :
24
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.dataTool = {}, global.echarts));
25
+ }(this, (function (exports, echarts) { 'use strict';
26
+
27
+ var BUILTIN_OBJECT = reduce([
28
+ 'Function',
29
+ 'RegExp',
30
+ 'Date',
31
+ 'Error',
32
+ 'CanvasGradient',
33
+ 'CanvasPattern',
34
+ 'Image',
35
+ 'Canvas'
36
+ ], function (obj, val) {
37
+ obj['[object ' + val + ']'] = true;
38
+ return obj;
39
+ }, {});
40
+ var TYPED_ARRAY = reduce([
41
+ 'Int8',
42
+ 'Uint8',
43
+ 'Uint8Clamped',
44
+ 'Int16',
45
+ 'Uint16',
46
+ 'Int32',
47
+ 'Uint32',
48
+ 'Float32',
49
+ 'Float64'
50
+ ], function (obj, val) {
51
+ obj['[object ' + val + 'Array]'] = true;
52
+ return obj;
53
+ }, {});
54
+ var arrayProto = Array.prototype;
55
+ var nativeSlice = arrayProto.slice;
56
+ var nativeMap = arrayProto.map;
57
+ var ctorFunction = function () { }.constructor;
58
+ var protoFunction = ctorFunction ? ctorFunction.prototype : null;
59
+ function map(arr, cb, context) {
60
+ if (!arr) {
61
+ return [];
62
+ }
63
+ if (!cb) {
64
+ return slice(arr);
65
+ }
66
+ if (arr.map && arr.map === nativeMap) {
67
+ return arr.map(cb, context);
68
+ }
69
+ else {
70
+ var result = [];
71
+ for (var i = 0, len = arr.length; i < len; i++) {
72
+ result.push(cb.call(context, arr[i], i, arr));
73
+ }
74
+ return result;
75
+ }
76
+ }
77
+ function reduce(arr, cb, memo, context) {
78
+ if (!(arr && cb)) {
79
+ return;
80
+ }
81
+ for (var i = 0, len = arr.length; i < len; i++) {
82
+ memo = cb.call(context, memo, arr[i], i, arr);
83
+ }
84
+ return memo;
85
+ }
86
+ function bindPolyfill(func, context) {
87
+ var args = [];
88
+ for (var _i = 2; _i < arguments.length; _i++) {
89
+ args[_i - 2] = arguments[_i];
90
+ }
91
+ return function () {
92
+ return func.apply(context, args.concat(nativeSlice.call(arguments)));
93
+ };
94
+ }
95
+ var bind = (protoFunction && isFunction(protoFunction.bind))
96
+ ? protoFunction.call.bind(protoFunction.bind)
97
+ : bindPolyfill;
98
+ function isFunction(value) {
99
+ return typeof value === 'function';
100
+ }
101
+ function slice(arr) {
102
+ var args = [];
103
+ for (var _i = 1; _i < arguments.length; _i++) {
104
+ args[_i - 1] = arguments[_i];
105
+ }
106
+ return nativeSlice.apply(arr, args);
107
+ }
108
+
109
+ function parse(xml) {
110
+ var doc;
111
+
112
+ if (typeof xml === 'string') {
113
+ var parser = new DOMParser();
114
+ doc = parser.parseFromString(xml, 'text/xml');
115
+ } else {
116
+ doc = xml;
117
+ }
118
+
119
+ if (!doc || doc.getElementsByTagName('parsererror').length) {
120
+ return null;
121
+ }
122
+
123
+ var gexfRoot = getChildByTagName(doc, 'gexf');
124
+
125
+ if (!gexfRoot) {
126
+ return null;
127
+ }
128
+
129
+ var graphRoot = getChildByTagName(gexfRoot, 'graph');
130
+ var attributes = parseAttributes(getChildByTagName(graphRoot, 'attributes'));
131
+ var attributesMap = {};
132
+
133
+ for (var i = 0; i < attributes.length; i++) {
134
+ attributesMap[attributes[i].id] = attributes[i];
135
+ }
136
+
137
+ return {
138
+ nodes: parseNodes(getChildByTagName(graphRoot, 'nodes'), attributesMap),
139
+ links: parseEdges(getChildByTagName(graphRoot, 'edges'))
140
+ };
141
+ }
142
+
143
+ function parseAttributes(parent) {
144
+ return parent ? map(getChildrenByTagName(parent, 'attribute'), function (attribDom) {
145
+ return {
146
+ id: getAttr(attribDom, 'id'),
147
+ title: getAttr(attribDom, 'title'),
148
+ type: getAttr(attribDom, 'type')
149
+ };
150
+ }) : [];
151
+ }
152
+
153
+ function parseNodes(parent, attributesMap) {
154
+ return parent ? map(getChildrenByTagName(parent, 'node'), function (nodeDom) {
155
+ var id = getAttr(nodeDom, 'id');
156
+ var label = getAttr(nodeDom, 'label');
157
+ var node = {
158
+ id: id,
159
+ name: label,
160
+ itemStyle: {
161
+ normal: {}
162
+ }
163
+ };
164
+ var vizSizeDom = getChildByTagName(nodeDom, 'viz:size');
165
+ var vizPosDom = getChildByTagName(nodeDom, 'viz:position');
166
+ var vizColorDom = getChildByTagName(nodeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(nodeDom, 'viz:shape');
167
+
168
+ var attvaluesDom = getChildByTagName(nodeDom, 'attvalues');
169
+
170
+ if (vizSizeDom) {
171
+ node.symbolSize = parseFloat(getAttr(vizSizeDom, 'value'));
172
+ }
173
+
174
+ if (vizPosDom) {
175
+ node.x = parseFloat(getAttr(vizPosDom, 'x'));
176
+ node.y = parseFloat(getAttr(vizPosDom, 'y')); // z
177
+ }
178
+
179
+ if (vizColorDom) {
180
+ node.itemStyle.normal.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
181
+ } // if (vizShapeDom) {
182
+ // node.shape = getAttr(vizShapeDom, 'shape');
183
+ // }
184
+
185
+
186
+ if (attvaluesDom) {
187
+ var attvalueDomList = getChildrenByTagName(attvaluesDom, 'attvalue');
188
+ node.attributes = {};
189
+
190
+ for (var j = 0; j < attvalueDomList.length; j++) {
191
+ var attvalueDom = attvalueDomList[j];
192
+ var attId = getAttr(attvalueDom, 'for');
193
+ var attValue = getAttr(attvalueDom, 'value');
194
+ var attribute = attributesMap[attId];
195
+
196
+ if (attribute) {
197
+ switch (attribute.type) {
198
+ case 'integer':
199
+ case 'long':
200
+ attValue = parseInt(attValue, 10);
201
+ break;
202
+
203
+ case 'float':
204
+ case 'double':
205
+ attValue = parseFloat(attValue);
206
+ break;
207
+
208
+ case 'boolean':
209
+ attValue = attValue.toLowerCase() === 'true';
210
+ break;
211
+ }
212
+
213
+ node.attributes[attId] = attValue;
214
+ }
215
+ }
216
+ }
217
+
218
+ return node;
219
+ }) : [];
220
+ }
221
+
222
+ function parseEdges(parent) {
223
+ return parent ? map(getChildrenByTagName(parent, 'edge'), function (edgeDom) {
224
+ var id = getAttr(edgeDom, 'id');
225
+ var label = getAttr(edgeDom, 'label');
226
+ var sourceId = getAttr(edgeDom, 'source');
227
+ var targetId = getAttr(edgeDom, 'target');
228
+ var edge = {
229
+ id: id,
230
+ name: label,
231
+ source: sourceId,
232
+ target: targetId,
233
+ lineStyle: {
234
+ normal: {}
235
+ }
236
+ };
237
+ var lineStyle = edge.lineStyle.normal;
238
+ var vizThicknessDom = getChildByTagName(edgeDom, 'viz:thickness');
239
+ var vizColorDom = getChildByTagName(edgeDom, 'viz:color'); // let vizShapeDom = getChildByTagName(edgeDom, 'viz:shape');
240
+
241
+ if (vizThicknessDom) {
242
+ lineStyle.width = parseFloat(vizThicknessDom.getAttribute('value'));
243
+ }
244
+
245
+ if (vizColorDom) {
246
+ lineStyle.color = 'rgb(' + [getAttr(vizColorDom, 'r') | 0, getAttr(vizColorDom, 'g') | 0, getAttr(vizColorDom, 'b') | 0].join(',') + ')';
247
+ } // if (vizShapeDom) {
248
+ // edge.shape = vizShapeDom.getAttribute('shape');
249
+ // }
250
+
251
+
252
+ return edge;
253
+ }) : [];
254
+ }
255
+
256
+ function getAttr(el, attrName) {
257
+ return el.getAttribute(attrName);
258
+ }
259
+
260
+ function getChildByTagName(parent, tagName) {
261
+ var node = parent.firstChild;
262
+
263
+ while (node) {
264
+ if (node.nodeType !== 1 || node.nodeName.toLowerCase() !== tagName.toLowerCase()) {
265
+ node = node.nextSibling;
266
+ } else {
267
+ return node;
268
+ }
269
+ }
270
+
271
+ return null;
272
+ }
273
+
274
+ function getChildrenByTagName(parent, tagName) {
275
+ var node = parent.firstChild;
276
+ var children = [];
277
+
278
+ while (node) {
279
+ if (node.nodeName.toLowerCase() === tagName.toLowerCase()) {
280
+ children.push(node);
281
+ }
282
+
283
+ node = node.nextSibling;
284
+ }
285
+
286
+ return children;
287
+ }
288
+
289
+ var gexf = /*#__PURE__*/Object.freeze({
290
+ __proto__: null,
291
+ parse: parse
292
+ });
293
+
318
294
  /*
319
295
  * Licensed to the Apache Software Foundation (ASF) under one
320
296
  * or more contributor license agreements. See the NOTICE file
@@ -332,21 +308,45 @@
332
308
  * KIND, either express or implied. See the License for the
333
309
  * specific language governing permissions and limitations
334
310
  * under the License.
335
- */
336
- function asc(arr) {
337
- arr.sort(function (a, b) {
338
- return a - b;
339
- });
340
- return arr;
341
- }
342
-
343
- function quantile(ascArr, p) {
344
- var H = (ascArr.length - 1) * p + 1;
345
- var h = Math.floor(H);
346
- var v = +ascArr[h - 1];
347
- var e = H - h;
348
- return e ? v + e * (ascArr[h] - v) : v;
349
- }
311
+ */
312
+
313
+
314
+ /**
315
+ * AUTO-GENERATED FILE. DO NOT MODIFY.
316
+ */
317
+
318
+ /*
319
+ * Licensed to the Apache Software Foundation (ASF) under one
320
+ * or more contributor license agreements. See the NOTICE file
321
+ * distributed with this work for additional information
322
+ * regarding copyright ownership. The ASF licenses this file
323
+ * to you under the Apache License, Version 2.0 (the
324
+ * "License"); you may not use this file except in compliance
325
+ * with the License. You may obtain a copy of the License at
326
+ *
327
+ * http://www.apache.org/licenses/LICENSE-2.0
328
+ *
329
+ * Unless required by applicable law or agreed to in writing,
330
+ * software distributed under the License is distributed on an
331
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
332
+ * KIND, either express or implied. See the License for the
333
+ * specific language governing permissions and limitations
334
+ * under the License.
335
+ */
336
+ function asc(arr) {
337
+ arr.sort(function (a, b) {
338
+ return a - b;
339
+ });
340
+ return arr;
341
+ }
342
+
343
+ function quantile(ascArr, p) {
344
+ var H = (ascArr.length - 1) * p + 1;
345
+ var h = Math.floor(H);
346
+ var v = +ascArr[h - 1];
347
+ var e = H - h;
348
+ return e ? v + e * (ascArr[h] - v) : v;
349
+ }
350
350
  /**
351
351
  * See:
352
352
  * <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>
@@ -372,65 +372,65 @@
372
372
  * outliers: Array.<Array.<number>>
373
373
  * axisData: Array.<string>
374
374
  * }
375
- */
376
-
377
-
378
- function prepareBoxplotData (rawData, opt) {
379
- opt = opt || {};
380
- var boxData = [];
381
- var outliers = [];
382
- var axisData = [];
383
- var boundIQR = opt.boundIQR;
384
- var useExtreme = boundIQR === 'none' || boundIQR === 0;
385
-
386
- for (var i = 0; i < rawData.length; i++) {
387
- axisData.push(i + '');
388
- var ascList = asc(rawData[i].slice());
389
- var Q1 = quantile(ascList, 0.25);
390
- var Q2 = quantile(ascList, 0.5);
391
- var Q3 = quantile(ascList, 0.75);
392
- var min = ascList[0];
393
- var max = ascList[ascList.length - 1];
394
- var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
395
- var low = useExtreme ? min : Math.max(min, Q1 - bound);
396
- var high = useExtreme ? max : Math.min(max, Q3 + bound);
397
- boxData.push([low, Q1, Q2, Q3, high]);
398
-
399
- for (var j = 0; j < ascList.length; j++) {
400
- var dataItem = ascList[j];
401
-
402
- if (dataItem < low || dataItem > high) {
403
- var outlier = [i, dataItem];
404
- opt.layout === 'vertical' && outlier.reverse();
405
- outliers.push(outlier);
406
- }
407
- }
408
- }
409
-
410
- return {
411
- boxData: boxData,
412
- outliers: outliers,
413
- axisData: axisData
414
- };
415
- }
416
-
417
- var version = '1.0.0';
418
- // For backward compatibility, where the namespace `dataTool` will
419
- // be mounted on `echarts` is the extension `dataTool` is imported.
420
- // But the old version of echarts do not have `dataTool` namespace,
421
- // so check it before mounting.
422
-
423
- if (echarts.dataTool) {
424
- echarts.dataTool.version = version;
425
- echarts.dataTool.gexf = gexf;
426
- echarts.dataTool.prepareBoxplotData = prepareBoxplotData; // echarts.dataTool.boxplotTransform = boxplotTransform;
427
- }
428
-
429
- exports.gexf = gexf;
430
- exports.prepareBoxplotData = prepareBoxplotData;
431
- exports.version = version;
432
-
433
- Object.defineProperty(exports, '__esModule', { value: true });
434
-
435
- })));
436
- //# sourceMappingURL=dataTool.js.map
375
+ */
376
+
377
+
378
+ function prepareBoxplotData (rawData, opt) {
379
+ opt = opt || {};
380
+ var boxData = [];
381
+ var outliers = [];
382
+ var axisData = [];
383
+ var boundIQR = opt.boundIQR;
384
+ var useExtreme = boundIQR === 'none' || boundIQR === 0;
385
+
386
+ for (var i = 0; i < rawData.length; i++) {
387
+ axisData.push(i + '');
388
+ var ascList = asc(rawData[i].slice());
389
+ var Q1 = quantile(ascList, 0.25);
390
+ var Q2 = quantile(ascList, 0.5);
391
+ var Q3 = quantile(ascList, 0.75);
392
+ var min = ascList[0];
393
+ var max = ascList[ascList.length - 1];
394
+ var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);
395
+ var low = useExtreme ? min : Math.max(min, Q1 - bound);
396
+ var high = useExtreme ? max : Math.min(max, Q3 + bound);
397
+ boxData.push([low, Q1, Q2, Q3, high]);
398
+
399
+ for (var j = 0; j < ascList.length; j++) {
400
+ var dataItem = ascList[j];
401
+
402
+ if (dataItem < low || dataItem > high) {
403
+ var outlier = [i, dataItem];
404
+ opt.layout === 'vertical' && outlier.reverse();
405
+ outliers.push(outlier);
406
+ }
407
+ }
408
+ }
409
+
410
+ return {
411
+ boxData: boxData,
412
+ outliers: outliers,
413
+ axisData: axisData
414
+ };
415
+ }
416
+
417
+ var version = '1.0.0';
418
+ // For backward compatibility, where the namespace `dataTool` will
419
+ // be mounted on `echarts` is the extension `dataTool` is imported.
420
+ // But the old version of echarts do not have `dataTool` namespace,
421
+ // so check it before mounting.
422
+
423
+ if (echarts.dataTool) {
424
+ echarts.dataTool.version = version;
425
+ echarts.dataTool.gexf = gexf;
426
+ echarts.dataTool.prepareBoxplotData = prepareBoxplotData; // echarts.dataTool.boxplotTransform = boxplotTransform;
427
+ }
428
+
429
+ exports.gexf = gexf;
430
+ exports.prepareBoxplotData = prepareBoxplotData;
431
+ exports.version = version;
432
+
433
+ Object.defineProperty(exports, '__esModule', { value: true });
434
+
435
+ })));
436
+ //# sourceMappingURL=dataTool.js.map