echarts-rails 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +13 -0
- data/README.md +2 -1
- data/vendor/assets/javascripts/echarts.common.js +891 -550
- data/vendor/assets/javascripts/echarts.js +1292 -790
- data/vendor/assets/javascripts/echarts.simple.js +589 -437
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55dedbc17f3ea5fd0923662d3251fb9e5d0e3e90
|
4
|
+
data.tar.gz: c847ecc5f15f10ce8efa7ab4e820917d09722867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65517ba74e35a889a4169ace8d69fde13d9188d10c26cf3cb091d07a0c56755adc502141eea2cf6e503dfdbaa8b8507a4371db9e65dbc2e4b092a5b4f1284d55
|
7
|
+
data.tar.gz: ede9b3358ea3d42d8af0d99a8593851be6c2f825559a7dc720c6f6de4b6ff46abd7ca2dbae11844114b313ee2b095dbd49f3fd87b842656e2b9a007f451f56ff
|
data/Gemfile
CHANGED
@@ -1,2 +1,15 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
group :assets do
|
4
|
+
gem 'sqlite3'
|
5
|
+
gem 'sass-rails', "~> 5.0"
|
6
|
+
gem 'coffee-rails', '~> 4.1.0'
|
7
|
+
gem 'uglifier', '>= 1.3.0'
|
8
|
+
end
|
9
|
+
group :test do
|
10
|
+
gem 'turn', :require => false
|
11
|
+
gem 'rspec-rails'
|
12
|
+
gem 'capybara'
|
13
|
+
gem 'capybara-webkit'
|
14
|
+
end
|
2
15
|
gemspec
|
data/README.md
CHANGED
@@ -7,6 +7,7 @@ Check out how to use echarts at http://echarts.baidu.com
|
|
7
7
|
* echarts-rails 0.1.0 -> echarts 3.1.3
|
8
8
|
* echarts-rails 0.1.2 -> echarts 3.2.0
|
9
9
|
* echarts-rails 0.1.3 -> echarts 3.2.2
|
10
|
+
* echarts-rails 0.1.4 -> echarts 3.2.3
|
10
11
|
|
11
12
|
## Installation
|
12
13
|
|
@@ -45,7 +46,7 @@ And you're done!
|
|
45
46
|
## Usage
|
46
47
|
|
47
48
|
```
|
48
|
-
<div id="main" style="width: 600px; height: 400px;
|
49
|
+
<div id="main" style="width: 600px; height: 400px;"></div>
|
49
50
|
<script>
|
50
51
|
// 基于准备好的dom,初始化echarts实例
|
51
52
|
var myChart = echarts.init(document.getElementById('main'));
|
@@ -69,13 +69,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
69
69
|
__webpack_require__(112);
|
70
70
|
__webpack_require__(315);
|
71
71
|
|
72
|
-
__webpack_require__(
|
73
|
-
__webpack_require__(
|
74
|
-
__webpack_require__(
|
72
|
+
__webpack_require__(345);
|
73
|
+
__webpack_require__(351);
|
74
|
+
__webpack_require__(354);
|
75
75
|
__webpack_require__(316);
|
76
|
-
__webpack_require__(
|
76
|
+
__webpack_require__(366);
|
77
77
|
|
78
|
-
__webpack_require__(
|
78
|
+
__webpack_require__(379);
|
79
79
|
|
80
80
|
/***/ },
|
81
81
|
/* 1 */
|
@@ -150,6 +150,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
150
150
|
var IN_MAIN_PROCESS = '__flag_in_main_process';
|
151
151
|
var HAS_GRADIENT_OR_PATTERN_BG = '_hasGradientOrPatternBg';
|
152
152
|
|
153
|
+
|
154
|
+
var OPTION_UPDATED = '_optionUpdated';
|
155
|
+
|
153
156
|
function createRegisterEventWithLowercaseName(method) {
|
154
157
|
return function (eventName, handler, context) {
|
155
158
|
// Event name is all lowercase
|
@@ -265,10 +268,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
265
268
|
}
|
266
269
|
timsort(visualFuncs, prioritySortFunc);
|
267
270
|
timsort(dataProcessorFuncs, prioritySortFunc);
|
271
|
+
|
272
|
+
this._zr.animation.on('frame', this._onframe, this);
|
268
273
|
}
|
269
274
|
|
270
275
|
var echartsProto = ECharts.prototype;
|
271
276
|
|
277
|
+
echartsProto._onframe = function () {
|
278
|
+
// Lazy update
|
279
|
+
if (this[OPTION_UPDATED]) {
|
280
|
+
|
281
|
+
this[IN_MAIN_PROCESS] = true;
|
282
|
+
|
283
|
+
updateMethods.prepareAndUpdate.call(this);
|
284
|
+
|
285
|
+
this[IN_MAIN_PROCESS] = false;
|
286
|
+
|
287
|
+
this[OPTION_UPDATED] = false;
|
288
|
+
}
|
289
|
+
};
|
272
290
|
/**
|
273
291
|
* @return {HTMLDomElement}
|
274
292
|
*/
|
@@ -286,9 +304,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
286
304
|
/**
|
287
305
|
* @param {Object} option
|
288
306
|
* @param {boolean} notMerge
|
289
|
-
* @param {boolean} [
|
307
|
+
* @param {boolean} [lazyUpdate=false] Useful when setOption frequently.
|
290
308
|
*/
|
291
|
-
echartsProto.setOption = function (option, notMerge,
|
309
|
+
echartsProto.setOption = function (option, notMerge, lazyUpdate) {
|
292
310
|
if (true) {
|
293
311
|
zrUtil.assert(!this[IN_MAIN_PROCESS], '`setOption` should not be called during main process.');
|
294
312
|
}
|
@@ -304,13 +322,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
304
322
|
|
305
323
|
this._model.setOption(option, optionPreprocessorFuncs);
|
306
324
|
|
307
|
-
|
325
|
+
if (lazyUpdate) {
|
326
|
+
this[OPTION_UPDATED] = true;
|
327
|
+
}
|
328
|
+
else {
|
329
|
+
updateMethods.prepareAndUpdate.call(this);
|
330
|
+
this._zr.refreshImmediately();
|
331
|
+
this[OPTION_UPDATED] = false;
|
332
|
+
}
|
308
333
|
|
309
334
|
this[IN_MAIN_PROCESS] = false;
|
310
335
|
|
311
336
|
this._flushPendingActions();
|
312
|
-
|
313
|
-
!notRefreshImmediately && this._zr.refreshImmediately();
|
314
337
|
};
|
315
338
|
|
316
339
|
/**
|
@@ -331,7 +354,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
331
354
|
* @return {Object}
|
332
355
|
*/
|
333
356
|
echartsProto.getOption = function () {
|
334
|
-
return this._model.getOption();
|
357
|
+
return this._model && this._model.getOption();
|
335
358
|
};
|
336
359
|
|
337
360
|
/**
|
@@ -701,7 +724,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
701
724
|
this._flushPendingActions();
|
702
725
|
};
|
703
726
|
|
704
|
-
var defaultLoadingEffect = __webpack_require__(93);
|
705
727
|
/**
|
706
728
|
* Show loading effect
|
707
729
|
* @param {string} [name='default']
|
@@ -710,10 +732,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
710
732
|
echartsProto.showLoading = function (name, cfg) {
|
711
733
|
if (zrUtil.isObject(name)) {
|
712
734
|
cfg = name;
|
713
|
-
name = '
|
735
|
+
name = '';
|
714
736
|
}
|
737
|
+
name = name || 'default';
|
738
|
+
|
715
739
|
this.hideLoading();
|
716
|
-
|
740
|
+
if (!loadingEffects[name]) {
|
741
|
+
if (true) {
|
742
|
+
console.warn('Loading effects ' + name + ' not exists.');
|
743
|
+
}
|
744
|
+
return;
|
745
|
+
}
|
746
|
+
var el = loadingEffects[name](this._api, cfg);
|
717
747
|
var zr = this._zr;
|
718
748
|
this._loadingFX = el;
|
719
749
|
|
@@ -798,8 +828,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
798
828
|
isHighlightOrDownplay && updateMethods[updateMethod].call(this, batchItem);
|
799
829
|
}
|
800
830
|
|
801
|
-
(updateMethod !== 'none' && !isHighlightOrDownplay)
|
802
|
-
|
831
|
+
if (updateMethod !== 'none' && !isHighlightOrDownplay) {
|
832
|
+
// Still dirty
|
833
|
+
if (this[OPTION_UPDATED]) {
|
834
|
+
// FIXME Pass payload ?
|
835
|
+
updateMethods.prepareAndUpdate.call(this, payload);
|
836
|
+
this[OPTION_UPDATED] = false;
|
837
|
+
}
|
838
|
+
else {
|
839
|
+
updateMethods[updateMethod].call(this, payload);
|
840
|
+
}
|
841
|
+
}
|
803
842
|
|
804
843
|
// Follow the rule of action batch
|
805
844
|
if (batched) {
|
@@ -1037,7 +1076,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1037
1076
|
}
|
1038
1077
|
|
1039
1078
|
var MOUSE_EVENT_NAMES = [
|
1040
|
-
'click', 'dblclick', 'mouseover', 'mouseout', 'mousedown', 'mouseup', 'globalout'
|
1079
|
+
'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mousedown', 'mouseup', 'globalout'
|
1041
1080
|
];
|
1042
1081
|
/**
|
1043
1082
|
* @private
|
@@ -1079,7 +1118,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1079
1118
|
* Clear
|
1080
1119
|
*/
|
1081
1120
|
echartsProto.clear = function () {
|
1082
|
-
this.setOption({}, true);
|
1121
|
+
this.setOption({ series: [] }, true);
|
1083
1122
|
};
|
1084
1123
|
/**
|
1085
1124
|
* Dispose instance
|
@@ -1220,6 +1259,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1220
1259
|
* @type {Object.<key, Object>}
|
1221
1260
|
*/
|
1222
1261
|
var themeStorage = {};
|
1262
|
+
/**
|
1263
|
+
* Loading effects
|
1264
|
+
*/
|
1265
|
+
var loadingEffects = {};
|
1223
1266
|
|
1224
1267
|
|
1225
1268
|
var instances = {};
|
@@ -1235,9 +1278,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1235
1278
|
/**
|
1236
1279
|
* @type {number}
|
1237
1280
|
*/
|
1238
|
-
version: '3.2.
|
1281
|
+
version: '3.2.3',
|
1239
1282
|
dependencies: {
|
1240
|
-
zrender: '3.1.
|
1283
|
+
zrender: '3.1.3'
|
1241
1284
|
}
|
1242
1285
|
};
|
1243
1286
|
|
@@ -1459,7 +1502,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1459
1502
|
* Most visual encoding like color are common for different chart
|
1460
1503
|
* But each chart has it's own layout algorithm
|
1461
1504
|
*
|
1462
|
-
* @param {
|
1505
|
+
* @param {number} [priority=1000]
|
1463
1506
|
* @param {Function} layoutFunc
|
1464
1507
|
*/
|
1465
1508
|
echarts.registerLayout = function (priority, layoutFunc) {
|
@@ -1480,7 +1523,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1480
1523
|
};
|
1481
1524
|
|
1482
1525
|
/**
|
1483
|
-
* @param {
|
1526
|
+
* @param {number} [priority=3000]
|
1484
1527
|
* @param {Function} visualFunc
|
1485
1528
|
*/
|
1486
1529
|
echarts.registerVisual = function (priority, visualFunc) {
|
@@ -1499,6 +1542,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1499
1542
|
});
|
1500
1543
|
};
|
1501
1544
|
|
1545
|
+
/**
|
1546
|
+
* @param {string} name
|
1547
|
+
*/
|
1548
|
+
echarts.registerLoading = function (name, loadingFx) {
|
1549
|
+
loadingEffects[name] = loadingFx;
|
1550
|
+
};
|
1551
|
+
|
1552
|
+
|
1502
1553
|
var parseClassType = ComponentModel.parseClassType;
|
1503
1554
|
/**
|
1504
1555
|
* @param {Object} opts
|
@@ -1551,7 +1602,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1551
1602
|
var classType = parseClassType(superClass);
|
1552
1603
|
Clazz = ChartView.getClass(classType.main, true);
|
1553
1604
|
}
|
1554
|
-
return
|
1605
|
+
return Clazz.extend(opts);
|
1555
1606
|
};
|
1556
1607
|
|
1557
1608
|
/**
|
@@ -1574,8 +1625,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1574
1625
|
zrUtil.createCanvas = creator;
|
1575
1626
|
};
|
1576
1627
|
|
1577
|
-
echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, __webpack_require__(
|
1578
|
-
echarts.registerPreprocessor(__webpack_require__(
|
1628
|
+
echarts.registerVisual(PRIORITY_VISUAL_GLOBAL, __webpack_require__(93));
|
1629
|
+
echarts.registerPreprocessor(__webpack_require__(94));
|
1630
|
+
echarts.registerLoading('default', __webpack_require__(96));
|
1579
1631
|
|
1580
1632
|
// Default action
|
1581
1633
|
echarts.registerAction({
|
@@ -1897,6 +1949,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1897
1949
|
newCptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this
|
1898
1950
|
);
|
1899
1951
|
|
1952
|
+
this._seriesIndices = this._seriesIndices || [];
|
1953
|
+
|
1900
1954
|
function visitComponent(mainType, dependencies) {
|
1901
1955
|
var newCptOptionList = modelUtil.normalizeToArray(newOption[mainType]);
|
1902
1956
|
|
@@ -2066,6 +2120,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2066
2120
|
|| (!isNameArray && cpt.name === name);
|
2067
2121
|
});
|
2068
2122
|
}
|
2123
|
+
else {
|
2124
|
+
// Return all components with mainType
|
2125
|
+
result = cpts;
|
2126
|
+
}
|
2069
2127
|
|
2070
2128
|
return filterBySubType(result, condition);
|
2071
2129
|
},
|
@@ -3028,60 +3086,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3028
3086
|
var Model = __webpack_require__(12);
|
3029
3087
|
var zrUtil = __webpack_require__(4);
|
3030
3088
|
|
3031
|
-
var AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle'];
|
3032
|
-
|
3033
3089
|
var modelUtil = {};
|
3034
3090
|
|
3035
|
-
/**
|
3036
|
-
* Create "each" method to iterate names.
|
3037
|
-
*
|
3038
|
-
* @pubilc
|
3039
|
-
* @param {Array.<string>} names
|
3040
|
-
* @param {Array.<string>=} attrs
|
3041
|
-
* @return {Function}
|
3042
|
-
*/
|
3043
|
-
modelUtil.createNameEach = function (names, attrs) {
|
3044
|
-
names = names.slice();
|
3045
|
-
var capitalNames = zrUtil.map(names, modelUtil.capitalFirst);
|
3046
|
-
attrs = (attrs || []).slice();
|
3047
|
-
var capitalAttrs = zrUtil.map(attrs, modelUtil.capitalFirst);
|
3048
|
-
|
3049
|
-
return function (callback, context) {
|
3050
|
-
zrUtil.each(names, function (name, index) {
|
3051
|
-
var nameObj = {name: name, capital: capitalNames[index]};
|
3052
|
-
|
3053
|
-
for (var j = 0; j < attrs.length; j++) {
|
3054
|
-
nameObj[attrs[j]] = name + capitalAttrs[j];
|
3055
|
-
}
|
3056
|
-
|
3057
|
-
callback.call(context, nameObj);
|
3058
|
-
});
|
3059
|
-
};
|
3060
|
-
};
|
3061
|
-
|
3062
|
-
/**
|
3063
|
-
* @public
|
3064
|
-
*/
|
3065
|
-
modelUtil.capitalFirst = function (str) {
|
3066
|
-
return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;
|
3067
|
-
};
|
3068
|
-
|
3069
|
-
/**
|
3070
|
-
* Iterate each dimension name.
|
3071
|
-
*
|
3072
|
-
* @public
|
3073
|
-
* @param {Function} callback The parameter is like:
|
3074
|
-
* {
|
3075
|
-
* name: 'angle',
|
3076
|
-
* capital: 'Angle',
|
3077
|
-
* axis: 'angleAxis',
|
3078
|
-
* axisIndex: 'angleAixs',
|
3079
|
-
* index: 'angleIndex'
|
3080
|
-
* }
|
3081
|
-
* @param {Object} context
|
3082
|
-
*/
|
3083
|
-
modelUtil.eachAxisDim = modelUtil.createNameEach(AXIS_DIMS, ['axisIndex', 'axis', 'index']);
|
3084
|
-
|
3085
3091
|
/**
|
3086
3092
|
* If value is not array, then translate it to array.
|
3087
3093
|
* @param {*} value
|
@@ -3095,76 +3101,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3095
3101
|
: [value];
|
3096
3102
|
};
|
3097
3103
|
|
3098
|
-
/**
|
3099
|
-
* If tow dataZoomModels has the same axis controlled, we say that they are 'linked'.
|
3100
|
-
* dataZoomModels and 'links' make up one or more graphics.
|
3101
|
-
* This function finds the graphic where the source dataZoomModel is in.
|
3102
|
-
*
|
3103
|
-
* @public
|
3104
|
-
* @param {Function} forEachNode Node iterator.
|
3105
|
-
* @param {Function} forEachEdgeType edgeType iterator
|
3106
|
-
* @param {Function} edgeIdGetter Giving node and edgeType, return an array of edge id.
|
3107
|
-
* @return {Function} Input: sourceNode, Output: Like {nodes: [], dims: {}}
|
3108
|
-
*/
|
3109
|
-
modelUtil.createLinkedNodesFinder = function (forEachNode, forEachEdgeType, edgeIdGetter) {
|
3110
|
-
|
3111
|
-
return function (sourceNode) {
|
3112
|
-
var result = {
|
3113
|
-
nodes: [],
|
3114
|
-
records: {} // key: edgeType.name, value: Object (key: edge id, value: boolean).
|
3115
|
-
};
|
3116
|
-
|
3117
|
-
forEachEdgeType(function (edgeType) {
|
3118
|
-
result.records[edgeType.name] = {};
|
3119
|
-
});
|
3120
|
-
|
3121
|
-
if (!sourceNode) {
|
3122
|
-
return result;
|
3123
|
-
}
|
3124
|
-
|
3125
|
-
absorb(sourceNode, result);
|
3126
|
-
|
3127
|
-
var existsLink;
|
3128
|
-
do {
|
3129
|
-
existsLink = false;
|
3130
|
-
forEachNode(processSingleNode);
|
3131
|
-
}
|
3132
|
-
while (existsLink);
|
3133
|
-
|
3134
|
-
function processSingleNode(node) {
|
3135
|
-
if (!isNodeAbsorded(node, result) && isLinked(node, result)) {
|
3136
|
-
absorb(node, result);
|
3137
|
-
existsLink = true;
|
3138
|
-
}
|
3139
|
-
}
|
3140
|
-
|
3141
|
-
return result;
|
3142
|
-
};
|
3143
|
-
|
3144
|
-
function isNodeAbsorded(node, result) {
|
3145
|
-
return zrUtil.indexOf(result.nodes, node) >= 0;
|
3146
|
-
}
|
3147
|
-
|
3148
|
-
function isLinked(node, result) {
|
3149
|
-
var hasLink = false;
|
3150
|
-
forEachEdgeType(function (edgeType) {
|
3151
|
-
zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {
|
3152
|
-
result.records[edgeType.name][edgeId] && (hasLink = true);
|
3153
|
-
});
|
3154
|
-
});
|
3155
|
-
return hasLink;
|
3156
|
-
}
|
3157
|
-
|
3158
|
-
function absorb(node, result) {
|
3159
|
-
result.nodes.push(node);
|
3160
|
-
forEachEdgeType(function (edgeType) {
|
3161
|
-
zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {
|
3162
|
-
result.records[edgeType.name][edgeId] = true;
|
3163
|
-
});
|
3164
|
-
});
|
3165
|
-
}
|
3166
|
-
};
|
3167
|
-
|
3168
3104
|
/**
|
3169
3105
|
* Sync default option between normal and emphasis like `position` and `show`
|
3170
3106
|
* In case some one will write code like
|
@@ -3388,22 +3324,31 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3388
3324
|
return;
|
3389
3325
|
}
|
3390
3326
|
|
3327
|
+
// id has highest priority.
|
3328
|
+
for (var i = 0; i < result.length; i++) {
|
3329
|
+
if (!result[i].option // Consider name: two map to one.
|
3330
|
+
&& cptOption.id != null
|
3331
|
+
&& result[i].exist.id === cptOption.id + ''
|
3332
|
+
) {
|
3333
|
+
result[i].option = cptOption;
|
3334
|
+
newCptOptions[index] = null;
|
3335
|
+
return;
|
3336
|
+
}
|
3337
|
+
}
|
3338
|
+
|
3391
3339
|
for (var i = 0; i < result.length; i++) {
|
3392
3340
|
var exist = result[i].exist;
|
3393
3341
|
if (!result[i].option // Consider name: two map to one.
|
3394
|
-
|
3395
|
-
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
&& exist.name === cptOption.name + ''
|
3401
|
-
)
|
3402
|
-
)
|
3342
|
+
// Can not match when both ids exist but different.
|
3343
|
+
&& (exist.id == null || cptOption.id == null)
|
3344
|
+
&& cptOption.name != null
|
3345
|
+
&& !modelUtil.isIdInner(cptOption)
|
3346
|
+
&& !modelUtil.isIdInner(exist)
|
3347
|
+
&& exist.name === cptOption.name + ''
|
3403
3348
|
) {
|
3404
3349
|
result[i].option = cptOption;
|
3405
3350
|
newCptOptions[index] = null;
|
3406
|
-
|
3351
|
+
return;
|
3407
3352
|
}
|
3408
3353
|
}
|
3409
3354
|
});
|
@@ -3516,28 +3461,29 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3516
3461
|
var numberUtil = __webpack_require__(7);
|
3517
3462
|
var textContain = __webpack_require__(8);
|
3518
3463
|
|
3464
|
+
var formatUtil = {};
|
3519
3465
|
/**
|
3520
3466
|
* 每三位默认加,格式化
|
3521
3467
|
* @type {string|number} x
|
3522
3468
|
*/
|
3523
|
-
function
|
3469
|
+
formatUtil.addCommas = function (x) {
|
3524
3470
|
if (isNaN(x)) {
|
3525
3471
|
return '-';
|
3526
3472
|
}
|
3527
3473
|
x = (x + '').split('.');
|
3528
3474
|
return x[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,'$1,')
|
3529
3475
|
+ (x.length > 1 ? ('.' + x[1]) : '');
|
3530
|
-
}
|
3476
|
+
};
|
3531
3477
|
|
3532
3478
|
/**
|
3533
3479
|
* @param {string} str
|
3534
3480
|
* @return {string} str
|
3535
3481
|
*/
|
3536
|
-
function
|
3482
|
+
formatUtil.toCamelCase = function (str) {
|
3537
3483
|
return str.toLowerCase().replace(/-(.)/g, function(match, group1) {
|
3538
3484
|
return group1.toUpperCase();
|
3539
3485
|
});
|
3540
|
-
}
|
3486
|
+
};
|
3541
3487
|
|
3542
3488
|
/**
|
3543
3489
|
* Normalize css liked array configuration
|
@@ -3547,7 +3493,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3547
3493
|
* [4, 3, 2] => [4, 3, 2, 3]
|
3548
3494
|
* @param {number|Array.<number>} val
|
3549
3495
|
*/
|
3550
|
-
function
|
3496
|
+
formatUtil.normalizeCssArray = function (val) {
|
3551
3497
|
var len = val.length;
|
3552
3498
|
if (typeof (val) === 'number') {
|
3553
3499
|
return [val, val, val, val];
|
@@ -3561,29 +3507,30 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3561
3507
|
return [val[0], val[1], val[2], val[1]];
|
3562
3508
|
}
|
3563
3509
|
return val;
|
3564
|
-
}
|
3510
|
+
};
|
3565
3511
|
|
3566
|
-
function
|
3512
|
+
formatUtil.encodeHTML = function (source) {
|
3567
3513
|
return String(source)
|
3568
3514
|
.replace(/&/g, '&')
|
3569
3515
|
.replace(/</g, '<')
|
3570
3516
|
.replace(/>/g, '>')
|
3571
3517
|
.replace(/"/g, '"')
|
3572
3518
|
.replace(/'/g, ''');
|
3573
|
-
}
|
3519
|
+
};
|
3574
3520
|
|
3575
3521
|
var TPL_VAR_ALIAS = ['a', 'b', 'c', 'd', 'e', 'f', 'g'];
|
3576
3522
|
|
3577
|
-
function
|
3523
|
+
var wrapVar = function (varName, seriesIdx) {
|
3578
3524
|
return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}';
|
3579
|
-
}
|
3525
|
+
};
|
3526
|
+
|
3580
3527
|
/**
|
3581
3528
|
* Template formatter
|
3582
3529
|
* @param {string} tpl
|
3583
3530
|
* @param {Array.<Object>|Object} paramsList
|
3584
3531
|
* @return {string}
|
3585
3532
|
*/
|
3586
|
-
function
|
3533
|
+
formatUtil.formatTpl = function (tpl, paramsList) {
|
3587
3534
|
if (!zrUtil.isArray(paramsList)) {
|
3588
3535
|
paramsList = [paramsList];
|
3589
3536
|
}
|
@@ -3607,7 +3554,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3607
3554
|
}
|
3608
3555
|
|
3609
3556
|
return tpl;
|
3610
|
-
}
|
3557
|
+
};
|
3558
|
+
|
3559
|
+
|
3560
|
+
/**
|
3561
|
+
* @param {string} str
|
3562
|
+
* @return {string}
|
3563
|
+
* @inner
|
3564
|
+
*/
|
3565
|
+
var s2d = function (str) {
|
3566
|
+
return str < 10 ? ('0' + str) : str;
|
3567
|
+
};
|
3611
3568
|
|
3612
3569
|
/**
|
3613
3570
|
* ISO Date format
|
@@ -3615,7 +3572,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3615
3572
|
* @param {number} value
|
3616
3573
|
* @inner
|
3617
3574
|
*/
|
3618
|
-
function
|
3575
|
+
formatUtil.formatTime = function (tpl, value) {
|
3619
3576
|
if (tpl === 'week'
|
3620
3577
|
|| tpl === 'month'
|
3621
3578
|
|| tpl === 'quarter'
|
@@ -3647,33 +3604,20 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3647
3604
|
.replace('s', s);
|
3648
3605
|
|
3649
3606
|
return tpl;
|
3650
|
-
}
|
3607
|
+
};
|
3651
3608
|
|
3652
3609
|
/**
|
3610
|
+
* Capital first
|
3653
3611
|
* @param {string} str
|
3654
3612
|
* @return {string}
|
3655
|
-
* @inner
|
3656
3613
|
*/
|
3657
|
-
function
|
3658
|
-
return str
|
3659
|
-
}
|
3660
|
-
|
3661
|
-
module.exports = {
|
3662
|
-
|
3663
|
-
normalizeCssArray: normalizeCssArray,
|
3664
|
-
|
3665
|
-
addCommas: addCommas,
|
3666
|
-
|
3667
|
-
toCamelCase: toCamelCase,
|
3668
|
-
|
3669
|
-
encodeHTML: encodeHTML,
|
3614
|
+
formatUtil.capitalFirst = function (str) {
|
3615
|
+
return str ? str.charAt(0).toUpperCase() + str.substr(1) : str;
|
3616
|
+
};
|
3670
3617
|
|
3671
|
-
|
3618
|
+
formatUtil.truncateText = textContain.truncateText;
|
3672
3619
|
|
3673
|
-
|
3674
|
-
|
3675
|
-
truncateText: textContain.truncateText
|
3676
|
-
};
|
3620
|
+
module.exports = formatUtil;
|
3677
3621
|
|
3678
3622
|
|
3679
3623
|
/***/ },
|
@@ -3788,9 +3732,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3788
3732
|
* @param {number} x
|
3789
3733
|
* @return {number}
|
3790
3734
|
*/
|
3791
|
-
number.round = function (x) {
|
3735
|
+
number.round = function (x, precision) {
|
3736
|
+
if (precision == null) {
|
3737
|
+
precision = 10;
|
3738
|
+
}
|
3792
3739
|
// PENDING
|
3793
|
-
return +(+x).toFixed(
|
3740
|
+
return +(+x).toFixed(precision);
|
3794
3741
|
};
|
3795
3742
|
|
3796
3743
|
number.asc = function (arr) {
|
@@ -3822,6 +3769,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3822
3769
|
return count;
|
3823
3770
|
};
|
3824
3771
|
|
3772
|
+
number.getPrecisionSafe = function (val) {
|
3773
|
+
var str = val.toString();
|
3774
|
+
var dotIndex = str.indexOf('.');
|
3775
|
+
if (dotIndex < 0) {
|
3776
|
+
return 0;
|
3777
|
+
}
|
3778
|
+
return str.length - 1 - dotIndex;
|
3779
|
+
};
|
3780
|
+
|
3825
3781
|
/**
|
3826
3782
|
* @param {Array.<number>} dataExtent
|
3827
3783
|
* @param {Array.<number>} pixelExtent
|
@@ -3861,17 +3817,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3861
3817
|
|
3862
3818
|
/**
|
3863
3819
|
* @param {string|Date|number} value
|
3864
|
-
* @return {
|
3820
|
+
* @return {Date} date
|
3865
3821
|
*/
|
3866
3822
|
number.parseDate = function (value) {
|
3867
|
-
|
3868
|
-
|
3869
|
-
|
3870
|
-
|
3871
|
-
|
3872
|
-
|
3873
|
-
|
3874
|
-
|
3823
|
+
if (value instanceof Date) {
|
3824
|
+
return value;
|
3825
|
+
}
|
3826
|
+
else if (typeof value === 'string') {
|
3827
|
+
// Treat as ISO format. See issue #3623
|
3828
|
+
var ret = new Date(value);
|
3829
|
+
if (isNaN(+ret)) {
|
3830
|
+
// FIXME new Date('1970-01-01') is UTC, new Date('1970/01/01') is local
|
3831
|
+
ret = new Date(new Date(value.replace(/-/g, '/')) - new Date('1970/01/01'));
|
3832
|
+
}
|
3833
|
+
return ret;
|
3834
|
+
}
|
3835
|
+
|
3836
|
+
return new Date(Math.round(value));
|
3875
3837
|
};
|
3876
3838
|
|
3877
3839
|
/**
|
@@ -4911,7 +4873,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4911
4873
|
*/
|
4912
4874
|
getShallow: function (key, ignoreParent) {
|
4913
4875
|
var option = this.option;
|
4914
|
-
|
4876
|
+
|
4877
|
+
var val = option == null ? option : option[key];
|
4915
4878
|
var parentModel = this.parentModel;
|
4916
4879
|
if (val == null && parentModel && !ignoreParent) {
|
4917
4880
|
val = parentModel.getShallow(key);
|
@@ -5210,7 +5173,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
5210
5173
|
getLineDash: function () {
|
5211
5174
|
var lineType = this.get('type');
|
5212
5175
|
return (lineType === 'solid' || lineType == null) ? null
|
5213
|
-
: (lineType === 'dashed' ? [5, 5] : [
|
5176
|
+
: (lineType === 'dashed' ? [5, 5] : [2, 2]);
|
5214
5177
|
}
|
5215
5178
|
};
|
5216
5179
|
|
@@ -6180,7 +6143,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
6180
6143
|
color: ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae','#749f83', '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
|
6181
6144
|
|
6182
6145
|
// 默认需要 Grid 配置项
|
6183
|
-
grid: {},
|
6146
|
+
// grid: {},
|
6184
6147
|
// 主题,主题
|
6185
6148
|
textStyle: {
|
6186
6149
|
// color: '#000',
|
@@ -8134,16 +8097,19 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8134
8097
|
*/
|
8135
8098
|
transformableProto.setTransform = function (ctx) {
|
8136
8099
|
var m = this.transform;
|
8100
|
+
var dpr = ctx.dpr || 1;
|
8137
8101
|
if (m) {
|
8138
|
-
ctx.
|
8102
|
+
ctx.setTransform(dpr * m[0], dpr * m[1], dpr * m[2], dpr * m[3], dpr * m[4], dpr * m[5]);
|
8103
|
+
}
|
8104
|
+
else {
|
8105
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
8139
8106
|
}
|
8140
8107
|
};
|
8141
8108
|
|
8142
8109
|
transformableProto.restoreTransform = function (ctx) {
|
8143
|
-
var m = this.
|
8144
|
-
|
8145
|
-
|
8146
|
-
}
|
8110
|
+
var m = this.transform;
|
8111
|
+
var dpr = ctx.dpr || 1;
|
8112
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
8147
8113
|
}
|
8148
8114
|
|
8149
8115
|
var tmpTransform = [];
|
@@ -8830,7 +8796,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8830
8796
|
// kf1-----kf2---------current--------kf3
|
8831
8797
|
// find kf2 and kf3 and do interpolation
|
8832
8798
|
var frame;
|
8833
|
-
|
8799
|
+
// In the easing function like elasticOut, percent may less than 0
|
8800
|
+
if (percent < 0) {
|
8801
|
+
frame = 0;
|
8802
|
+
}
|
8803
|
+
else if (percent < lastFramePercent) {
|
8834
8804
|
// Start from next key
|
8835
8805
|
// PENDING start from lastFrame ?
|
8836
8806
|
start = Math.min(lastFrame + 1, trackLen - 1);
|
@@ -9185,15 +9155,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9185
9155
|
|
9186
9156
|
constructor: Clip,
|
9187
9157
|
|
9188
|
-
step: function (
|
9158
|
+
step: function (globalTime) {
|
9189
9159
|
// Set startTime on first step, or _startTime may has milleseconds different between clips
|
9190
9160
|
// PENDING
|
9191
9161
|
if (!this._initialized) {
|
9192
|
-
this._startTime =
|
9162
|
+
this._startTime = globalTime + this._delay;
|
9193
9163
|
this._initialized = true;
|
9194
9164
|
}
|
9195
9165
|
|
9196
|
-
var percent = (
|
9166
|
+
var percent = (globalTime - this._startTime) / this._life;
|
9197
9167
|
|
9198
9168
|
// 还没开始
|
9199
9169
|
if (percent < 0) {
|
@@ -9213,7 +9183,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9213
9183
|
// 结束
|
9214
9184
|
if (percent == 1) {
|
9215
9185
|
if (this.loop) {
|
9216
|
-
this.restart();
|
9186
|
+
this.restart (globalTime);
|
9217
9187
|
// 重新开始周期
|
9218
9188
|
// 抛出而不是直接调用事件直到 stage.update 后再统一调用这些事件
|
9219
9189
|
return 'restart';
|
@@ -9228,10 +9198,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9228
9198
|
return null;
|
9229
9199
|
},
|
9230
9200
|
|
9231
|
-
restart: function() {
|
9232
|
-
var
|
9233
|
-
|
9234
|
-
this._startTime = new Date().getTime() - remainder + this.gap;
|
9201
|
+
restart: function (globalTime) {
|
9202
|
+
var remainder = (globalTime - this._startTime) % this._life;
|
9203
|
+
this._startTime = globalTime - remainder + this.gap;
|
9235
9204
|
|
9236
9205
|
this._needsRemove = false;
|
9237
9206
|
},
|
@@ -11207,6 +11176,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
11207
11176
|
transform = matrix.create();
|
11208
11177
|
}
|
11209
11178
|
matrix.mul(transform, m, transform);
|
11179
|
+
this.dirty(true);
|
11210
11180
|
};
|
11211
11181
|
|
11212
11182
|
return opts;
|
@@ -12056,25 +12026,42 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
12056
12026
|
textVerticalAlign: null,
|
12057
12027
|
|
12058
12028
|
/**
|
12029
|
+
* Only useful in Path and Image element
|
12059
12030
|
* @type {number}
|
12060
12031
|
*/
|
12061
12032
|
textDistance: 5,
|
12062
12033
|
|
12063
12034
|
/**
|
12035
|
+
* Only useful in Path and Image element
|
12064
12036
|
* @type {number}
|
12065
12037
|
*/
|
12066
12038
|
textShadowBlur: 0,
|
12067
12039
|
|
12068
12040
|
/**
|
12041
|
+
* Only useful in Path and Image element
|
12069
12042
|
* @type {number}
|
12070
12043
|
*/
|
12071
12044
|
textShadowOffsetX: 0,
|
12072
12045
|
|
12073
12046
|
/**
|
12047
|
+
* Only useful in Path and Image element
|
12074
12048
|
* @type {number}
|
12075
12049
|
*/
|
12076
12050
|
textShadowOffsetY: 0,
|
12077
12051
|
|
12052
|
+
/**
|
12053
|
+
* If transform text
|
12054
|
+
* Only useful in Path and Image element
|
12055
|
+
* @type {boolean}
|
12056
|
+
*/
|
12057
|
+
textTransform: false,
|
12058
|
+
|
12059
|
+
/**
|
12060
|
+
* Text rotate around position of Path or Image
|
12061
|
+
* Only useful in Path and Image element and textTransform is false.
|
12062
|
+
*/
|
12063
|
+
textRotation: 0,
|
12064
|
+
|
12078
12065
|
/**
|
12079
12066
|
* @type {string}
|
12080
12067
|
* https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation
|
@@ -12227,10 +12214,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
12227
12214
|
return value;
|
12228
12215
|
}
|
12229
12216
|
|
12230
|
-
function setTransform(ctx, m) {
|
12231
|
-
ctx.transform(m[0], m[1], m[2], m[3], m[4], m[5]);
|
12232
|
-
}
|
12233
|
-
|
12234
12217
|
RectText.prototype = {
|
12235
12218
|
|
12236
12219
|
constructor: RectText,
|
@@ -12266,10 +12249,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
12266
12249
|
|
12267
12250
|
// Transform rect to view space
|
12268
12251
|
var transform = this.transform;
|
12269
|
-
if (
|
12270
|
-
|
12271
|
-
|
12272
|
-
|
12252
|
+
if (!style.textTransform) {
|
12253
|
+
if (transform) {
|
12254
|
+
tmpRect.copy(rect);
|
12255
|
+
tmpRect.applyTransform(transform);
|
12256
|
+
rect = tmpRect;
|
12257
|
+
}
|
12258
|
+
}
|
12259
|
+
else {
|
12260
|
+
this.setTransform(ctx);
|
12273
12261
|
}
|
12274
12262
|
|
12275
12263
|
// Text position represented by coord
|
@@ -12315,7 +12303,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
12315
12303
|
var textStroke = style.textStroke;
|
12316
12304
|
textFill && (ctx.fillStyle = textFill);
|
12317
12305
|
textStroke && (ctx.strokeStyle = textStroke);
|
12318
|
-
|
12306
|
+
|
12307
|
+
// TODO Invalid font
|
12308
|
+
ctx.font = font || '12px sans-serif';
|
12319
12309
|
|
12320
12310
|
// Text shadow
|
12321
12311
|
// Always set shadowBlur and shadowOffset to avoid leak from displayable
|
@@ -12325,6 +12315,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
12325
12315
|
ctx.shadowOffsetY = style.textShadowOffsetY;
|
12326
12316
|
|
12327
12317
|
var textLines = text.split('\n');
|
12318
|
+
|
12319
|
+
if (style.textRotation) {
|
12320
|
+
transform && ctx.translate(transform[4], transform[5]);
|
12321
|
+
ctx.rotate(style.textRotation);
|
12322
|
+
transform && ctx.translate(-transform[4], -transform[5]);
|
12323
|
+
}
|
12324
|
+
|
12328
12325
|
for (var i = 0; i < textLines.length; i++) {
|
12329
12326
|
textFill && ctx.fillText(textLines[i], x, y);
|
12330
12327
|
textStroke && ctx.strokeText(textLines[i], x, y);
|
@@ -12444,10 +12441,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
12444
12441
|
* @return {module:zrender/core/PathProxy}
|
12445
12442
|
*/
|
12446
12443
|
beginPath: function (ctx) {
|
12444
|
+
|
12447
12445
|
this._ctx = ctx;
|
12448
12446
|
|
12449
12447
|
ctx && ctx.beginPath();
|
12450
12448
|
|
12449
|
+
ctx && (this.dpr = ctx.dpr);
|
12450
|
+
|
12451
12451
|
// Reset
|
12452
12452
|
this._len = 0;
|
12453
12453
|
|
@@ -14744,7 +14744,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
14744
14744
|
|
14745
14745
|
// Must bind each time
|
14746
14746
|
style.bind(ctx, this, prevEl);
|
14747
|
-
|
14748
14747
|
// style.image is a url string
|
14749
14748
|
if (typeof src === 'string') {
|
14750
14749
|
image = this._image;
|
@@ -15117,7 +15116,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
15117
15116
|
textBaseline = style.textBaseline;
|
15118
15117
|
}
|
15119
15118
|
|
15120
|
-
|
15119
|
+
// TODO Invalid font
|
15120
|
+
ctx.font = font || '12px sans-serif';
|
15121
15121
|
ctx.textAlign = textAlign || 'left';
|
15122
15122
|
// Use canvas default left textAlign. Giving invalid value will cause state not change
|
15123
15123
|
if (ctx.textAlign !== textAlign) {
|
@@ -15217,7 +15217,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
15217
15217
|
* @module zrender/graphic/shape/Sector
|
15218
15218
|
*/
|
15219
15219
|
|
15220
|
-
// FIXME clockwise seems wrong
|
15221
15220
|
|
15222
15221
|
|
15223
15222
|
module.exports = __webpack_require__(45).extend({
|
@@ -16194,7 +16193,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16194
16193
|
/**
|
16195
16194
|
* @type {string}
|
16196
16195
|
*/
|
16197
|
-
zrender.version = '3.1.
|
16196
|
+
zrender.version = '3.1.3';
|
16198
16197
|
|
16199
16198
|
/**
|
16200
16199
|
* Initializing a zrender instance
|
@@ -17178,7 +17177,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
17178
17177
|
if (el instanceof Group) {
|
17179
17178
|
el.__storage = this;
|
17180
17179
|
}
|
17181
|
-
el.dirty();
|
17180
|
+
el.dirty(false);
|
17182
17181
|
|
17183
17182
|
this._elements[el.id] = el;
|
17184
17183
|
|
@@ -17962,7 +17961,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
17962
17961
|
|
17963
17962
|
this._running = false;
|
17964
17963
|
|
17965
|
-
this._time
|
17964
|
+
this._time;
|
17965
|
+
|
17966
|
+
this._pausedTime;
|
17967
|
+
|
17968
|
+
this._pauseStart;
|
17969
|
+
|
17970
|
+
this._paused = false;
|
17966
17971
|
|
17967
17972
|
Dispatcher.call(this);
|
17968
17973
|
};
|
@@ -18013,7 +18018,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18013
18018
|
|
18014
18019
|
_update: function() {
|
18015
18020
|
|
18016
|
-
var time = new Date().getTime();
|
18021
|
+
var time = new Date().getTime() - this._pausedTime;
|
18017
18022
|
var delta = time - this._time;
|
18018
18023
|
var clips = this._clips;
|
18019
18024
|
var len = clips.length;
|
@@ -18058,10 +18063,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18058
18063
|
this.stage.update();
|
18059
18064
|
}
|
18060
18065
|
},
|
18061
|
-
|
18062
|
-
|
18063
|
-
*/
|
18064
|
-
start: function () {
|
18066
|
+
|
18067
|
+
_startLoop: function () {
|
18065
18068
|
var self = this;
|
18066
18069
|
|
18067
18070
|
this._running = true;
|
@@ -18071,19 +18074,50 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18071
18074
|
|
18072
18075
|
requestAnimationFrame(step);
|
18073
18076
|
|
18074
|
-
self._update();
|
18077
|
+
!self._paused && self._update();
|
18075
18078
|
}
|
18076
18079
|
}
|
18077
18080
|
|
18078
|
-
this._time = new Date().getTime();
|
18079
18081
|
requestAnimationFrame(step);
|
18080
18082
|
},
|
18083
|
+
|
18084
|
+
/**
|
18085
|
+
* 开始运行动画
|
18086
|
+
*/
|
18087
|
+
start: function () {
|
18088
|
+
|
18089
|
+
this._time = new Date().getTime();
|
18090
|
+
this._pausedTime = 0;
|
18091
|
+
|
18092
|
+
this._startLoop();
|
18093
|
+
},
|
18081
18094
|
/**
|
18082
18095
|
* 停止运行动画
|
18083
18096
|
*/
|
18084
18097
|
stop: function () {
|
18085
18098
|
this._running = false;
|
18086
18099
|
},
|
18100
|
+
|
18101
|
+
/**
|
18102
|
+
* Pause
|
18103
|
+
*/
|
18104
|
+
pause: function () {
|
18105
|
+
if (!this._paused) {
|
18106
|
+
this._pauseStart = new Date().getTime();
|
18107
|
+
this._paused = true;
|
18108
|
+
}
|
18109
|
+
},
|
18110
|
+
|
18111
|
+
/**
|
18112
|
+
* Resume
|
18113
|
+
*/
|
18114
|
+
resume: function () {
|
18115
|
+
if (this._paused) {
|
18116
|
+
this._pausedTime += (new Date().getTime()) - this._pauseStart;
|
18117
|
+
this._paused = false;
|
18118
|
+
}
|
18119
|
+
},
|
18120
|
+
|
18087
18121
|
/**
|
18088
18122
|
* 清除所有动画片段
|
18089
18123
|
*/
|
@@ -18101,6 +18135,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18101
18135
|
* 如果指定setter函数,会通过setter函数设置属性值
|
18102
18136
|
* @return {module:zrender/animation/Animation~Animator}
|
18103
18137
|
*/
|
18138
|
+
// TODO Gap
|
18104
18139
|
animate: function (target, options) {
|
18105
18140
|
options = options || {};
|
18106
18141
|
var animator = new Animator(
|
@@ -18736,28 +18771,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18736
18771
|
function doClip(clipPaths, ctx) {
|
18737
18772
|
for (var i = 0; i < clipPaths.length; i++) {
|
18738
18773
|
var clipPath = clipPaths[i];
|
18739
|
-
var m;
|
18740
|
-
if (clipPath.transform) {
|
18741
|
-
m = clipPath.transform;
|
18742
|
-
ctx.transform(
|
18743
|
-
m[0], m[1],
|
18744
|
-
m[2], m[3],
|
18745
|
-
m[4], m[5]
|
18746
|
-
);
|
18747
|
-
}
|
18748
18774
|
var path = clipPath.path;
|
18775
|
+
|
18776
|
+
clipPath.setTransform(ctx);
|
18749
18777
|
path.beginPath(ctx);
|
18750
18778
|
clipPath.buildPath(path, clipPath.shape);
|
18751
18779
|
ctx.clip();
|
18752
18780
|
// Transform back
|
18753
|
-
|
18754
|
-
m = clipPath.invTransform;
|
18755
|
-
ctx.transform(
|
18756
|
-
m[0], m[1],
|
18757
|
-
m[2], m[3],
|
18758
|
-
m[4], m[5]
|
18759
|
-
);
|
18760
|
-
}
|
18781
|
+
clipPath.restoreTransform(ctx);
|
18761
18782
|
}
|
18762
18783
|
}
|
18763
18784
|
|
@@ -19076,15 +19097,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19076
19097
|
var layerProgress;
|
19077
19098
|
var frame = this._progress;
|
19078
19099
|
function flushProgressiveLayer(layer) {
|
19100
|
+
var dpr = ctx.dpr || 1;
|
19079
19101
|
ctx.save();
|
19080
19102
|
ctx.globalAlpha = 1;
|
19081
19103
|
ctx.shadowBlur = 0;
|
19082
19104
|
// Avoid layer don't clear in next progressive frame
|
19083
19105
|
currentLayer.__dirty = true;
|
19084
|
-
ctx.
|
19106
|
+
ctx.setTransform(1, 0, 0, 1, 0, 0);
|
19107
|
+
ctx.drawImage(layer.dom, 0, 0, width * dpr, height * dpr);
|
19085
19108
|
ctx.restore();
|
19086
|
-
|
19087
|
-
currentLayer.ctx.restore();
|
19088
19109
|
}
|
19089
19110
|
|
19090
19111
|
for (var i = 0, l = list.length; i < l; i++) {
|
@@ -19134,6 +19155,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19134
19155
|
if (!(currentLayer.__dirty || paintAll)) {
|
19135
19156
|
continue;
|
19136
19157
|
}
|
19158
|
+
|
19137
19159
|
if (elFrame >= 0) {
|
19138
19160
|
// Progressive layer changed
|
19139
19161
|
if (!currentProgressiveLayer) {
|
@@ -19197,7 +19219,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19197
19219
|
|
19198
19220
|
_doPaintEl: function (el, currentLayer, forcePaint, scope) {
|
19199
19221
|
var ctx = currentLayer.ctx;
|
19200
|
-
|
19222
|
+
var m = el.transform;
|
19201
19223
|
if (
|
19202
19224
|
(currentLayer.__dirty || forcePaint)
|
19203
19225
|
// Ignore invisible element
|
@@ -19206,7 +19228,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19206
19228
|
&& el.style.opacity !== 0
|
19207
19229
|
// Ignore scale 0 element, in some environment like node-canvas
|
19208
19230
|
// Draw a scale 0 element can cause all following draw wrong
|
19209
|
-
|
19231
|
+
// And setTransform with scale 0 will cause set back transform failed.
|
19232
|
+
&& !(m && !m[0] && !m[3])
|
19210
19233
|
// Ignore culled element
|
19211
19234
|
&& !(el.culling && isDisplayableCulled(el, this._width, this._height))
|
19212
19235
|
) {
|
@@ -19833,10 +19856,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19833
19856
|
initContext: function () {
|
19834
19857
|
this.ctx = this.dom.getContext('2d');
|
19835
19858
|
|
19836
|
-
|
19837
|
-
if (dpr != 1) {
|
19838
|
-
this.ctx.scale(dpr, dpr);
|
19839
|
-
}
|
19859
|
+
this.ctx.dpr = this.dpr;
|
19840
19860
|
},
|
19841
19861
|
|
19842
19862
|
createBackBuffer: function () {
|
@@ -19867,10 +19887,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19867
19887
|
dom.width = width * dpr;
|
19868
19888
|
dom.height = height * dpr;
|
19869
19889
|
|
19870
|
-
if (dpr != 1) {
|
19871
|
-
this.ctx.scale(dpr, dpr);
|
19872
|
-
}
|
19873
|
-
|
19874
19890
|
if (domBack) {
|
19875
19891
|
domBack.width = width * dpr;
|
19876
19892
|
domBack.height = height * dpr;
|
@@ -19910,7 +19926,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19910
19926
|
);
|
19911
19927
|
}
|
19912
19928
|
|
19913
|
-
ctx.clearRect(0, 0, width
|
19929
|
+
ctx.clearRect(0, 0, width, height);
|
19914
19930
|
if (clearColor) {
|
19915
19931
|
var clearColorGradientOrPattern;
|
19916
19932
|
// Gradient
|
@@ -19919,8 +19935,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19919
19935
|
clearColorGradientOrPattern = clearColor.__canvasGradient || Style.getGradient(ctx, clearColor, {
|
19920
19936
|
x: 0,
|
19921
19937
|
y: 0,
|
19922
|
-
width: width
|
19923
|
-
height: height
|
19938
|
+
width: width,
|
19939
|
+
height: height
|
19924
19940
|
});
|
19925
19941
|
|
19926
19942
|
clearColor.__canvasGradient = clearColorGradientOrPattern;
|
@@ -19931,7 +19947,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19931
19947
|
}
|
19932
19948
|
ctx.save();
|
19933
19949
|
ctx.fillStyle = clearColorGradientOrPattern || clearColor;
|
19934
|
-
ctx.fillRect(0, 0, width
|
19950
|
+
ctx.fillRect(0, 0, width, height);
|
19935
19951
|
ctx.restore();
|
19936
19952
|
}
|
19937
19953
|
|
@@ -19939,7 +19955,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19939
19955
|
var domBack = this.domBack;
|
19940
19956
|
ctx.save();
|
19941
19957
|
ctx.globalAlpha = lastFrameAlpha;
|
19942
|
-
ctx.drawImage(domBack, 0, 0, width
|
19958
|
+
ctx.drawImage(domBack, 0, 0, width, height);
|
19943
19959
|
ctx.restore();
|
19944
19960
|
}
|
19945
19961
|
}
|
@@ -19953,109 +19969,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19953
19969
|
/***/ function(module, exports, __webpack_require__) {
|
19954
19970
|
|
19955
19971
|
|
19956
|
-
|
19957
|
-
var graphic = __webpack_require__(43);
|
19958
|
-
var zrUtil = __webpack_require__(4);
|
19959
|
-
var PI = Math.PI;
|
19960
|
-
/**
|
19961
|
-
* @param {module:echarts/ExtensionAPI} api
|
19962
|
-
* @param {Object} [opts]
|
19963
|
-
* @param {string} [opts.text]
|
19964
|
-
* @param {string} [opts.color]
|
19965
|
-
* @param {string} [opts.textColor]
|
19966
|
-
* @return {module:zrender/Element}
|
19967
|
-
*/
|
19968
|
-
module.exports = function (api, opts) {
|
19969
|
-
opts = opts || {};
|
19970
|
-
zrUtil.defaults(opts, {
|
19971
|
-
text: 'loading',
|
19972
|
-
color: '#c23531',
|
19973
|
-
textColor: '#000',
|
19974
|
-
maskColor: 'rgba(255, 255, 255, 0.8)',
|
19975
|
-
zlevel: 0
|
19976
|
-
});
|
19977
|
-
var mask = new graphic.Rect({
|
19978
|
-
style: {
|
19979
|
-
fill: opts.maskColor
|
19980
|
-
},
|
19981
|
-
zlevel: opts.zlevel,
|
19982
|
-
z: 10000
|
19983
|
-
});
|
19984
|
-
var arc = new graphic.Arc({
|
19985
|
-
shape: {
|
19986
|
-
startAngle: -PI / 2,
|
19987
|
-
endAngle: -PI / 2 + 0.1,
|
19988
|
-
r: 10
|
19989
|
-
},
|
19990
|
-
style: {
|
19991
|
-
stroke: opts.color,
|
19992
|
-
lineCap: 'round',
|
19993
|
-
lineWidth: 5
|
19994
|
-
},
|
19995
|
-
zlevel: opts.zlevel,
|
19996
|
-
z: 10001
|
19997
|
-
});
|
19998
|
-
var labelRect = new graphic.Rect({
|
19999
|
-
style: {
|
20000
|
-
fill: 'none',
|
20001
|
-
text: opts.text,
|
20002
|
-
textPosition: 'right',
|
20003
|
-
textDistance: 10,
|
20004
|
-
textFill: opts.textColor
|
20005
|
-
},
|
20006
|
-
zlevel: opts.zlevel,
|
20007
|
-
z: 10001
|
20008
|
-
});
|
20009
|
-
|
20010
|
-
arc.animateShape(true)
|
20011
|
-
.when(1000, {
|
20012
|
-
endAngle: PI * 3 / 2
|
20013
|
-
})
|
20014
|
-
.start('circularInOut');
|
20015
|
-
arc.animateShape(true)
|
20016
|
-
.when(1000, {
|
20017
|
-
startAngle: PI * 3 / 2
|
20018
|
-
})
|
20019
|
-
.delay(300)
|
20020
|
-
.start('circularInOut');
|
20021
|
-
|
20022
|
-
var group = new graphic.Group();
|
20023
|
-
group.add(arc);
|
20024
|
-
group.add(labelRect);
|
20025
|
-
group.add(mask);
|
20026
|
-
// Inject resize
|
20027
|
-
group.resize = function () {
|
20028
|
-
var cx = api.getWidth() / 2;
|
20029
|
-
var cy = api.getHeight() / 2;
|
20030
|
-
arc.setShape({
|
20031
|
-
cx: cx,
|
20032
|
-
cy: cy
|
20033
|
-
});
|
20034
|
-
var r = arc.shape.r;
|
20035
|
-
labelRect.setShape({
|
20036
|
-
x: cx - r,
|
20037
|
-
y: cy - r,
|
20038
|
-
width: r * 2,
|
20039
|
-
height: r * 2
|
20040
|
-
});
|
20041
|
-
|
20042
|
-
mask.setShape({
|
20043
|
-
x: 0,
|
20044
|
-
y: 0,
|
20045
|
-
width: api.getWidth(),
|
20046
|
-
height: api.getHeight()
|
20047
|
-
});
|
20048
|
-
};
|
20049
|
-
group.resize();
|
20050
|
-
return group;
|
20051
|
-
};
|
20052
|
-
|
20053
|
-
|
20054
|
-
/***/ },
|
20055
|
-
/* 94 */
|
20056
|
-
/***/ function(module, exports, __webpack_require__) {
|
20057
|
-
|
20058
|
-
|
20059
19972
|
var Gradient = __webpack_require__(61);
|
20060
19973
|
module.exports = function (ecModel) {
|
20061
19974
|
function encodeColor(seriesModel) {
|
@@ -20092,14 +20005,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
20092
20005
|
|
20093
20006
|
|
20094
20007
|
/***/ },
|
20095
|
-
/*
|
20008
|
+
/* 94 */
|
20096
20009
|
/***/ function(module, exports, __webpack_require__) {
|
20097
20010
|
|
20098
20011
|
// Compatitable with 2.0
|
20099
20012
|
|
20100
20013
|
|
20101
20014
|
var zrUtil = __webpack_require__(4);
|
20102
|
-
var compatStyle = __webpack_require__(
|
20015
|
+
var compatStyle = __webpack_require__(95);
|
20103
20016
|
|
20104
20017
|
function get(opt, path) {
|
20105
20018
|
path = path.split(',');
|
@@ -20202,7 +20115,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
20202
20115
|
|
20203
20116
|
|
20204
20117
|
/***/ },
|
20205
|
-
/*
|
20118
|
+
/* 95 */
|
20206
20119
|
/***/ function(module, exports, __webpack_require__) {
|
20207
20120
|
|
20208
20121
|
|
@@ -20282,6 +20195,109 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
20282
20195
|
};
|
20283
20196
|
|
20284
20197
|
|
20198
|
+
/***/ },
|
20199
|
+
/* 96 */
|
20200
|
+
/***/ function(module, exports, __webpack_require__) {
|
20201
|
+
|
20202
|
+
|
20203
|
+
|
20204
|
+
var graphic = __webpack_require__(43);
|
20205
|
+
var zrUtil = __webpack_require__(4);
|
20206
|
+
var PI = Math.PI;
|
20207
|
+
/**
|
20208
|
+
* @param {module:echarts/ExtensionAPI} api
|
20209
|
+
* @param {Object} [opts]
|
20210
|
+
* @param {string} [opts.text]
|
20211
|
+
* @param {string} [opts.color]
|
20212
|
+
* @param {string} [opts.textColor]
|
20213
|
+
* @return {module:zrender/Element}
|
20214
|
+
*/
|
20215
|
+
module.exports = function (api, opts) {
|
20216
|
+
opts = opts || {};
|
20217
|
+
zrUtil.defaults(opts, {
|
20218
|
+
text: 'loading',
|
20219
|
+
color: '#c23531',
|
20220
|
+
textColor: '#000',
|
20221
|
+
maskColor: 'rgba(255, 255, 255, 0.8)',
|
20222
|
+
zlevel: 0
|
20223
|
+
});
|
20224
|
+
var mask = new graphic.Rect({
|
20225
|
+
style: {
|
20226
|
+
fill: opts.maskColor
|
20227
|
+
},
|
20228
|
+
zlevel: opts.zlevel,
|
20229
|
+
z: 10000
|
20230
|
+
});
|
20231
|
+
var arc = new graphic.Arc({
|
20232
|
+
shape: {
|
20233
|
+
startAngle: -PI / 2,
|
20234
|
+
endAngle: -PI / 2 + 0.1,
|
20235
|
+
r: 10
|
20236
|
+
},
|
20237
|
+
style: {
|
20238
|
+
stroke: opts.color,
|
20239
|
+
lineCap: 'round',
|
20240
|
+
lineWidth: 5
|
20241
|
+
},
|
20242
|
+
zlevel: opts.zlevel,
|
20243
|
+
z: 10001
|
20244
|
+
});
|
20245
|
+
var labelRect = new graphic.Rect({
|
20246
|
+
style: {
|
20247
|
+
fill: 'none',
|
20248
|
+
text: opts.text,
|
20249
|
+
textPosition: 'right',
|
20250
|
+
textDistance: 10,
|
20251
|
+
textFill: opts.textColor
|
20252
|
+
},
|
20253
|
+
zlevel: opts.zlevel,
|
20254
|
+
z: 10001
|
20255
|
+
});
|
20256
|
+
|
20257
|
+
arc.animateShape(true)
|
20258
|
+
.when(1000, {
|
20259
|
+
endAngle: PI * 3 / 2
|
20260
|
+
})
|
20261
|
+
.start('circularInOut');
|
20262
|
+
arc.animateShape(true)
|
20263
|
+
.when(1000, {
|
20264
|
+
startAngle: PI * 3 / 2
|
20265
|
+
})
|
20266
|
+
.delay(300)
|
20267
|
+
.start('circularInOut');
|
20268
|
+
|
20269
|
+
var group = new graphic.Group();
|
20270
|
+
group.add(arc);
|
20271
|
+
group.add(labelRect);
|
20272
|
+
group.add(mask);
|
20273
|
+
// Inject resize
|
20274
|
+
group.resize = function () {
|
20275
|
+
var cx = api.getWidth() / 2;
|
20276
|
+
var cy = api.getHeight() / 2;
|
20277
|
+
arc.setShape({
|
20278
|
+
cx: cx,
|
20279
|
+
cy: cy
|
20280
|
+
});
|
20281
|
+
var r = arc.shape.r;
|
20282
|
+
labelRect.setShape({
|
20283
|
+
x: cx - r,
|
20284
|
+
y: cy - r,
|
20285
|
+
width: r * 2,
|
20286
|
+
height: r * 2
|
20287
|
+
});
|
20288
|
+
|
20289
|
+
mask.setShape({
|
20290
|
+
x: 0,
|
20291
|
+
y: 0,
|
20292
|
+
width: api.getWidth(),
|
20293
|
+
height: api.getHeight()
|
20294
|
+
});
|
20295
|
+
};
|
20296
|
+
group.resize();
|
20297
|
+
return group;
|
20298
|
+
};
|
20299
|
+
|
20300
|
+
|
20285
20301
|
/***/ },
|
20286
20302
|
/* 97 */
|
20287
20303
|
/***/ function(module, exports, __webpack_require__) {
|
@@ -21605,10 +21621,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
21605
21621
|
|
21606
21622
|
hoverAnimation: true,
|
21607
21623
|
// stack: null
|
21608
|
-
xAxisIndex: 0,
|
21609
|
-
yAxisIndex: 0,
|
21624
|
+
// xAxisIndex: 0,
|
21625
|
+
// yAxisIndex: 0,
|
21610
21626
|
|
21611
|
-
polarIndex: 0,
|
21627
|
+
// polarIndex: 0,
|
21612
21628
|
|
21613
21629
|
// If clip the overflow value
|
21614
21630
|
clipOverflow: true,
|
@@ -21782,15 +21798,31 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
21782
21798
|
var creators = {
|
21783
21799
|
|
21784
21800
|
cartesian2d: function (data, seriesModel, ecModel) {
|
21785
|
-
|
21786
|
-
var
|
21801
|
+
|
21802
|
+
var axesModels = zrUtil.map(['xAxis', 'yAxis'], function (name) {
|
21803
|
+
return ecModel.queryComponents({
|
21804
|
+
mainType: name,
|
21805
|
+
index: seriesModel.get(name + 'Index'),
|
21806
|
+
id: seriesModel.get(name + 'Id')
|
21807
|
+
})[0];
|
21808
|
+
});
|
21809
|
+
var xAxisModel = axesModels[0];
|
21810
|
+
var yAxisModel = axesModels[1];
|
21787
21811
|
|
21788
21812
|
if (true) {
|
21789
21813
|
if (!xAxisModel) {
|
21790
|
-
throw new Error('xAxis "' +
|
21814
|
+
throw new Error('xAxis "' + zrUtil.retrieve(
|
21815
|
+
seriesModel.get('xAxisIndex'),
|
21816
|
+
seriesModel.get('xAxisId'),
|
21817
|
+
0
|
21818
|
+
) + '" not found');
|
21791
21819
|
}
|
21792
21820
|
if (!yAxisModel) {
|
21793
|
-
throw new Error('yAxis "' +
|
21821
|
+
throw new Error('yAxis "' + zrUtil.retrieve(
|
21822
|
+
seriesModel.get('xAxisIndex'),
|
21823
|
+
seriesModel.get('yAxisId'),
|
21824
|
+
0
|
21825
|
+
) + '" not found');
|
21794
21826
|
}
|
21795
21827
|
}
|
21796
21828
|
|
@@ -21831,19 +21863,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
21831
21863
|
},
|
21832
21864
|
|
21833
21865
|
polar: function (data, seriesModel, ecModel) {
|
21834
|
-
var
|
21835
|
-
|
21836
|
-
|
21837
|
-
|
21838
|
-
};
|
21839
|
-
|
21840
|
-
var angleAxisModel = ecModel.findComponents({
|
21841
|
-
mainType: 'angleAxis', filter: axisFinder
|
21842
|
-
})[0];
|
21843
|
-
var radiusAxisModel = ecModel.findComponents({
|
21844
|
-
mainType: 'radiusAxis', filter: axisFinder
|
21866
|
+
var polarModel = ecModel.queryComponents({
|
21867
|
+
mainType: 'polar',
|
21868
|
+
index: seriesModel.get('polarIndex'),
|
21869
|
+
id: seriesModel.get('polarId')
|
21845
21870
|
})[0];
|
21846
21871
|
|
21872
|
+
var angleAxisModel = polarModel.findAxisModel('angleAxis');
|
21873
|
+
var radiusAxisModel = polarModel.findAxisModel('radiusAxis');
|
21874
|
+
|
21847
21875
|
if (true) {
|
21848
21876
|
if (!angleAxisModel) {
|
21849
21877
|
throw new Error('angleAxis option not found');
|
@@ -22435,6 +22463,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22435
22463
|
);
|
22436
22464
|
}
|
22437
22465
|
else {
|
22466
|
+
// Not do it in update with animation
|
22467
|
+
if (step) {
|
22468
|
+
// TODO If stacked series is not step
|
22469
|
+
points = turnPointsIntoStep(points, coordSys, step);
|
22470
|
+
stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step);
|
22471
|
+
}
|
22472
|
+
|
22438
22473
|
polyline.setShape({
|
22439
22474
|
points: points
|
22440
22475
|
});
|
@@ -22745,6 +22780,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22745
22780
|
|
22746
22781
|
function symbolNeedsDraw(data, idx, isIgnore) {
|
22747
22782
|
var point = data.getItemLayout(idx);
|
22783
|
+
// Is an object
|
22784
|
+
// if (point && point.hasOwnProperty('point')) {
|
22785
|
+
// point = point.point;
|
22786
|
+
// }
|
22748
22787
|
return point && !isNaN(point[0]) && !isNaN(point[1]) && !(isIgnore && isIgnore(idx))
|
22749
22788
|
&& data.getItemVisual(idx, 'symbol') !== 'none';
|
22750
22789
|
}
|
@@ -22924,6 +22963,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22924
22963
|
this.childAt(0).stopAnimation(toLastFrame);
|
22925
22964
|
};
|
22926
22965
|
|
22966
|
+
/**
|
22967
|
+
* Get symbol path element
|
22968
|
+
*/
|
22969
|
+
symbolProto.getSymbolPath = function () {
|
22970
|
+
return this.childAt(0);
|
22971
|
+
};
|
22972
|
+
|
22927
22973
|
/**
|
22928
22974
|
* Get scale(aka, current symbol size).
|
22929
22975
|
* Including the change caused by animation
|
@@ -23094,7 +23140,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
23094
23140
|
.off('emphasis')
|
23095
23141
|
.off('normal');
|
23096
23142
|
|
23097
|
-
|
23143
|
+
symbolPath.hoverStyle = hoverItemStyle;
|
23144
|
+
|
23145
|
+
graphic.setHoverStyle(symbolPath);
|
23098
23146
|
|
23099
23147
|
if (hoverAnimation && seriesModel.ifEnableAnimation()) {
|
23100
23148
|
var onEmphasis = function() {
|
@@ -24135,13 +24183,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24135
24183
|
|
24136
24184
|
var graphic = __webpack_require__(43);
|
24137
24185
|
var zrUtil = __webpack_require__(4);
|
24186
|
+
var echarts = __webpack_require__(1);
|
24138
24187
|
|
24139
24188
|
__webpack_require__(113);
|
24140
24189
|
|
24141
24190
|
__webpack_require__(130);
|
24142
24191
|
|
24143
24192
|
// Grid view
|
24144
|
-
|
24193
|
+
echarts.extendComponentView({
|
24145
24194
|
|
24146
24195
|
type: 'grid',
|
24147
24196
|
|
@@ -24159,6 +24208,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24159
24208
|
}
|
24160
24209
|
});
|
24161
24210
|
|
24211
|
+
echarts.registerPreprocessor(function (option) {
|
24212
|
+
// Only create grid when need
|
24213
|
+
if (option.xAxis && option.yAxis && !option.grid) {
|
24214
|
+
option.grid = {};
|
24215
|
+
}
|
24216
|
+
});
|
24217
|
+
|
24162
24218
|
|
24163
24219
|
/***/ },
|
24164
24220
|
/* 113 */
|
@@ -24191,7 +24247,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24191
24247
|
* @inner
|
24192
24248
|
*/
|
24193
24249
|
function isAxisUsedInTheGrid(axisModel, gridModel, ecModel) {
|
24194
|
-
return
|
24250
|
+
return axisModel.findGridModel() === gridModel;
|
24195
24251
|
}
|
24196
24252
|
|
24197
24253
|
function getLabelUnionRect(axis) {
|
@@ -24504,12 +24560,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24504
24560
|
axis.scale.setExtent(Infinity, -Infinity);
|
24505
24561
|
});
|
24506
24562
|
ecModel.eachSeries(function (seriesModel) {
|
24507
|
-
if (seriesModel
|
24508
|
-
var
|
24509
|
-
var
|
24510
|
-
|
24511
|
-
var xAxisModel = ecModel.getComponent('xAxis', xAxisIndex);
|
24512
|
-
var yAxisModel = ecModel.getComponent('yAxis', yAxisIndex);
|
24563
|
+
if (isCartesian2D(seriesModel)) {
|
24564
|
+
var axesModels = findAxesModels(seriesModel, ecModel);
|
24565
|
+
var xAxisModel = axesModels[0];
|
24566
|
+
var yAxisModel = axesModels[1];
|
24513
24567
|
|
24514
24568
|
if (!isAxisUsedInTheGrid(xAxisModel, gridModel, ecModel)
|
24515
24569
|
|| !isAxisUsedInTheGrid(yAxisModel, gridModel, ecModel)
|
@@ -24517,7 +24571,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24517
24571
|
return;
|
24518
24572
|
}
|
24519
24573
|
|
24520
|
-
var cartesian = this.getCartesian(
|
24574
|
+
var cartesian = this.getCartesian(
|
24575
|
+
xAxisModel.componentIndex, yAxisModel.componentIndex
|
24576
|
+
);
|
24521
24577
|
var data = seriesModel.getData();
|
24522
24578
|
var xAxis = cartesian.getAxis('x');
|
24523
24579
|
var yAxis = cartesian.getAxis('y');
|
@@ -24562,6 +24618,38 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24562
24618
|
};
|
24563
24619
|
}
|
24564
24620
|
|
24621
|
+
var axesTypes = ['xAxis', 'yAxis'];
|
24622
|
+
/**
|
24623
|
+
* @inner
|
24624
|
+
*/
|
24625
|
+
function findAxesModels(seriesModel, ecModel) {
|
24626
|
+
return zrUtil.map(axesTypes, function (axisType) {
|
24627
|
+
var axisModel = ecModel.queryComponents({
|
24628
|
+
mainType: axisType,
|
24629
|
+
index: seriesModel.get(axisType + 'Index'),
|
24630
|
+
id: seriesModel.get(axisType + 'Id')
|
24631
|
+
})[0];
|
24632
|
+
|
24633
|
+
if (true) {
|
24634
|
+
if (!axisModel) {
|
24635
|
+
throw new Error(axisType + ' "' + zrUtil.retrieve(
|
24636
|
+
seriesModel.get(axisType + 'Index'),
|
24637
|
+
seriesModel.get(axisType + 'Id'),
|
24638
|
+
0
|
24639
|
+
) + '" not found');
|
24640
|
+
}
|
24641
|
+
}
|
24642
|
+
return axisModel;
|
24643
|
+
});
|
24644
|
+
}
|
24645
|
+
|
24646
|
+
/**
|
24647
|
+
* @inner
|
24648
|
+
*/
|
24649
|
+
function isCartesian2D(seriesModel) {
|
24650
|
+
return seriesModel.get('coordinateSystem') === 'cartesian2d';
|
24651
|
+
}
|
24652
|
+
|
24565
24653
|
Grid.create = function (ecModel, api) {
|
24566
24654
|
var grids = [];
|
24567
24655
|
ecModel.eachComponent('grid', function (gridModel, idx) {
|
@@ -24576,21 +24664,36 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24576
24664
|
|
24577
24665
|
// Inject the coordinateSystems into seriesModel
|
24578
24666
|
ecModel.eachSeries(function (seriesModel) {
|
24579
|
-
if (seriesModel
|
24667
|
+
if (!isCartesian2D(seriesModel)) {
|
24580
24668
|
return;
|
24581
24669
|
}
|
24582
|
-
|
24583
|
-
var
|
24584
|
-
var xAxisModel =
|
24670
|
+
|
24671
|
+
var axesModels = findAxesModels(seriesModel, ecModel);
|
24672
|
+
var xAxisModel = axesModels[0];
|
24673
|
+
var yAxisModel = axesModels[1];
|
24674
|
+
|
24675
|
+
var gridModel = xAxisModel.findGridModel();
|
24585
24676
|
|
24586
24677
|
if (true) {
|
24587
|
-
|
24588
|
-
|
24678
|
+
if (!gridModel) {
|
24679
|
+
throw new Error(
|
24680
|
+
'Grid "' + zrUtil.retrieve(
|
24681
|
+
xAxisModel.get('gridIndex'),
|
24682
|
+
xAxisModel.get('gridId'),
|
24683
|
+
0
|
24684
|
+
) + '" not found'
|
24685
|
+
);
|
24686
|
+
}
|
24687
|
+
if (xAxisModel.findGridModel() !== yAxisModel.findGridModel()) {
|
24589
24688
|
throw new Error('xAxis and yAxis must use the same grid');
|
24590
24689
|
}
|
24591
24690
|
}
|
24592
|
-
|
24593
|
-
|
24691
|
+
|
24692
|
+
var grid = gridModel.coordinateSystem;
|
24693
|
+
|
24694
|
+
seriesModel.coordinateSystem = grid.getCartesian(
|
24695
|
+
xAxisModel.componentIndex, yAxisModel.componentIndex
|
24696
|
+
);
|
24594
24697
|
});
|
24595
24698
|
|
24596
24699
|
return grids;
|
@@ -24684,6 +24787,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24684
24787
|
var fixMin = (model.getMin ? model.getMin() : model.get('min')) != null;
|
24685
24788
|
var fixMax = (model.getMax ? model.getMax() : model.get('max')) != null;
|
24686
24789
|
var splitNumber = model.get('splitNumber');
|
24790
|
+
|
24791
|
+
if (scale.type === 'log') {
|
24792
|
+
scale.base = model.get('logBase');
|
24793
|
+
}
|
24794
|
+
|
24687
24795
|
scale.setExtent(extent[0], extent[1]);
|
24688
24796
|
scale.niceExtent(splitNumber, fixMin, fixMax);
|
24689
24797
|
|
@@ -25078,6 +25186,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25078
25186
|
|
25079
25187
|
var mathFloor = Math.floor;
|
25080
25188
|
var mathCeil = Math.ceil;
|
25189
|
+
|
25190
|
+
var getPrecisionSafe = numberUtil.getPrecisionSafe;
|
25191
|
+
var roundingErrorFix = numberUtil.round;
|
25081
25192
|
/**
|
25082
25193
|
* @alias module:echarts/coord/scale/Interval
|
25083
25194
|
* @constructor
|
@@ -25143,6 +25254,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25143
25254
|
|
25144
25255
|
if (interval) {
|
25145
25256
|
var niceExtent = this._niceExtent;
|
25257
|
+
var precision = getPrecisionSafe(interval) + 2;
|
25258
|
+
|
25146
25259
|
if (extent[0] < niceExtent[0]) {
|
25147
25260
|
ticks.push(extent[0]);
|
25148
25261
|
}
|
@@ -25150,7 +25263,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25150
25263
|
while (tick <= niceExtent[1]) {
|
25151
25264
|
ticks.push(tick);
|
25152
25265
|
// Avoid rounding error
|
25153
|
-
tick =
|
25266
|
+
tick = roundingErrorFix(tick + interval, precision);
|
25154
25267
|
if (ticks.length > safeLimit) {
|
25155
25268
|
return [];
|
25156
25269
|
}
|
@@ -25204,12 +25317,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25204
25317
|
|
25205
25318
|
// From "Nice Numbers for Graph Labels" of Graphic Gems
|
25206
25319
|
// var niceSpan = numberUtil.nice(span, false);
|
25207
|
-
var step =
|
25320
|
+
var step = roundingErrorFix(
|
25321
|
+
numberUtil.nice(span / splitNumber, true),
|
25322
|
+
Math.max(
|
25323
|
+
getPrecisionSafe(extent[0]),
|
25324
|
+
getPrecisionSafe(extent[1])
|
25325
|
+
// extent may be [0, 1], and step should have 1 more digits.
|
25326
|
+
// To make it safe we add 2 more digits
|
25327
|
+
) + 2
|
25328
|
+
);
|
25208
25329
|
|
25330
|
+
var precision = getPrecisionSafe(step) + 2;
|
25209
25331
|
// Niced extent inside original extent
|
25210
25332
|
var niceExtent = [
|
25211
|
-
|
25212
|
-
|
25333
|
+
roundingErrorFix(mathCeil(extent[0] / step) * step, precision),
|
25334
|
+
roundingErrorFix(mathFloor(extent[1] / step) * step, precision)
|
25213
25335
|
];
|
25214
25336
|
|
25215
25337
|
this._interval = step;
|
@@ -25259,10 +25381,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25259
25381
|
var interval = this._interval;
|
25260
25382
|
|
25261
25383
|
if (!fixMin) {
|
25262
|
-
extent[0] =
|
25384
|
+
extent[0] = roundingErrorFix(mathFloor(extent[0] / interval) * interval);
|
25263
25385
|
}
|
25264
25386
|
if (!fixMax) {
|
25265
|
-
extent[1] =
|
25387
|
+
extent[1] = roundingErrorFix(mathCeil(extent[1] / interval) * interval);
|
25266
25388
|
}
|
25267
25389
|
}
|
25268
25390
|
});
|
@@ -25468,20 +25590,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25468
25590
|
var mathCeil = Math.ceil;
|
25469
25591
|
var mathPow = Math.pow;
|
25470
25592
|
|
25471
|
-
var LOG_BASE = 10;
|
25472
25593
|
var mathLog = Math.log;
|
25473
25594
|
|
25474
25595
|
var LogScale = Scale.extend({
|
25475
25596
|
|
25476
25597
|
type: 'log',
|
25477
25598
|
|
25599
|
+
base: 10,
|
25600
|
+
|
25478
25601
|
/**
|
25479
25602
|
* @return {Array.<number>}
|
25480
25603
|
*/
|
25481
25604
|
getTicks: function () {
|
25482
25605
|
return zrUtil.map(intervalScaleProto.getTicks.call(this), function (val) {
|
25483
|
-
return numberUtil.round(mathPow(
|
25484
|
-
});
|
25606
|
+
return numberUtil.round(mathPow(this.base, val));
|
25607
|
+
}, this);
|
25485
25608
|
},
|
25486
25609
|
|
25487
25610
|
/**
|
@@ -25496,7 +25619,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25496
25619
|
*/
|
25497
25620
|
scale: function (val) {
|
25498
25621
|
val = scaleProto.scale.call(this, val);
|
25499
|
-
return mathPow(
|
25622
|
+
return mathPow(this.base, val);
|
25500
25623
|
},
|
25501
25624
|
|
25502
25625
|
/**
|
@@ -25504,8 +25627,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25504
25627
|
* @param {number} end
|
25505
25628
|
*/
|
25506
25629
|
setExtent: function (start, end) {
|
25507
|
-
|
25508
|
-
|
25630
|
+
var base = this.base;
|
25631
|
+
start = mathLog(start) / mathLog(base);
|
25632
|
+
end = mathLog(end) / mathLog(base);
|
25509
25633
|
intervalScaleProto.setExtent.call(this, start, end);
|
25510
25634
|
},
|
25511
25635
|
|
@@ -25513,9 +25637,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25513
25637
|
* @return {number} end
|
25514
25638
|
*/
|
25515
25639
|
getExtent: function () {
|
25640
|
+
var base = this.base;
|
25516
25641
|
var extent = scaleProto.getExtent.call(this);
|
25517
|
-
extent[0] = mathPow(
|
25518
|
-
extent[1] = mathPow(
|
25642
|
+
extent[0] = mathPow(base, extent[0]);
|
25643
|
+
extent[1] = mathPow(base, extent[1]);
|
25519
25644
|
return extent;
|
25520
25645
|
},
|
25521
25646
|
|
@@ -25523,8 +25648,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25523
25648
|
* @param {Array.<number>} extent
|
25524
25649
|
*/
|
25525
25650
|
unionExtent: function (extent) {
|
25526
|
-
|
25527
|
-
extent[
|
25651
|
+
var base = this.base;
|
25652
|
+
extent[0] = mathLog(extent[0]) / mathLog(base);
|
25653
|
+
extent[1] = mathLog(extent[1]) / mathLog(base);
|
25528
25654
|
scaleProto.unionExtent.call(this, extent);
|
25529
25655
|
},
|
25530
25656
|
|
@@ -25540,13 +25666,19 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25540
25666
|
return;
|
25541
25667
|
}
|
25542
25668
|
|
25543
|
-
var interval =
|
25669
|
+
var interval = numberUtil.quantity(span);
|
25544
25670
|
var err = approxTickNum / span * interval;
|
25545
25671
|
|
25546
25672
|
// Filter ticks to get closer to the desired count.
|
25547
25673
|
if (err <= 0.5) {
|
25548
25674
|
interval *= 10;
|
25549
25675
|
}
|
25676
|
+
|
25677
|
+
// Interval should be integer
|
25678
|
+
while (!isNaN(interval) && Math.abs(interval) < 1 && Math.abs(interval) > 0) {
|
25679
|
+
interval *= 10;
|
25680
|
+
}
|
25681
|
+
|
25550
25682
|
var niceExtent = [
|
25551
25683
|
numberUtil.round(mathCeil(extent[0] / interval) * interval),
|
25552
25684
|
numberUtil.round(mathFloor(extent[1] / interval) * interval)
|
@@ -25567,7 +25699,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25567
25699
|
|
25568
25700
|
zrUtil.each(['contain', 'normalize'], function (methodName) {
|
25569
25701
|
LogScale.prototype[methodName] = function (val) {
|
25570
|
-
val = mathLog(val) / mathLog(
|
25702
|
+
val = mathLog(val) / mathLog(this.base);
|
25571
25703
|
return scaleProto[methodName].call(this, val);
|
25572
25704
|
};
|
25573
25705
|
});
|
@@ -26317,6 +26449,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26317
26449
|
? false : !option.scale;
|
26318
26450
|
},
|
26319
26451
|
|
26452
|
+
/**
|
26453
|
+
* @return {module:echarts/model/Model}
|
26454
|
+
*/
|
26455
|
+
findGridModel: function () {
|
26456
|
+
return this.ecModel.queryComponents({
|
26457
|
+
mainType: 'grid',
|
26458
|
+
index: this.get('gridIndex'),
|
26459
|
+
id: this.get('gridId')
|
26460
|
+
})[0];
|
26461
|
+
},
|
26462
|
+
|
26320
26463
|
/**
|
26321
26464
|
* @private
|
26322
26465
|
*/
|
@@ -26335,7 +26478,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26335
26478
|
zrUtil.merge(AxisModel.prototype, __webpack_require__(129));
|
26336
26479
|
|
26337
26480
|
var extraOption = {
|
26338
|
-
gridIndex: 0,
|
26481
|
+
// gridIndex: 0,
|
26482
|
+
// gridId: '',
|
26339
26483
|
|
26340
26484
|
// Offset is for multiple axis on the same position
|
26341
26485
|
offset: 0
|
@@ -26555,7 +26699,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26555
26699
|
min: 'dataMin',
|
26556
26700
|
max: 'dataMax'
|
26557
26701
|
}, valueAxis);
|
26558
|
-
var logAxis = zrUtil.defaults({
|
26702
|
+
var logAxis = zrUtil.defaults({
|
26703
|
+
logBase: 10
|
26704
|
+
}, valueAxis);
|
26559
26705
|
logAxis.scale = true;
|
26560
26706
|
|
26561
26707
|
module.exports = {
|
@@ -26667,7 +26813,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26667
26813
|
return;
|
26668
26814
|
}
|
26669
26815
|
|
26670
|
-
var gridModel =
|
26816
|
+
var gridModel = axisModel.findGridModel();
|
26671
26817
|
|
26672
26818
|
var layout = layoutAxis(gridModel, axisModel);
|
26673
26819
|
|
@@ -27589,8 +27735,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27589
27735
|
// stack: null
|
27590
27736
|
|
27591
27737
|
// Cartesian coordinate system
|
27592
|
-
xAxisIndex: 0,
|
27593
|
-
yAxisIndex: 0,
|
27738
|
+
// xAxisIndex: 0,
|
27739
|
+
// yAxisIndex: 0,
|
27594
27740
|
|
27595
27741
|
// 最小高度改为0
|
27596
27742
|
barMinHeight: 0,
|
@@ -28783,15 +28929,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28783
28929
|
// FIXME Performance
|
28784
28930
|
var itemModel = dataAll.getItemModel(rawIdx);
|
28785
28931
|
var filteredIdx = idxMap[rawIdx];
|
28932
|
+
|
28786
28933
|
// If series.itemStyle.normal.color is a function. itemVisual may be encoded
|
28787
|
-
var singleDataColor =
|
28934
|
+
var singleDataColor = filteredIdx != null
|
28935
|
+
&& data.getItemVisual(filteredIdx, 'color', true);
|
28788
28936
|
|
28789
28937
|
if (!singleDataColor) {
|
28790
28938
|
var color = itemModel.get('itemStyle.normal.color')
|
28791
28939
|
|| seriesModel.getColorFromPalette(dataAll.getName(rawIdx), paletteScope);
|
28792
28940
|
// Legend may use the visual info in data before processed
|
28793
28941
|
dataAll.setItemVisual(rawIdx, 'color', color);
|
28794
|
-
|
28942
|
+
|
28943
|
+
// Data is not filtered
|
28944
|
+
if (filteredIdx != null) {
|
28945
|
+
data.setItemVisual(filteredIdx, 'color', color);
|
28946
|
+
}
|
28795
28947
|
}
|
28796
28948
|
else {
|
28797
28949
|
// Set data all color for legend
|
@@ -29244,14 +29396,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
29244
29396
|
|
29245
29397
|
hoverAnimation: true,
|
29246
29398
|
// Cartesian coordinate system
|
29247
|
-
xAxisIndex: 0,
|
29248
|
-
yAxisIndex: 0,
|
29399
|
+
// xAxisIndex: 0,
|
29400
|
+
// yAxisIndex: 0,
|
29249
29401
|
|
29250
29402
|
// Polar coordinate system
|
29251
|
-
polarIndex: 0,
|
29403
|
+
// polarIndex: 0,
|
29252
29404
|
|
29253
29405
|
// Geo coordinate system
|
29254
|
-
geoIndex: 0,
|
29406
|
+
// geoIndex: 0,
|
29255
29407
|
|
29256
29408
|
// symbol: null, // 图形类型
|
29257
29409
|
symbolSize: 10, // 图形大小,半宽(半径)参数,当图形为方向或菱形则总宽度为symbolSize * 2
|
@@ -29965,6 +30117,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
29965
30117
|
targetShape.cpx1 = cp1[0];
|
29966
30118
|
targetShape.cpy1 = cp1[1];
|
29967
30119
|
}
|
30120
|
+
else {
|
30121
|
+
targetShape.cpx1 = NaN;
|
30122
|
+
targetShape.cpy1 = NaN;
|
30123
|
+
}
|
29968
30124
|
}
|
29969
30125
|
|
29970
30126
|
function updateSymbolAndLabelBeforeLineUpdate () {
|
@@ -30163,6 +30319,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
30163
30319
|
}
|
30164
30320
|
|
30165
30321
|
var visualColor = lineData.getItemVisual(idx, 'color');
|
30322
|
+
var visualOpacity = zrUtil.retrieve(
|
30323
|
+
lineData.getItemVisual(idx, 'opacity'),
|
30324
|
+
lineStyle.opacity,
|
30325
|
+
1
|
30326
|
+
);
|
30166
30327
|
if (isNaN(defaultText)) {
|
30167
30328
|
// Use name
|
30168
30329
|
defaultText = lineData.getName(idx);
|
@@ -30171,12 +30332,24 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
30171
30332
|
{
|
30172
30333
|
strokeNoScale: true,
|
30173
30334
|
fill: 'none',
|
30174
|
-
stroke: visualColor
|
30335
|
+
stroke: visualColor,
|
30336
|
+
opacity: visualOpacity
|
30175
30337
|
},
|
30176
30338
|
lineStyle
|
30177
30339
|
));
|
30178
30340
|
line.hoverStyle = hoverLineStyle;
|
30179
30341
|
|
30342
|
+
// Update symbol
|
30343
|
+
zrUtil.each(SYMBOL_CATEGORIES, function (symbolCategory) {
|
30344
|
+
var symbol = this.childOfName(symbolCategory);
|
30345
|
+
if (symbol) {
|
30346
|
+
symbol.setColor(visualColor);
|
30347
|
+
symbol.setStyle({
|
30348
|
+
opacity: visualOpacity
|
30349
|
+
});
|
30350
|
+
}
|
30351
|
+
}, this);
|
30352
|
+
|
30180
30353
|
var showLabel = labelModel.getShallow('show');
|
30181
30354
|
var hoverShowLabel = hoverLabelModel.getShallow('show');
|
30182
30355
|
var defaultText;
|
@@ -30258,7 +30431,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
30258
30431
|
var bezierCurveProto = graphic.BezierCurve.prototype;
|
30259
30432
|
|
30260
30433
|
function isLine(shape) {
|
30261
|
-
return shape.cpx1
|
30434
|
+
return isNaN(+shape.cpx1) || isNaN(+shape.cpy1);
|
30262
30435
|
}
|
30263
30436
|
|
30264
30437
|
module.exports = graphic.extendShape({
|
@@ -34289,16 +34462,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
34289
34462
|
__webpack_require__(317);
|
34290
34463
|
|
34291
34464
|
__webpack_require__(318);
|
34292
|
-
__webpack_require__(320);
|
34293
|
-
|
34294
34465
|
__webpack_require__(321);
|
34466
|
+
|
34295
34467
|
__webpack_require__(322);
|
34468
|
+
__webpack_require__(323);
|
34296
34469
|
|
34297
|
-
__webpack_require__(324);
|
34298
34470
|
__webpack_require__(325);
|
34471
|
+
__webpack_require__(326);
|
34299
34472
|
|
34300
|
-
__webpack_require__(327);
|
34301
34473
|
__webpack_require__(328);
|
34474
|
+
__webpack_require__(329);
|
34302
34475
|
|
34303
34476
|
|
34304
34477
|
|
@@ -34328,9 +34501,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
34328
34501
|
var env = __webpack_require__(2);
|
34329
34502
|
var echarts = __webpack_require__(1);
|
34330
34503
|
var modelUtil = __webpack_require__(5);
|
34331
|
-
var
|
34504
|
+
var helper = __webpack_require__(319);
|
34505
|
+
var AxisProxy = __webpack_require__(320);
|
34332
34506
|
var each = zrUtil.each;
|
34333
|
-
var eachAxisDim =
|
34507
|
+
var eachAxisDim = helper.eachAxisDim;
|
34334
34508
|
|
34335
34509
|
var DataZoomModel = echarts.extendComponentModel({
|
34336
34510
|
|
@@ -34349,8 +34523,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
34349
34523
|
orient: null, // Default auto by axisIndex. Possible value: 'horizontal', 'vertical'.
|
34350
34524
|
xAxisIndex: null, // Default the first horizontal category axis.
|
34351
34525
|
yAxisIndex: null, // Default the first vertical category axis.
|
34352
|
-
|
34353
|
-
|
34526
|
+
|
34527
|
+
|
34354
34528
|
filterMode: 'filter', // Possible values: 'filter' or 'empty'.
|
34355
34529
|
// 'filter': data items which are out of window will be removed.
|
34356
34530
|
// This option is applicable when filtering outliers.
|
@@ -34578,7 +34752,29 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
34578
34752
|
if (this._isSeriesHasAllAxesTypeOf(seriesModel, 'value')) {
|
34579
34753
|
eachAxisDim(function (dimNames) {
|
34580
34754
|
var axisIndices = thisOption[dimNames.axisIndex];
|
34755
|
+
|
34581
34756
|
var axisIndex = seriesModel.get(dimNames.axisIndex);
|
34757
|
+
var axisId = seriesModel.get(dimNames.axisId);
|
34758
|
+
|
34759
|
+
var axisModel = seriesModel.ecModel.queryComponents({
|
34760
|
+
mainType: dimNames.axis,
|
34761
|
+
index: axisIndex,
|
34762
|
+
id: axisId
|
34763
|
+
})[0];
|
34764
|
+
|
34765
|
+
if (true) {
|
34766
|
+
if (!axisModel) {
|
34767
|
+
throw new Error(
|
34768
|
+
dimNames.axis + ' "' + zrUtil.retrieve(
|
34769
|
+
axisIndex,
|
34770
|
+
axisId,
|
34771
|
+
0
|
34772
|
+
) + '" not found'
|
34773
|
+
);
|
34774
|
+
}
|
34775
|
+
}
|
34776
|
+
axisIndex = axisModel.componentIndex;
|
34777
|
+
|
34582
34778
|
if (zrUtil.indexOf(axisIndices, axisIndex) < 0) {
|
34583
34779
|
axisIndices.push(axisIndex);
|
34584
34780
|
}
|
@@ -34782,6 +34978,134 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
34782
34978
|
/* 319 */
|
34783
34979
|
/***/ function(module, exports, __webpack_require__) {
|
34784
34980
|
|
34981
|
+
|
34982
|
+
var formatUtil = __webpack_require__(6);
|
34983
|
+
var zrUtil = __webpack_require__(4);
|
34984
|
+
|
34985
|
+
var helper = {};
|
34986
|
+
|
34987
|
+
var AXIS_DIMS = ['x', 'y', 'z', 'radius', 'angle'];
|
34988
|
+
|
34989
|
+
/**
|
34990
|
+
* Create "each" method to iterate names.
|
34991
|
+
*
|
34992
|
+
* @pubilc
|
34993
|
+
* @param {Array.<string>} names
|
34994
|
+
* @param {Array.<string>=} attrs
|
34995
|
+
* @return {Function}
|
34996
|
+
*/
|
34997
|
+
helper.createNameEach = function (names, attrs) {
|
34998
|
+
names = names.slice();
|
34999
|
+
var capitalNames = zrUtil.map(names, formatUtil.capitalFirst);
|
35000
|
+
attrs = (attrs || []).slice();
|
35001
|
+
var capitalAttrs = zrUtil.map(attrs, formatUtil.capitalFirst);
|
35002
|
+
|
35003
|
+
return function (callback, context) {
|
35004
|
+
zrUtil.each(names, function (name, index) {
|
35005
|
+
var nameObj = {name: name, capital: capitalNames[index]};
|
35006
|
+
|
35007
|
+
for (var j = 0; j < attrs.length; j++) {
|
35008
|
+
nameObj[attrs[j]] = name + capitalAttrs[j];
|
35009
|
+
}
|
35010
|
+
|
35011
|
+
callback.call(context, nameObj);
|
35012
|
+
});
|
35013
|
+
};
|
35014
|
+
};
|
35015
|
+
|
35016
|
+
/**
|
35017
|
+
* Iterate each dimension name.
|
35018
|
+
*
|
35019
|
+
* @public
|
35020
|
+
* @param {Function} callback The parameter is like:
|
35021
|
+
* {
|
35022
|
+
* name: 'angle',
|
35023
|
+
* capital: 'Angle',
|
35024
|
+
* axis: 'angleAxis',
|
35025
|
+
* axisIndex: 'angleAixs',
|
35026
|
+
* index: 'angleIndex'
|
35027
|
+
* }
|
35028
|
+
* @param {Object} context
|
35029
|
+
*/
|
35030
|
+
helper.eachAxisDim = helper.createNameEach(AXIS_DIMS, ['axisIndex', 'axis', 'index', 'id']);
|
35031
|
+
|
35032
|
+
/**
|
35033
|
+
* If tow dataZoomModels has the same axis controlled, we say that they are 'linked'.
|
35034
|
+
* dataZoomModels and 'links' make up one or more graphics.
|
35035
|
+
* This function finds the graphic where the source dataZoomModel is in.
|
35036
|
+
*
|
35037
|
+
* @public
|
35038
|
+
* @param {Function} forEachNode Node iterator.
|
35039
|
+
* @param {Function} forEachEdgeType edgeType iterator
|
35040
|
+
* @param {Function} edgeIdGetter Giving node and edgeType, return an array of edge id.
|
35041
|
+
* @return {Function} Input: sourceNode, Output: Like {nodes: [], dims: {}}
|
35042
|
+
*/
|
35043
|
+
helper.createLinkedNodesFinder = function (forEachNode, forEachEdgeType, edgeIdGetter) {
|
35044
|
+
|
35045
|
+
return function (sourceNode) {
|
35046
|
+
var result = {
|
35047
|
+
nodes: [],
|
35048
|
+
records: {} // key: edgeType.name, value: Object (key: edge id, value: boolean).
|
35049
|
+
};
|
35050
|
+
|
35051
|
+
forEachEdgeType(function (edgeType) {
|
35052
|
+
result.records[edgeType.name] = {};
|
35053
|
+
});
|
35054
|
+
|
35055
|
+
if (!sourceNode) {
|
35056
|
+
return result;
|
35057
|
+
}
|
35058
|
+
|
35059
|
+
absorb(sourceNode, result);
|
35060
|
+
|
35061
|
+
var existsLink;
|
35062
|
+
do {
|
35063
|
+
existsLink = false;
|
35064
|
+
forEachNode(processSingleNode);
|
35065
|
+
}
|
35066
|
+
while (existsLink);
|
35067
|
+
|
35068
|
+
function processSingleNode(node) {
|
35069
|
+
if (!isNodeAbsorded(node, result) && isLinked(node, result)) {
|
35070
|
+
absorb(node, result);
|
35071
|
+
existsLink = true;
|
35072
|
+
}
|
35073
|
+
}
|
35074
|
+
|
35075
|
+
return result;
|
35076
|
+
};
|
35077
|
+
|
35078
|
+
function isNodeAbsorded(node, result) {
|
35079
|
+
return zrUtil.indexOf(result.nodes, node) >= 0;
|
35080
|
+
}
|
35081
|
+
|
35082
|
+
function isLinked(node, result) {
|
35083
|
+
var hasLink = false;
|
35084
|
+
forEachEdgeType(function (edgeType) {
|
35085
|
+
zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {
|
35086
|
+
result.records[edgeType.name][edgeId] && (hasLink = true);
|
35087
|
+
});
|
35088
|
+
});
|
35089
|
+
return hasLink;
|
35090
|
+
}
|
35091
|
+
|
35092
|
+
function absorb(node, result) {
|
35093
|
+
result.nodes.push(node);
|
35094
|
+
forEachEdgeType(function (edgeType) {
|
35095
|
+
zrUtil.each(edgeIdGetter(node, edgeType) || [], function (edgeId) {
|
35096
|
+
result.records[edgeType.name][edgeId] = true;
|
35097
|
+
});
|
35098
|
+
});
|
35099
|
+
}
|
35100
|
+
};
|
35101
|
+
|
35102
|
+
module.exports = helper;
|
35103
|
+
|
35104
|
+
|
35105
|
+
/***/ },
|
35106
|
+
/* 320 */
|
35107
|
+
/***/ function(module, exports, __webpack_require__) {
|
35108
|
+
|
34785
35109
|
/**
|
34786
35110
|
* @file Axis operator
|
34787
35111
|
*/
|
@@ -34888,10 +35212,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
34888
35212
|
*/
|
34889
35213
|
getTargetSeriesModels: function () {
|
34890
35214
|
var seriesModels = [];
|
35215
|
+
var ecModel = this.ecModel;
|
34891
35216
|
|
34892
|
-
|
34893
|
-
|
34894
|
-
|
35217
|
+
ecModel.eachSeries(function (seriesModel) {
|
35218
|
+
var dimName = this._dimName;
|
35219
|
+
var axisModel = ecModel.queryComponents({
|
35220
|
+
mainType: dimName + 'Axis',
|
35221
|
+
index: seriesModel.get(dimName + 'AxisIndex'),
|
35222
|
+
id: seriesModel.get(dimName + 'AxisId')
|
35223
|
+
})[0];
|
35224
|
+
if (this._axisIndex === (axisModel && axisModel.componentIndex)) {
|
34895
35225
|
seriesModels.push(seriesModel);
|
34896
35226
|
}
|
34897
35227
|
}, this);
|
@@ -35142,7 +35472,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
35142
35472
|
|
35143
35473
|
|
35144
35474
|
/***/ },
|
35145
|
-
/*
|
35475
|
+
/* 321 */
|
35146
35476
|
/***/ function(module, exports, __webpack_require__) {
|
35147
35477
|
|
35148
35478
|
|
@@ -35188,17 +35518,22 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
35188
35518
|
var axisModel = ecModel.getComponent(dimNames.axis, axisIndex);
|
35189
35519
|
if (axisModel) {
|
35190
35520
|
axisModels.push(axisModel);
|
35191
|
-
|
35192
|
-
|
35193
|
-
|
35194
|
-
|
35195
|
-
|
35196
|
-
|
35197
|
-
|
35521
|
+
var coordSysName;
|
35522
|
+
if (dimNames.axis === 'xAxis' || dimNames.axis === 'yAxis') {
|
35523
|
+
coordSysName = 'grid';
|
35524
|
+
}
|
35525
|
+
else {
|
35526
|
+
// Polar
|
35527
|
+
coordSysName = 'polar';
|
35198
35528
|
}
|
35199
|
-
|
35200
|
-
|
35201
|
-
|
35529
|
+
var coordModel = ecModel.queryComponents({
|
35530
|
+
mainType: coordSysName,
|
35531
|
+
index: axisModel.get(coordSysName + 'Index'),
|
35532
|
+
id: axisModel.get(coordSysName + 'Id')
|
35533
|
+
})[0];
|
35534
|
+
|
35535
|
+
if (coordModel != null) {
|
35536
|
+
save(coordModel, axisModel, coordSysName === 'grid' ? cartesians : polars, coordModel.componentIndex);
|
35202
35537
|
}
|
35203
35538
|
}
|
35204
35539
|
}, this);
|
@@ -35231,7 +35566,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
35231
35566
|
|
35232
35567
|
|
35233
35568
|
/***/ },
|
35234
|
-
/*
|
35569
|
+
/* 322 */
|
35235
35570
|
/***/ function(module, exports, __webpack_require__) {
|
35236
35571
|
|
35237
35572
|
/**
|
@@ -35310,7 +35645,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
35310
35645
|
|
35311
35646
|
|
35312
35647
|
/***/ },
|
35313
|
-
/*
|
35648
|
+
/* 323 */
|
35314
35649
|
/***/ function(module, exports, __webpack_require__) {
|
35315
35650
|
|
35316
35651
|
|
@@ -35318,12 +35653,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
35318
35653
|
var zrUtil = __webpack_require__(4);
|
35319
35654
|
var graphic = __webpack_require__(43);
|
35320
35655
|
var throttle = __webpack_require__(308);
|
35321
|
-
var DataZoomView = __webpack_require__(
|
35656
|
+
var DataZoomView = __webpack_require__(321);
|
35322
35657
|
var Rect = graphic.Rect;
|
35323
35658
|
var numberUtil = __webpack_require__(7);
|
35324
35659
|
var linearMap = numberUtil.linearMap;
|
35325
35660
|
var layout = __webpack_require__(21);
|
35326
|
-
var sliderMove = __webpack_require__(
|
35661
|
+
var sliderMove = __webpack_require__(324);
|
35327
35662
|
var asc = numberUtil.asc;
|
35328
35663
|
var bind = zrUtil.bind;
|
35329
35664
|
// var mathMax = Math.max;
|
@@ -36049,7 +36384,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36049
36384
|
|
36050
36385
|
|
36051
36386
|
/***/ },
|
36052
|
-
/*
|
36387
|
+
/* 324 */
|
36053
36388
|
/***/ function(module, exports) {
|
36054
36389
|
|
36055
36390
|
|
@@ -36108,7 +36443,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36108
36443
|
|
36109
36444
|
|
36110
36445
|
/***/ },
|
36111
|
-
/*
|
36446
|
+
/* 325 */
|
36112
36447
|
/***/ function(module, exports, __webpack_require__) {
|
36113
36448
|
|
36114
36449
|
/**
|
@@ -36130,15 +36465,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36130
36465
|
|
36131
36466
|
|
36132
36467
|
/***/ },
|
36133
|
-
/*
|
36468
|
+
/* 326 */
|
36134
36469
|
/***/ function(module, exports, __webpack_require__) {
|
36135
36470
|
|
36136
36471
|
|
36137
36472
|
|
36138
|
-
var DataZoomView = __webpack_require__(
|
36473
|
+
var DataZoomView = __webpack_require__(321);
|
36139
36474
|
var zrUtil = __webpack_require__(4);
|
36140
|
-
var sliderMove = __webpack_require__(
|
36141
|
-
var roams = __webpack_require__(
|
36475
|
+
var sliderMove = __webpack_require__(324);
|
36476
|
+
var roams = __webpack_require__(327);
|
36142
36477
|
var bind = zrUtil.bind;
|
36143
36478
|
|
36144
36479
|
var InsideZoomView = DataZoomView.extend({
|
@@ -36321,7 +36656,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36321
36656
|
|
36322
36657
|
|
36323
36658
|
/***/ },
|
36324
|
-
/*
|
36659
|
+
/* 327 */
|
36325
36660
|
/***/ function(module, exports, __webpack_require__) {
|
36326
36661
|
|
36327
36662
|
/**
|
@@ -36518,7 +36853,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36518
36853
|
|
36519
36854
|
|
36520
36855
|
/***/ },
|
36521
|
-
/*
|
36856
|
+
/* 328 */
|
36522
36857
|
/***/ function(module, exports, __webpack_require__) {
|
36523
36858
|
|
36524
36859
|
/**
|
@@ -36581,7 +36916,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36581
36916
|
|
36582
36917
|
|
36583
36918
|
/***/ },
|
36584
|
-
/*
|
36919
|
+
/* 329 */
|
36585
36920
|
/***/ function(module, exports, __webpack_require__) {
|
36586
36921
|
|
36587
36922
|
/**
|
@@ -36590,15 +36925,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36590
36925
|
|
36591
36926
|
|
36592
36927
|
var zrUtil = __webpack_require__(4);
|
36593
|
-
var
|
36928
|
+
var helper = __webpack_require__(319);
|
36594
36929
|
var echarts = __webpack_require__(1);
|
36595
36930
|
|
36596
36931
|
|
36597
36932
|
echarts.registerAction('dataZoom', function (payload, ecModel) {
|
36598
36933
|
|
36599
|
-
var linkedNodesFinder =
|
36934
|
+
var linkedNodesFinder = helper.createLinkedNodesFinder(
|
36600
36935
|
zrUtil.bind(ecModel.eachComponent, ecModel, 'dataZoom'),
|
36601
|
-
|
36936
|
+
helper.eachAxisDim,
|
36602
36937
|
function (model, dimNames) {
|
36603
36938
|
return model.get(dimNames.axisIndex);
|
36604
36939
|
}
|
@@ -36629,7 +36964,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36629
36964
|
|
36630
36965
|
|
36631
36966
|
/***/ },
|
36632
|
-
/* 329 */,
|
36633
36967
|
/* 330 */,
|
36634
36968
|
/* 331 */,
|
36635
36969
|
/* 332 */,
|
@@ -36644,14 +36978,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36644
36978
|
/* 341 */,
|
36645
36979
|
/* 342 */,
|
36646
36980
|
/* 343 */,
|
36647
|
-
/* 344
|
36981
|
+
/* 344 */,
|
36982
|
+
/* 345 */
|
36648
36983
|
/***/ function(module, exports, __webpack_require__) {
|
36649
36984
|
|
36650
36985
|
// HINT Markpoint can't be used too much
|
36651
36986
|
|
36652
36987
|
|
36653
|
-
__webpack_require__(
|
36654
|
-
__webpack_require__(
|
36988
|
+
__webpack_require__(346);
|
36989
|
+
__webpack_require__(348);
|
36655
36990
|
|
36656
36991
|
__webpack_require__(1).registerPreprocessor(function (opt) {
|
36657
36992
|
// Make sure markPoint component is enabled
|
@@ -36660,12 +36995,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36660
36995
|
|
36661
36996
|
|
36662
36997
|
/***/ },
|
36663
|
-
/*
|
36998
|
+
/* 346 */
|
36664
36999
|
/***/ function(module, exports, __webpack_require__) {
|
36665
37000
|
|
36666
37001
|
|
36667
37002
|
|
36668
|
-
module.exports = __webpack_require__(
|
37003
|
+
module.exports = __webpack_require__(347).extend({
|
36669
37004
|
|
36670
37005
|
type: 'markPoint',
|
36671
37006
|
|
@@ -36698,7 +37033,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36698
37033
|
|
36699
37034
|
|
36700
37035
|
/***/ },
|
36701
|
-
/*
|
37036
|
+
/* 347 */
|
36702
37037
|
/***/ function(module, exports, __webpack_require__) {
|
36703
37038
|
|
36704
37039
|
|
@@ -36833,7 +37168,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36833
37168
|
|
36834
37169
|
|
36835
37170
|
/***/ },
|
36836
|
-
/*
|
37171
|
+
/* 348 */
|
36837
37172
|
/***/ function(module, exports, __webpack_require__) {
|
36838
37173
|
|
36839
37174
|
|
@@ -36844,7 +37179,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36844
37179
|
|
36845
37180
|
var List = __webpack_require__(97);
|
36846
37181
|
|
36847
|
-
var markerHelper = __webpack_require__(
|
37182
|
+
var markerHelper = __webpack_require__(349);
|
36848
37183
|
|
36849
37184
|
function updateMarkerLayout(mpData, seriesModel, api) {
|
36850
37185
|
var coordSys = seriesModel.coordinateSystem;
|
@@ -36882,7 +37217,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36882
37217
|
});
|
36883
37218
|
}
|
36884
37219
|
|
36885
|
-
__webpack_require__(
|
37220
|
+
__webpack_require__(350).extend({
|
36886
37221
|
|
36887
37222
|
type: 'markPoint',
|
36888
37223
|
|
@@ -36994,7 +37329,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
36994
37329
|
|
36995
37330
|
|
36996
37331
|
/***/ },
|
36997
|
-
/*
|
37332
|
+
/* 349 */
|
36998
37333
|
/***/ function(module, exports, __webpack_require__) {
|
36999
37334
|
|
37000
37335
|
|
@@ -37198,7 +37533,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37198
37533
|
|
37199
37534
|
|
37200
37535
|
/***/ },
|
37201
|
-
/*
|
37536
|
+
/* 350 */
|
37202
37537
|
/***/ function(module, exports, __webpack_require__) {
|
37203
37538
|
|
37204
37539
|
|
@@ -37240,13 +37575,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37240
37575
|
|
37241
37576
|
|
37242
37577
|
/***/ },
|
37243
|
-
/*
|
37578
|
+
/* 351 */
|
37244
37579
|
/***/ function(module, exports, __webpack_require__) {
|
37245
37580
|
|
37246
37581
|
|
37247
37582
|
|
37248
|
-
__webpack_require__(351);
|
37249
37583
|
__webpack_require__(352);
|
37584
|
+
__webpack_require__(353);
|
37250
37585
|
|
37251
37586
|
__webpack_require__(1).registerPreprocessor(function (opt) {
|
37252
37587
|
// Make sure markLine component is enabled
|
@@ -37255,12 +37590,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37255
37590
|
|
37256
37591
|
|
37257
37592
|
/***/ },
|
37258
|
-
/*
|
37593
|
+
/* 352 */
|
37259
37594
|
/***/ function(module, exports, __webpack_require__) {
|
37260
37595
|
|
37261
37596
|
|
37262
37597
|
|
37263
|
-
module.exports = __webpack_require__(
|
37598
|
+
module.exports = __webpack_require__(347).extend({
|
37264
37599
|
|
37265
37600
|
type: 'markLine',
|
37266
37601
|
|
@@ -37300,7 +37635,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37300
37635
|
|
37301
37636
|
|
37302
37637
|
/***/ },
|
37303
|
-
/*
|
37638
|
+
/* 353 */
|
37304
37639
|
/***/ function(module, exports, __webpack_require__) {
|
37305
37640
|
|
37306
37641
|
|
@@ -37309,7 +37644,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37309
37644
|
var List = __webpack_require__(97);
|
37310
37645
|
var numberUtil = __webpack_require__(7);
|
37311
37646
|
|
37312
|
-
var markerHelper = __webpack_require__(
|
37647
|
+
var markerHelper = __webpack_require__(349);
|
37313
37648
|
|
37314
37649
|
var LineDraw = __webpack_require__(199);
|
37315
37650
|
|
@@ -37481,7 +37816,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37481
37816
|
data.setItemLayout(idx, point);
|
37482
37817
|
}
|
37483
37818
|
|
37484
|
-
__webpack_require__(
|
37819
|
+
__webpack_require__(350).extend({
|
37485
37820
|
|
37486
37821
|
type: 'markLine',
|
37487
37822
|
|
@@ -37660,13 +37995,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37660
37995
|
|
37661
37996
|
|
37662
37997
|
/***/ },
|
37663
|
-
/*
|
37998
|
+
/* 354 */
|
37664
37999
|
/***/ function(module, exports, __webpack_require__) {
|
37665
38000
|
|
37666
38001
|
|
37667
38002
|
|
37668
|
-
__webpack_require__(354);
|
37669
38003
|
__webpack_require__(355);
|
38004
|
+
__webpack_require__(356);
|
37670
38005
|
|
37671
38006
|
__webpack_require__(1).registerPreprocessor(function (opt) {
|
37672
38007
|
// Make sure markArea component is enabled
|
@@ -37675,12 +38010,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37675
38010
|
|
37676
38011
|
|
37677
38012
|
/***/ },
|
37678
|
-
/*
|
38013
|
+
/* 355 */
|
37679
38014
|
/***/ function(module, exports, __webpack_require__) {
|
37680
38015
|
|
37681
38016
|
|
37682
38017
|
|
37683
|
-
module.exports = __webpack_require__(
|
38018
|
+
module.exports = __webpack_require__(347).extend({
|
37684
38019
|
|
37685
38020
|
type: 'markArea',
|
37686
38021
|
|
@@ -37716,7 +38051,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37716
38051
|
|
37717
38052
|
|
37718
38053
|
/***/ },
|
37719
|
-
/*
|
38054
|
+
/* 356 */
|
37720
38055
|
/***/ function(module, exports, __webpack_require__) {
|
37721
38056
|
|
37722
38057
|
// TODO Better on polar
|
@@ -37728,7 +38063,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37728
38063
|
var graphic = __webpack_require__(43);
|
37729
38064
|
var colorUtil = __webpack_require__(39);
|
37730
38065
|
|
37731
|
-
var markerHelper = __webpack_require__(
|
38066
|
+
var markerHelper = __webpack_require__(349);
|
37732
38067
|
|
37733
38068
|
var markAreaTransform = function (seriesModel, coordSys, maModel, item) {
|
37734
38069
|
var lt = markerHelper.dataTransform(seriesModel, item[0]);
|
@@ -37848,7 +38183,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
37848
38183
|
|
37849
38184
|
var dimPermutations = [['x0', 'y0'], ['x1', 'y0'], ['x1', 'y1'], ['x0', 'y1']];
|
37850
38185
|
|
37851
|
-
__webpack_require__(
|
38186
|
+
__webpack_require__(350).extend({
|
37852
38187
|
|
37853
38188
|
type: 'markArea',
|
37854
38189
|
|
@@ -38027,7 +38362,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38027
38362
|
|
38028
38363
|
|
38029
38364
|
/***/ },
|
38030
|
-
/* 356 */,
|
38031
38365
|
/* 357 */,
|
38032
38366
|
/* 358 */,
|
38033
38367
|
/* 359 */,
|
@@ -38036,23 +38370,24 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38036
38370
|
/* 362 */,
|
38037
38371
|
/* 363 */,
|
38038
38372
|
/* 364 */,
|
38039
|
-
/* 365
|
38373
|
+
/* 365 */,
|
38374
|
+
/* 366 */
|
38040
38375
|
/***/ function(module, exports, __webpack_require__) {
|
38041
38376
|
|
38042
38377
|
|
38043
38378
|
|
38044
|
-
__webpack_require__(366);
|
38045
38379
|
__webpack_require__(367);
|
38380
|
+
__webpack_require__(368);
|
38046
38381
|
|
38047
|
-
__webpack_require__(369);
|
38048
38382
|
__webpack_require__(370);
|
38049
38383
|
__webpack_require__(371);
|
38050
38384
|
__webpack_require__(372);
|
38051
|
-
__webpack_require__(
|
38385
|
+
__webpack_require__(373);
|
38386
|
+
__webpack_require__(378);
|
38052
38387
|
|
38053
38388
|
|
38054
38389
|
/***/ },
|
38055
|
-
/*
|
38390
|
+
/* 367 */
|
38056
38391
|
/***/ function(module, exports, __webpack_require__) {
|
38057
38392
|
|
38058
38393
|
|
@@ -38128,7 +38463,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38128
38463
|
|
38129
38464
|
|
38130
38465
|
/***/ },
|
38131
|
-
/*
|
38466
|
+
/* 368 */
|
38132
38467
|
/***/ function(module, exports, __webpack_require__) {
|
38133
38468
|
|
38134
38469
|
/* WEBPACK VAR INJECTION */(function(process) {
|
@@ -38378,10 +38713,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38378
38713
|
}
|
38379
38714
|
|
38380
38715
|
|
38381
|
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(
|
38716
|
+
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(369)))
|
38382
38717
|
|
38383
38718
|
/***/ },
|
38384
|
-
/*
|
38719
|
+
/* 369 */
|
38385
38720
|
/***/ function(module, exports) {
|
38386
38721
|
|
38387
38722
|
// shim for using process in browser
|
@@ -38506,7 +38841,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38506
38841
|
|
38507
38842
|
|
38508
38843
|
/***/ },
|
38509
|
-
/*
|
38844
|
+
/* 370 */
|
38510
38845
|
/***/ function(module, exports, __webpack_require__) {
|
38511
38846
|
|
38512
38847
|
|
@@ -38578,7 +38913,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38578
38913
|
|
38579
38914
|
|
38580
38915
|
/***/ },
|
38581
|
-
/*
|
38916
|
+
/* 371 */
|
38582
38917
|
/***/ function(module, exports, __webpack_require__) {
|
38583
38918
|
|
38584
38919
|
'use strict';
|
@@ -38701,13 +39036,19 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38701
39036
|
var categoryAxis = coordSys.getAxesByScale('ordinal')[0];
|
38702
39037
|
if (categoryAxis) {
|
38703
39038
|
var axisDim = categoryAxis.dim;
|
38704
|
-
var
|
38705
|
-
var
|
38706
|
-
|
39039
|
+
var axisType = axisDim + 'Axis';
|
39040
|
+
var axisModel = ecModel.queryComponents({
|
39041
|
+
mainType: axisType,
|
39042
|
+
index: seriesModel.get(name + 'Index'),
|
39043
|
+
id: seriesModel.get(name + 'Id')
|
39044
|
+
})[0];
|
39045
|
+
var axisIndex = axisModel.componentIndex;
|
39046
|
+
|
39047
|
+
newOption[axisType] = newOption[axisType] || [];
|
38707
39048
|
for (var i = 0; i <= axisIndex; i++) {
|
38708
|
-
newOption[
|
39049
|
+
newOption[axisType][axisIndex] = newOption[axisType][axisIndex] || {};
|
38709
39050
|
}
|
38710
|
-
newOption[
|
39051
|
+
newOption[axisType][axisIndex].boundaryGap = type === 'bar' ? true : false;
|
38711
39052
|
}
|
38712
39053
|
}
|
38713
39054
|
};
|
@@ -38752,7 +39093,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
38752
39093
|
|
38753
39094
|
|
38754
39095
|
/***/ },
|
38755
|
-
/*
|
39096
|
+
/* 372 */
|
38756
39097
|
/***/ function(module, exports, __webpack_require__) {
|
38757
39098
|
|
38758
39099
|
/**
|
@@ -39235,7 +39576,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39235
39576
|
|
39236
39577
|
|
39237
39578
|
/***/ },
|
39238
|
-
/*
|
39579
|
+
/* 373 */
|
39239
39580
|
/***/ function(module, exports, __webpack_require__) {
|
39240
39581
|
|
39241
39582
|
'use strict';
|
@@ -39244,12 +39585,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39244
39585
|
var zrUtil = __webpack_require__(4);
|
39245
39586
|
var BrushController = __webpack_require__(233);
|
39246
39587
|
var brushHelper = __webpack_require__(309);
|
39247
|
-
var history = __webpack_require__(
|
39588
|
+
var history = __webpack_require__(374);
|
39248
39589
|
|
39249
39590
|
var each = zrUtil.each;
|
39250
39591
|
|
39251
39592
|
// Use dataZoomSelect
|
39252
|
-
__webpack_require__(
|
39593
|
+
__webpack_require__(375);
|
39253
39594
|
|
39254
39595
|
// Spectial component id start with \0ec\0, see echarts/model/Global.js~hasInnerId
|
39255
39596
|
var DATA_ZOOM_ID_BASE = '\0_ec_\0toolbox-dataZoom_';
|
@@ -39543,7 +39884,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39543
39884
|
|
39544
39885
|
|
39545
39886
|
/***/ },
|
39546
|
-
/*
|
39887
|
+
/* 374 */
|
39547
39888
|
/***/ function(module, exports, __webpack_require__) {
|
39548
39889
|
|
39549
39890
|
/**
|
@@ -39657,7 +39998,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39657
39998
|
|
39658
39999
|
|
39659
40000
|
/***/ },
|
39660
|
-
/*
|
40001
|
+
/* 375 */
|
39661
40002
|
/***/ function(module, exports, __webpack_require__) {
|
39662
40003
|
|
39663
40004
|
/**
|
@@ -39668,18 +40009,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39668
40009
|
__webpack_require__(317);
|
39669
40010
|
|
39670
40011
|
__webpack_require__(318);
|
39671
|
-
__webpack_require__(
|
40012
|
+
__webpack_require__(321);
|
39672
40013
|
|
39673
|
-
__webpack_require__(375);
|
39674
40014
|
__webpack_require__(376);
|
40015
|
+
__webpack_require__(377);
|
39675
40016
|
|
39676
|
-
__webpack_require__(327);
|
39677
40017
|
__webpack_require__(328);
|
40018
|
+
__webpack_require__(329);
|
39678
40019
|
|
39679
40020
|
|
39680
40021
|
|
39681
40022
|
/***/ },
|
39682
|
-
/*
|
40023
|
+
/* 376 */
|
39683
40024
|
/***/ function(module, exports, __webpack_require__) {
|
39684
40025
|
|
39685
40026
|
/**
|
@@ -39698,12 +40039,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39698
40039
|
|
39699
40040
|
|
39700
40041
|
/***/ },
|
39701
|
-
/*
|
40042
|
+
/* 377 */
|
39702
40043
|
/***/ function(module, exports, __webpack_require__) {
|
39703
40044
|
|
39704
40045
|
|
39705
40046
|
|
39706
|
-
module.exports = __webpack_require__(
|
40047
|
+
module.exports = __webpack_require__(321).extend({
|
39707
40048
|
|
39708
40049
|
type: 'dataZoom.select'
|
39709
40050
|
|
@@ -39712,13 +40053,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39712
40053
|
|
39713
40054
|
|
39714
40055
|
/***/ },
|
39715
|
-
/*
|
40056
|
+
/* 378 */
|
39716
40057
|
/***/ function(module, exports, __webpack_require__) {
|
39717
40058
|
|
39718
40059
|
'use strict';
|
39719
40060
|
|
39720
40061
|
|
39721
|
-
var history = __webpack_require__(
|
40062
|
+
var history = __webpack_require__(374);
|
39722
40063
|
|
39723
40064
|
function Restore(model) {
|
39724
40065
|
this.model = model;
|
@@ -39756,16 +40097,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39756
40097
|
|
39757
40098
|
|
39758
40099
|
/***/ },
|
39759
|
-
/*
|
40100
|
+
/* 379 */
|
39760
40101
|
/***/ function(module, exports, __webpack_require__) {
|
39761
40102
|
|
39762
40103
|
|
39763
|
-
__webpack_require__(
|
39764
|
-
__webpack_require__(81).registerPainter('vml', __webpack_require__(
|
40104
|
+
__webpack_require__(380);
|
40105
|
+
__webpack_require__(81).registerPainter('vml', __webpack_require__(382));
|
39765
40106
|
|
39766
40107
|
|
39767
40108
|
/***/ },
|
39768
|
-
/*
|
40109
|
+
/* 380 */
|
39769
40110
|
/***/ function(module, exports, __webpack_require__) {
|
39770
40111
|
|
39771
40112
|
// http://www.w3.org/TR/NOTE-VML
|
@@ -39786,7 +40127,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
39786
40127
|
|
39787
40128
|
var Gradient = __webpack_require__(61);
|
39788
40129
|
|
39789
|
-
var vmlCore = __webpack_require__(
|
40130
|
+
var vmlCore = __webpack_require__(381);
|
39790
40131
|
|
39791
40132
|
var round = Math.round;
|
39792
40133
|
var sqrt = Math.sqrt;
|
@@ -40823,7 +41164,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
40823
41164
|
|
40824
41165
|
|
40825
41166
|
/***/ },
|
40826
|
-
/*
|
41167
|
+
/* 381 */
|
40827
41168
|
/***/ function(module, exports, __webpack_require__) {
|
40828
41169
|
|
40829
41170
|
|
@@ -40876,7 +41217,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
40876
41217
|
|
40877
41218
|
|
40878
41219
|
/***/ },
|
40879
|
-
/*
|
41220
|
+
/* 382 */
|
40880
41221
|
/***/ function(module, exports, __webpack_require__) {
|
40881
41222
|
|
40882
41223
|
/**
|
@@ -40888,7 +41229,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
40888
41229
|
|
40889
41230
|
|
40890
41231
|
var zrLog = __webpack_require__(40);
|
40891
|
-
var vmlCore = __webpack_require__(
|
41232
|
+
var vmlCore = __webpack_require__(381);
|
40892
41233
|
|
40893
41234
|
function parseInt10(val) {
|
40894
41235
|
return parseInt(val, 10);
|