echarts-rails 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/vendor/assets/javascripts/echarts.common.js +1456 -607
- data/vendor/assets/javascripts/echarts.js +2230 -1173
- data/vendor/assets/javascripts/echarts.simple.js +966 -242
- metadata +2 -2
@@ -60,8 +60,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
60
60
|
module.exports = __webpack_require__(1);
|
61
61
|
|
62
62
|
__webpack_require__(99);
|
63
|
-
__webpack_require__(
|
64
|
-
__webpack_require__(
|
63
|
+
__webpack_require__(134);
|
64
|
+
__webpack_require__(139);
|
65
65
|
__webpack_require__(112);
|
66
66
|
|
67
67
|
/***/ },
|
@@ -110,6 +110,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
110
110
|
var ComponentView = __webpack_require__(29);
|
111
111
|
var ChartView = __webpack_require__(42);
|
112
112
|
var graphic = __webpack_require__(43);
|
113
|
+
var modelUtil = __webpack_require__(5);
|
113
114
|
|
114
115
|
var zrender = __webpack_require__(81);
|
115
116
|
var zrUtil = __webpack_require__(4);
|
@@ -147,6 +148,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
147
148
|
Eventful.prototype[method].call(this, eventName, handler, context);
|
148
149
|
};
|
149
150
|
}
|
151
|
+
|
150
152
|
/**
|
151
153
|
* @module echarts~MessageCenter
|
152
154
|
*/
|
@@ -157,6 +159,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
157
159
|
MessageCenter.prototype.off = createRegisterEventWithLowercaseName('off');
|
158
160
|
MessageCenter.prototype.one = createRegisterEventWithLowercaseName('one');
|
159
161
|
zrUtil.mixin(MessageCenter, Eventful);
|
162
|
+
|
160
163
|
/**
|
161
164
|
* @module echarts~ECharts
|
162
165
|
*/
|
@@ -188,7 +191,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
188
191
|
*/
|
189
192
|
this._zr = zrender.init(dom, {
|
190
193
|
renderer: opts.renderer || 'canvas',
|
191
|
-
devicePixelRatio: opts.devicePixelRatio
|
194
|
+
devicePixelRatio: opts.devicePixelRatio,
|
195
|
+
width: opts.width,
|
196
|
+
height: opts.height
|
192
197
|
});
|
193
198
|
|
194
199
|
/**
|
@@ -438,8 +443,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
438
443
|
var bottom = -MAX_NUMBER;
|
439
444
|
var canvasList = [];
|
440
445
|
var dpr = (opts && opts.pixelRatio) || 1;
|
441
|
-
|
442
|
-
|
446
|
+
|
447
|
+
zrUtil.each(instances, function (chart, id) {
|
443
448
|
if (chart.group === groupId) {
|
444
449
|
var canvas = chart.getRenderedCanvas(
|
445
450
|
zrUtil.clone(opts)
|
@@ -455,7 +460,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
455
460
|
top: boundingRect.top
|
456
461
|
});
|
457
462
|
}
|
458
|
-
}
|
463
|
+
});
|
459
464
|
|
460
465
|
left *= dpr;
|
461
466
|
top *= dpr;
|
@@ -487,8 +492,166 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
487
492
|
}
|
488
493
|
};
|
489
494
|
|
490
|
-
|
495
|
+
/**
|
496
|
+
* Convert from logical coordinate system to pixel coordinate system.
|
497
|
+
* See CoordinateSystem#convertToPixel.
|
498
|
+
* @param {string|Object} finder
|
499
|
+
* If string, e.g., 'geo', means {geoIndex: 0}.
|
500
|
+
* If Object, could contain some of these properties below:
|
501
|
+
* {
|
502
|
+
* seriesIndex / seriesId / seriesName,
|
503
|
+
* geoIndex / geoId, geoName,
|
504
|
+
* bmapIndex / bmapId / bmapName,
|
505
|
+
* xAxisIndex / xAxisId / xAxisName,
|
506
|
+
* yAxisIndex / yAxisId / yAxisName,
|
507
|
+
* gridIndex / gridId / gridName,
|
508
|
+
* ... (can be extended)
|
509
|
+
* }
|
510
|
+
* @param {Array|number} value
|
511
|
+
* @return {Array|number} result
|
512
|
+
*/
|
513
|
+
echartsProto.convertToPixel = zrUtil.curry(doConvertPixel, 'convertToPixel');
|
514
|
+
|
515
|
+
/**
|
516
|
+
* Convert from pixel coordinate system to logical coordinate system.
|
517
|
+
* See CoordinateSystem#convertFromPixel.
|
518
|
+
* @param {string|Object} finder
|
519
|
+
* If string, e.g., 'geo', means {geoIndex: 0}.
|
520
|
+
* If Object, could contain some of these properties below:
|
521
|
+
* {
|
522
|
+
* seriesIndex / seriesId / seriesName,
|
523
|
+
* geoIndex / geoId / geoName,
|
524
|
+
* bmapIndex / bmapId / bmapName,
|
525
|
+
* xAxisIndex / xAxisId / xAxisName,
|
526
|
+
* yAxisIndex / yAxisId / yAxisName
|
527
|
+
* gridIndex / gridId / gridName,
|
528
|
+
* ... (can be extended)
|
529
|
+
* }
|
530
|
+
* @param {Array|number} value
|
531
|
+
* @return {Array|number} result
|
532
|
+
*/
|
533
|
+
echartsProto.convertFromPixel = zrUtil.curry(doConvertPixel, 'convertFromPixel');
|
534
|
+
|
535
|
+
function doConvertPixel(methodName, finder, value) {
|
536
|
+
var ecModel = this._model;
|
537
|
+
var coordSysList = this._coordSysMgr.getCoordinateSystems();
|
538
|
+
var result;
|
539
|
+
|
540
|
+
finder = modelUtil.parseFinder(ecModel, finder);
|
541
|
+
|
542
|
+
for (var i = 0; i < coordSysList.length; i++) {
|
543
|
+
var coordSys = coordSysList[i];
|
544
|
+
if (coordSys[methodName]
|
545
|
+
&& (result = coordSys[methodName](ecModel, finder, value)) != null
|
546
|
+
) {
|
547
|
+
return result;
|
548
|
+
}
|
549
|
+
}
|
491
550
|
|
551
|
+
if (true) {
|
552
|
+
console.warn(
|
553
|
+
'No coordinate system that supports ' + methodName + ' found by the given finder.'
|
554
|
+
);
|
555
|
+
}
|
556
|
+
}
|
557
|
+
|
558
|
+
/**
|
559
|
+
* Is the specified coordinate systems or components contain the given pixel point.
|
560
|
+
* @param {string|Object} finder
|
561
|
+
* If string, e.g., 'geo', means {geoIndex: 0}.
|
562
|
+
* If Object, could contain some of these properties below:
|
563
|
+
* {
|
564
|
+
* seriesIndex / seriesId / seriesName,
|
565
|
+
* geoIndex / geoId / geoName,
|
566
|
+
* bmapIndex / bmapId / bmapName,
|
567
|
+
* xAxisIndex / xAxisId / xAxisName,
|
568
|
+
* yAxisIndex / yAxisId / yAxisName
|
569
|
+
* gridIndex / gridId / gridName,
|
570
|
+
* ... (can be extended)
|
571
|
+
* }
|
572
|
+
* @param {Array|number} value
|
573
|
+
* @return {boolean} result
|
574
|
+
*/
|
575
|
+
echartsProto.containPixel = function (finder, value) {
|
576
|
+
var ecModel = this._model;
|
577
|
+
var result;
|
578
|
+
|
579
|
+
finder = modelUtil.parseFinder(ecModel, finder);
|
580
|
+
|
581
|
+
zrUtil.each(finder, function (models, key) {
|
582
|
+
key.indexOf('Models') >= 0 && zrUtil.each(models, function (model) {
|
583
|
+
var coordSys = model.coordinateSystem;
|
584
|
+
if (coordSys && coordSys.containPoint) {
|
585
|
+
result |= !!coordSys.containPoint(value);
|
586
|
+
}
|
587
|
+
else if (key === 'seriesModels') {
|
588
|
+
var view = this._chartsMap[model.__viewId];
|
589
|
+
if (view && view.containPoint) {
|
590
|
+
result |= view.containPoint(value, model);
|
591
|
+
}
|
592
|
+
else {
|
593
|
+
if (true) {
|
594
|
+
console.warn(key + ': ' + (view
|
595
|
+
? 'The found component do not support containPoint.'
|
596
|
+
: 'No view mapping to the found component.'
|
597
|
+
));
|
598
|
+
}
|
599
|
+
}
|
600
|
+
}
|
601
|
+
else {
|
602
|
+
if (true) {
|
603
|
+
console.warn(key + ': containPoint is not supported');
|
604
|
+
}
|
605
|
+
}
|
606
|
+
}, this);
|
607
|
+
}, this);
|
608
|
+
|
609
|
+
return !!result;
|
610
|
+
};
|
611
|
+
|
612
|
+
/**
|
613
|
+
* Get visual from series or data.
|
614
|
+
* @param {string|Object} finder
|
615
|
+
* If string, e.g., 'series', means {seriesIndex: 0}.
|
616
|
+
* If Object, could contain some of these properties below:
|
617
|
+
* {
|
618
|
+
* seriesIndex / seriesId / seriesName,
|
619
|
+
* dataIndex / dataIndexInside
|
620
|
+
* }
|
621
|
+
* If dataIndex is not specified, series visual will be fetched,
|
622
|
+
* but not data item visual.
|
623
|
+
* If all of seriesIndex, seriesId, seriesName are not specified,
|
624
|
+
* visual will be fetched from first series.
|
625
|
+
* @param {string} visualType 'color', 'symbol', 'symbolSize'
|
626
|
+
*/
|
627
|
+
echartsProto.getVisual = function (finder, visualType) {
|
628
|
+
var ecModel = this._model;
|
629
|
+
|
630
|
+
finder = modelUtil.parseFinder(ecModel, finder, {defaultMainType: 'series'});
|
631
|
+
|
632
|
+
var seriesModel = finder.seriesModel;
|
633
|
+
|
634
|
+
if (true) {
|
635
|
+
if (!seriesModel) {
|
636
|
+
console.warn('There is no specified seires model');
|
637
|
+
}
|
638
|
+
}
|
639
|
+
|
640
|
+
var data = seriesModel.getData();
|
641
|
+
|
642
|
+
var dataIndexInside = finder.hasOwnProperty('dataIndexInside')
|
643
|
+
? finder.dataIndexInside
|
644
|
+
: finder.hasOwnProperty('dataIndex')
|
645
|
+
? data.indexOfRawIndex(finder.dataIndex)
|
646
|
+
: null;
|
647
|
+
|
648
|
+
return dataIndexInside != null
|
649
|
+
? data.getItemVisual(dataIndexInside, visualType)
|
650
|
+
: data.getVisual(visualType);
|
651
|
+
};
|
652
|
+
|
653
|
+
|
654
|
+
var updateMethods = {
|
492
655
|
|
493
656
|
/**
|
494
657
|
* @param {Object} payload
|
@@ -690,15 +853,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
690
853
|
|
691
854
|
/**
|
692
855
|
* Resize the chart
|
856
|
+
* @param {Object} opts
|
857
|
+
* @param {number} [opts.width] Can be 'auto' (the same as null/undefined)
|
858
|
+
* @param {number} [opts.height] Can be 'auto' (the same as null/undefined)
|
693
859
|
*/
|
694
|
-
echartsProto.resize = function () {
|
860
|
+
echartsProto.resize = function (opts) {
|
695
861
|
if (true) {
|
696
862
|
zrUtil.assert(!this[IN_MAIN_PROCESS], '`resize` should not be called during main process.');
|
697
863
|
}
|
698
864
|
|
699
865
|
this[IN_MAIN_PROCESS] = true;
|
700
866
|
|
701
|
-
this._zr.resize();
|
867
|
+
this._zr.resize(opts);
|
702
868
|
|
703
869
|
var optionChanged = this._model && this._model.resetOption('media');
|
704
870
|
updateMethods[optionChanged ? 'prepareAndUpdate' : 'update'].call(this);
|
@@ -1063,7 +1229,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1063
1229
|
}
|
1064
1230
|
|
1065
1231
|
var MOUSE_EVENT_NAMES = [
|
1066
|
-
'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove',
|
1232
|
+
'click', 'dblclick', 'mouseover', 'mouseout', 'mousemove',
|
1233
|
+
'mousedown', 'mouseup', 'globalout', 'contextmenu'
|
1067
1234
|
];
|
1068
1235
|
/**
|
1069
1236
|
* @private
|
@@ -1073,17 +1240,27 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1073
1240
|
this._zr.on(eveName, function (e) {
|
1074
1241
|
var ecModel = this.getModel();
|
1075
1242
|
var el = e.target;
|
1076
|
-
|
1243
|
+
var params;
|
1244
|
+
|
1245
|
+
// no e.target when 'globalout'.
|
1246
|
+
if (eveName === 'globalout') {
|
1247
|
+
params = {};
|
1248
|
+
}
|
1249
|
+
else if (el && el.dataIndex != null) {
|
1077
1250
|
var dataModel = el.dataModel || ecModel.getSeriesByIndex(el.seriesIndex);
|
1078
|
-
|
1079
|
-
params.event = e;
|
1080
|
-
params.type = eveName;
|
1081
|
-
this.trigger(eveName, params);
|
1251
|
+
params = dataModel && dataModel.getDataParams(el.dataIndex, el.dataType) || {};
|
1082
1252
|
}
|
1083
1253
|
// If element has custom eventData of components
|
1084
1254
|
else if (el && el.eventData) {
|
1085
|
-
|
1255
|
+
params = zrUtil.extend({}, el.eventData);
|
1256
|
+
}
|
1257
|
+
|
1258
|
+
if (params) {
|
1259
|
+
params.event = e;
|
1260
|
+
params.type = eveName;
|
1261
|
+
this.trigger(eveName, params);
|
1086
1262
|
}
|
1263
|
+
|
1087
1264
|
}, this);
|
1088
1265
|
}, this);
|
1089
1266
|
|
@@ -1265,9 +1442,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1265
1442
|
/**
|
1266
1443
|
* @type {number}
|
1267
1444
|
*/
|
1268
|
-
version: '3.
|
1445
|
+
version: '3.3.0',
|
1269
1446
|
dependencies: {
|
1270
|
-
zrender: '3.
|
1447
|
+
zrender: '3.2.0'
|
1271
1448
|
}
|
1272
1449
|
};
|
1273
1450
|
|
@@ -1288,12 +1465,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1288
1465
|
if (connectedGroups[chart.group] && chart[STATUS_KEY] !== STATUS_PENDING) {
|
1289
1466
|
var action = chart.makeActionFromEvent(event);
|
1290
1467
|
var otherCharts = [];
|
1291
|
-
|
1292
|
-
|
1468
|
+
|
1469
|
+
zrUtil.each(instances, function (otherChart) {
|
1293
1470
|
if (otherChart !== chart && otherChart.group === chart.group) {
|
1294
1471
|
otherCharts.push(otherChart);
|
1295
1472
|
}
|
1296
|
-
}
|
1473
|
+
});
|
1474
|
+
|
1297
1475
|
updateConnectedChartsStatus(otherCharts, STATUS_PENDING);
|
1298
1476
|
each(otherCharts, function (otherChart) {
|
1299
1477
|
if (otherChart[STATUS_KEY] !== STATUS_UPDATING) {
|
@@ -1310,6 +1488,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1310
1488
|
* @param {HTMLDomElement} dom
|
1311
1489
|
* @param {Object} [theme]
|
1312
1490
|
* @param {Object} opts
|
1491
|
+
* @param {number} [opts.devicePixelRatio] Use window.devicePixelRatio by default
|
1492
|
+
* @param {string} [opts.renderer] Currently only 'canvas' is supported.
|
1493
|
+
* @param {number} [opts.width] Use clientWidth of the input `dom` by default.
|
1494
|
+
* Can be 'auto' (the same as null/undefined)
|
1495
|
+
* @param {number} [opts.height] Use clientHeight of the input `dom` by default.
|
1496
|
+
* Can be 'auto' (the same as null/undefined)
|
1313
1497
|
*/
|
1314
1498
|
echarts.init = function (dom, theme, opts) {
|
1315
1499
|
if (true) {
|
@@ -1755,13 +1939,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1755
1939
|
if (firefox) browser.firefox = true, browser.version = firefox[1];
|
1756
1940
|
// if (safari && (ua.match(/Safari/) || !!os.ios)) browser.safari = true;
|
1757
1941
|
// if (webview) browser.webview = true;
|
1758
|
-
|
1759
|
-
browser.ie = true; browser.version = ie[1];
|
1760
|
-
}
|
1942
|
+
|
1761
1943
|
if (ie) {
|
1762
1944
|
browser.ie = true;
|
1763
1945
|
browser.version = ie[1];
|
1764
1946
|
}
|
1947
|
+
|
1765
1948
|
if (edge) {
|
1766
1949
|
browser.edge = true;
|
1767
1950
|
browser.version = edge[1];
|
@@ -1802,11 +1985,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1802
1985
|
* ECharts global model
|
1803
1986
|
*
|
1804
1987
|
* @module {echarts/model/Global}
|
1805
|
-
*
|
1806
1988
|
*/
|
1807
1989
|
|
1808
1990
|
|
1809
1991
|
|
1992
|
+
/**
|
1993
|
+
* Caution: If the mechanism should be changed some day, these cases
|
1994
|
+
* should be considered:
|
1995
|
+
*
|
1996
|
+
* (1) In `merge option` mode, if using the same option to call `setOption`
|
1997
|
+
* many times, the result should be the same (try our best to ensure that).
|
1998
|
+
* (2) In `merge option` mode, if a component has no id/name specified, it
|
1999
|
+
* will be merged by index, and the result sequence of the components is
|
2000
|
+
* consistent to the original sequence.
|
2001
|
+
* (3) `reset` feature (in toolbox). Find detailed info in comments about
|
2002
|
+
* `mergeOption` in module:echarts/model/OptionManager.
|
2003
|
+
*/
|
2004
|
+
|
1810
2005
|
var zrUtil = __webpack_require__(4);
|
1811
2006
|
var modelUtil = __webpack_require__(5);
|
1812
2007
|
var Model = __webpack_require__(12);
|
@@ -1976,6 +2171,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1976
2171
|
);
|
1977
2172
|
|
1978
2173
|
if (componentModel && componentModel instanceof ComponentModelClass) {
|
2174
|
+
componentModel.name = resultItem.keyInfo.name;
|
1979
2175
|
componentModel.mergeOption(newCptOption, this);
|
1980
2176
|
componentModel.optionUpdated(newCptOption, false);
|
1981
2177
|
}
|
@@ -1991,6 +2187,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
1991
2187
|
componentModel = new ComponentModelClass(
|
1992
2188
|
newCptOption, this, this, extraOpt
|
1993
2189
|
);
|
2190
|
+
zrUtil.extend(componentModel, extraOpt);
|
1994
2191
|
componentModel.init(newCptOption, this, this, extraOpt);
|
1995
2192
|
// Call optionUpdated after init.
|
1996
2193
|
// newCptOption has been used as componentModel.option
|
@@ -2060,9 +2257,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2060
2257
|
* @param {Object} condition
|
2061
2258
|
* @param {string} condition.mainType
|
2062
2259
|
* @param {string} [condition.subType] If ignore, only query by mainType
|
2063
|
-
* @param {number} [condition.index] Either input index or id or name.
|
2064
|
-
* @param {string} [condition.id] Either input index or id or name.
|
2065
|
-
* @param {string} [condition.name] Either input index or id or name.
|
2260
|
+
* @param {number|Array.<number>} [condition.index] Either input index or id or name.
|
2261
|
+
* @param {string|Array.<string>} [condition.id] Either input index or id or name.
|
2262
|
+
* @param {string|Array.<string>} [condition.name] Either input index or id or name.
|
2066
2263
|
* @return {Array.<module:echarts/model/Component>}
|
2067
2264
|
*/
|
2068
2265
|
queryComponents: function (condition) {
|
@@ -2362,21 +2559,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
2362
2559
|
* @inner
|
2363
2560
|
*/
|
2364
2561
|
function mergeTheme(option, theme) {
|
2365
|
-
|
2562
|
+
zrUtil.each(theme, function (themeItem, name) {
|
2366
2563
|
// 如果有 component model 则把具体的 merge 逻辑交给该 model 处理
|
2367
2564
|
if (!ComponentModel.hasClass(name)) {
|
2368
|
-
if (typeof
|
2565
|
+
if (typeof themeItem === 'object') {
|
2369
2566
|
option[name] = !option[name]
|
2370
|
-
? zrUtil.clone(
|
2371
|
-
: zrUtil.merge(option[name],
|
2567
|
+
? zrUtil.clone(themeItem)
|
2568
|
+
: zrUtil.merge(option[name], themeItem, false);
|
2372
2569
|
}
|
2373
2570
|
else {
|
2374
2571
|
if (option[name] == null) {
|
2375
|
-
option[name] =
|
2572
|
+
option[name] = themeItem;
|
2376
2573
|
}
|
2377
2574
|
}
|
2378
2575
|
}
|
2379
|
-
}
|
2576
|
+
});
|
2380
2577
|
}
|
2381
2578
|
|
2382
2579
|
function initBase(baseOption) {
|
@@ -3435,6 +3632,113 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3435
3632
|
}
|
3436
3633
|
};
|
3437
3634
|
|
3635
|
+
/**
|
3636
|
+
* @param {module:echarts/data/List} data
|
3637
|
+
* @param {Object} payload Contains dataIndex (means rawIndex) / dataIndexInside / name
|
3638
|
+
* each of which can be Array or primary type.
|
3639
|
+
* @return {number|Array.<number>} dataIndex If not found, return undefined/null.
|
3640
|
+
*/
|
3641
|
+
modelUtil.queryDataIndex = function (data, payload) {
|
3642
|
+
if (payload.dataIndexInside != null) {
|
3643
|
+
return payload.dataIndexInside;
|
3644
|
+
}
|
3645
|
+
else if (payload.dataIndex != null) {
|
3646
|
+
return zrUtil.isArray(payload.dataIndex)
|
3647
|
+
? zrUtil.map(payload.dataIndex, function (value) {
|
3648
|
+
return data.indexOfRawIndex(value);
|
3649
|
+
})
|
3650
|
+
: data.indexOfRawIndex(payload.dataIndex);
|
3651
|
+
}
|
3652
|
+
else if (payload.name != null) {
|
3653
|
+
return zrUtil.isArray(payload.name)
|
3654
|
+
? zrUtil.map(payload.name, function (value) {
|
3655
|
+
return data.indexOfName(value);
|
3656
|
+
})
|
3657
|
+
: data.indexOfName(payload.name);
|
3658
|
+
}
|
3659
|
+
};
|
3660
|
+
|
3661
|
+
/**
|
3662
|
+
* @param {module:echarts/model/Global} ecModel
|
3663
|
+
* @param {string|Object} finder
|
3664
|
+
* If string, e.g., 'geo', means {geoIndex: 0}.
|
3665
|
+
* If Object, could contain some of these properties below:
|
3666
|
+
* {
|
3667
|
+
* seriesIndex, seriesId, seriesName,
|
3668
|
+
* geoIndex, geoId, goeName,
|
3669
|
+
* bmapIndex, bmapId, bmapName,
|
3670
|
+
* xAxisIndex, xAxisId, xAxisName,
|
3671
|
+
* yAxisIndex, yAxisId, yAxisName,
|
3672
|
+
* gridIndex, gridId, gridName,
|
3673
|
+
* ... (can be extended)
|
3674
|
+
* }
|
3675
|
+
* Each properties can be number|string|Array.<number>|Array.<string>
|
3676
|
+
* For example, a finder could be
|
3677
|
+
* {
|
3678
|
+
* seriesIndex: 3,
|
3679
|
+
* geoId: ['aa', 'cc'],
|
3680
|
+
* gridName: ['xx', 'rr']
|
3681
|
+
* }
|
3682
|
+
* @param {Object} [opt]
|
3683
|
+
* @param {string} [opt.defaultMainType]
|
3684
|
+
* @return {Object} result like:
|
3685
|
+
* {
|
3686
|
+
* seriesModels: [seriesModel1, seriesModel2],
|
3687
|
+
* seriesModel: seriesModel1, // The first model
|
3688
|
+
* geoModels: [geoModel1, geoModel2],
|
3689
|
+
* geoModel: geoModel1, // The first model
|
3690
|
+
* ...
|
3691
|
+
* }
|
3692
|
+
*/
|
3693
|
+
modelUtil.parseFinder = function (ecModel, finder, opt) {
|
3694
|
+
if (zrUtil.isString(finder)) {
|
3695
|
+
var obj = {};
|
3696
|
+
obj[finder + 'Index'] = 0;
|
3697
|
+
finder = obj;
|
3698
|
+
}
|
3699
|
+
|
3700
|
+
var defaultMainType = opt && opt.defaultMainType;
|
3701
|
+
if (defaultMainType
|
3702
|
+
&& !has(finder, defaultMainType + 'Index')
|
3703
|
+
&& !has(finder, defaultMainType + 'Id')
|
3704
|
+
&& !has(finder, defaultMainType + 'Name')
|
3705
|
+
) {
|
3706
|
+
finder[defaultMainType + 'Index'] = 0;
|
3707
|
+
}
|
3708
|
+
|
3709
|
+
var result = {};
|
3710
|
+
|
3711
|
+
zrUtil.each(finder, function (value, key) {
|
3712
|
+
var value = finder[key];
|
3713
|
+
|
3714
|
+
// Exclude 'dataIndex' and other illgal keys.
|
3715
|
+
if (key === 'dataIndex' || key === 'dataIndexInside') {
|
3716
|
+
result[key] = value;
|
3717
|
+
return;
|
3718
|
+
}
|
3719
|
+
|
3720
|
+
var parsedKey = key.match(/^(\w+)(Index|Id|Name)$/) || [];
|
3721
|
+
var mainType = parsedKey[1];
|
3722
|
+
var queryType = parsedKey[2];
|
3723
|
+
|
3724
|
+
if (!mainType || !queryType) {
|
3725
|
+
return;
|
3726
|
+
}
|
3727
|
+
|
3728
|
+
var queryParam = {mainType: mainType};
|
3729
|
+
queryParam[queryType.toLowerCase()] = value;
|
3730
|
+
var models = ecModel.queryComponents(queryParam);
|
3731
|
+
result[mainType + 'Models'] = models;
|
3732
|
+
result[mainType + 'Model'] = models[0];
|
3733
|
+
});
|
3734
|
+
|
3735
|
+
return result;
|
3736
|
+
};
|
3737
|
+
|
3738
|
+
function has(obj, prop) {
|
3739
|
+
return obj && obj.hasOwnProperty(prop);
|
3740
|
+
}
|
3741
|
+
|
3438
3742
|
module.exports = modelUtil;
|
3439
3743
|
|
3440
3744
|
|
@@ -3723,7 +4027,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
3723
4027
|
if (precision == null) {
|
3724
4028
|
precision = 10;
|
3725
4029
|
}
|
3726
|
-
//
|
4030
|
+
// Avoid range error
|
4031
|
+
precision = Math.min(Math.max(0, precision), 20);
|
3727
4032
|
return +(+x).toFixed(precision);
|
3728
4033
|
};
|
3729
4034
|
|
@@ -4166,6 +4471,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4166
4471
|
* @alias module:echarts/core/BoundingRect
|
4167
4472
|
*/
|
4168
4473
|
function BoundingRect(x, y, width, height) {
|
4474
|
+
|
4475
|
+
if (width < 0) {
|
4476
|
+
x = x + width;
|
4477
|
+
width = -width;
|
4478
|
+
}
|
4479
|
+
if (height < 0) {
|
4480
|
+
y = y + height;
|
4481
|
+
height = -height;
|
4482
|
+
}
|
4483
|
+
|
4169
4484
|
/**
|
4170
4485
|
* @type {number}
|
4171
4486
|
*/
|
@@ -4261,6 +4576,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4261
4576
|
* @return {boolean}
|
4262
4577
|
*/
|
4263
4578
|
intersect: function (b) {
|
4579
|
+
if (!(b instanceof BoundingRect)) {
|
4580
|
+
// Normalize negative width/height.
|
4581
|
+
b = BoundingRect.create(b);
|
4582
|
+
}
|
4583
|
+
|
4264
4584
|
var a = this;
|
4265
4585
|
var ax0 = a.x;
|
4266
4586
|
var ax1 = a.x + a.width;
|
@@ -4298,9 +4618,30 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4298
4618
|
this.y = other.y;
|
4299
4619
|
this.width = other.width;
|
4300
4620
|
this.height = other.height;
|
4621
|
+
},
|
4622
|
+
|
4623
|
+
plain: function () {
|
4624
|
+
return {
|
4625
|
+
x: this.x,
|
4626
|
+
y: this.y,
|
4627
|
+
width: this.width,
|
4628
|
+
height: this.height
|
4629
|
+
};
|
4301
4630
|
}
|
4302
4631
|
};
|
4303
4632
|
|
4633
|
+
/**
|
4634
|
+
* @param {Object|module:zrender/core/BoundingRect} rect
|
4635
|
+
* @param {number} rect.x
|
4636
|
+
* @param {number} rect.y
|
4637
|
+
* @param {number} rect.width
|
4638
|
+
* @param {number} rect.height
|
4639
|
+
* @return {module:zrender/core/BoundingRect}
|
4640
|
+
*/
|
4641
|
+
BoundingRect.create = function (rect) {
|
4642
|
+
return new BoundingRect(rect.x, rect.y, rect.width, rect.height);
|
4643
|
+
};
|
4644
|
+
|
4304
4645
|
module.exports = BoundingRect;
|
4305
4646
|
|
4306
4647
|
|
@@ -4943,10 +5284,22 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
4943
5284
|
/**
|
4944
5285
|
* @public
|
4945
5286
|
*/
|
4946
|
-
clazz.enableClassExtend = function (RootClass) {
|
5287
|
+
clazz.enableClassExtend = function (RootClass, mandatoryMethods) {
|
4947
5288
|
|
4948
5289
|
RootClass.$constructor = RootClass;
|
4949
5290
|
RootClass.extend = function (proto) {
|
5291
|
+
|
5292
|
+
if (true) {
|
5293
|
+
zrUtil.each(mandatoryMethods, function (method) {
|
5294
|
+
if (!proto[method]) {
|
5295
|
+
console.warn(
|
5296
|
+
'Method `' + method + '` should be implemented'
|
5297
|
+
+ (proto.type ? ' in ' + proto.type : '') + '.'
|
5298
|
+
);
|
5299
|
+
}
|
5300
|
+
});
|
5301
|
+
}
|
5302
|
+
|
4950
5303
|
var superClass = this;
|
4951
5304
|
var ExtendedClass = function () {
|
4952
5305
|
if (!proto.$constructor) {
|
@@ -5152,15 +5505,20 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
5152
5505
|
module.exports = {
|
5153
5506
|
getLineStyle: function (excludes) {
|
5154
5507
|
var style = getLineStyle.call(this, excludes);
|
5155
|
-
var lineDash = this.getLineDash();
|
5508
|
+
var lineDash = this.getLineDash(style.lineWidth);
|
5156
5509
|
lineDash && (style.lineDash = lineDash);
|
5157
5510
|
return style;
|
5158
5511
|
},
|
5159
5512
|
|
5160
|
-
getLineDash: function () {
|
5513
|
+
getLineDash: function (lineWidth) {
|
5514
|
+
if (lineWidth == null) {
|
5515
|
+
lineWidth = 1;
|
5516
|
+
}
|
5161
5517
|
var lineType = this.get('type');
|
5518
|
+
var dotSize = Math.max(lineWidth, 2);
|
5519
|
+
var dashSize = lineWidth * 4;
|
5162
5520
|
return (lineType === 'solid' || lineType == null) ? null
|
5163
|
-
: (lineType === 'dashed' ? [
|
5521
|
+
: (lineType === 'dashed' ? [dashSize, dashSize] : [dotSize, dotSize]);
|
5164
5522
|
}
|
5165
5523
|
};
|
5166
5524
|
|
@@ -5288,7 +5646,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
5288
5646
|
['shadowBlur'],
|
5289
5647
|
['shadowOffsetX'],
|
5290
5648
|
['shadowOffsetY'],
|
5291
|
-
['shadowColor']
|
5649
|
+
['shadowColor'],
|
5650
|
+
['textPosition'],
|
5651
|
+
['textAlign']
|
5292
5652
|
]
|
5293
5653
|
);
|
5294
5654
|
module.exports = {
|
@@ -5402,9 +5762,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
5402
5762
|
$constructor: function (option, parentModel, ecModel, extraOpt) {
|
5403
5763
|
Model.call(this, option, parentModel, ecModel, extraOpt);
|
5404
5764
|
|
5405
|
-
// Set dependentModels, componentIndex, name, id, mainType, subType.
|
5406
|
-
zrUtil.extend(this, extraOpt);
|
5407
|
-
|
5408
5765
|
this.uid = componentUtil.getUID('componentModel');
|
5409
5766
|
},
|
5410
5767
|
|
@@ -5427,7 +5784,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
5427
5784
|
}
|
5428
5785
|
},
|
5429
5786
|
|
5430
|
-
mergeOption: function (option) {
|
5787
|
+
mergeOption: function (option, extraOpt) {
|
5431
5788
|
zrUtil.merge(this.option, option, true);
|
5432
5789
|
|
5433
5790
|
var layoutMode = this.layoutMode;
|
@@ -5456,6 +5813,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
5456
5813
|
this.__defaultOption = defaultOption;
|
5457
5814
|
}
|
5458
5815
|
return this.__defaultOption;
|
5816
|
+
},
|
5817
|
+
|
5818
|
+
getReferringComponents: function (mainType) {
|
5819
|
+
return this.ecModel.queryComponents({
|
5820
|
+
mainType: mainType,
|
5821
|
+
index: this.get(mainType + 'Index', true),
|
5822
|
+
id: this.get(mainType + 'Id', true)
|
5823
|
+
});
|
5459
5824
|
}
|
5460
5825
|
|
5461
5826
|
});
|
@@ -6223,11 +6588,41 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
6223
6588
|
|
6224
6589
|
/***/ },
|
6225
6590
|
/* 26 */
|
6226
|
-
/***/ function(module, exports) {
|
6591
|
+
/***/ function(module, exports, __webpack_require__) {
|
6227
6592
|
|
6228
6593
|
'use strict';
|
6229
6594
|
|
6230
6595
|
|
6596
|
+
var zrUtil = __webpack_require__(4);
|
6597
|
+
|
6598
|
+
/**
|
6599
|
+
* Interface of Coordinate System Class
|
6600
|
+
*
|
6601
|
+
* create:
|
6602
|
+
* @param {module:echarts/model/Global} ecModel
|
6603
|
+
* @param {module:echarts/ExtensionAPI} api
|
6604
|
+
* @return {Object} coordinate system instance
|
6605
|
+
*
|
6606
|
+
* update:
|
6607
|
+
* @param {module:echarts/model/Global} ecModel
|
6608
|
+
* @param {module:echarts/ExtensionAPI} api
|
6609
|
+
*
|
6610
|
+
* convertToPixel:
|
6611
|
+
* convertFromPixel:
|
6612
|
+
* These two methods is also responsible for determine whether this
|
6613
|
+
* coodinate system is applicable to the given `finder`.
|
6614
|
+
* Each coordinate system will be tried, util one returns none
|
6615
|
+
* null/undefined value.
|
6616
|
+
* @param {module:echarts/model/Global} ecModel
|
6617
|
+
* @param {Object} finder
|
6618
|
+
* @param {Array|number} value
|
6619
|
+
* @return {Array|number} convert result.
|
6620
|
+
*
|
6621
|
+
* containPoint:
|
6622
|
+
* @param {Array.<number>} point In pixel coordinate system.
|
6623
|
+
* @return {boolean}
|
6624
|
+
*/
|
6625
|
+
|
6231
6626
|
var coordinateSystemCreators = {};
|
6232
6627
|
|
6233
6628
|
function CoordinateSystemManager() {
|
@@ -6241,20 +6636,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
6241
6636
|
|
6242
6637
|
create: function (ecModel, api) {
|
6243
6638
|
var coordinateSystems = [];
|
6244
|
-
|
6245
|
-
var list =
|
6246
|
-
|
6247
|
-
}
|
6639
|
+
zrUtil.each(coordinateSystemCreators, function (creater, type) {
|
6640
|
+
var list = creater.create(ecModel, api);
|
6641
|
+
coordinateSystems = coordinateSystems.concat(list || []);
|
6642
|
+
});
|
6248
6643
|
|
6249
6644
|
this._coordinateSystems = coordinateSystems;
|
6250
6645
|
},
|
6251
6646
|
|
6252
6647
|
update: function (ecModel, api) {
|
6253
|
-
|
6254
|
-
for (var i = 0; i < coordinateSystems.length; i++) {
|
6648
|
+
zrUtil.each(this._coordinateSystems, function (coordSys) {
|
6255
6649
|
// FIXME MUST have
|
6256
|
-
|
6257
|
-
}
|
6650
|
+
coordSys.update && coordSys.update(ecModel, api);
|
6651
|
+
});
|
6652
|
+
},
|
6653
|
+
|
6654
|
+
getCoordinateSystems: function () {
|
6655
|
+
return this._coordinateSystems.slice();
|
6258
6656
|
}
|
6259
6657
|
};
|
6260
6658
|
|
@@ -6900,21 +7298,27 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
6900
7298
|
*/
|
6901
7299
|
formatTooltip: function (dataIndex, multipleSeries, dataType) {
|
6902
7300
|
function formatArrayValue(value) {
|
6903
|
-
|
7301
|
+
var result = [];
|
7302
|
+
|
7303
|
+
zrUtil.each(value, function (val, idx) {
|
6904
7304
|
var dimInfo = data.getDimensionInfo(idx);
|
6905
7305
|
var dimType = dimInfo && dimInfo.type;
|
7306
|
+
var valStr;
|
7307
|
+
|
6906
7308
|
if (dimType === 'ordinal') {
|
6907
|
-
|
7309
|
+
valStr = val + '';
|
6908
7310
|
}
|
6909
7311
|
else if (dimType === 'time') {
|
6910
|
-
|
7312
|
+
valStr = multipleSeries ? '' : formatUtil.formatTime('yyyy/mm/dd hh:mm:ss', val);
|
6911
7313
|
}
|
6912
7314
|
else {
|
6913
|
-
|
7315
|
+
valStr = addCommas(val);
|
6914
7316
|
}
|
6915
|
-
|
6916
|
-
|
6917
|
-
})
|
7317
|
+
|
7318
|
+
valStr && result.push(valStr);
|
7319
|
+
});
|
7320
|
+
|
7321
|
+
return result.join(', ');
|
6918
7322
|
}
|
6919
7323
|
|
6920
7324
|
var data = this._data;
|
@@ -6973,7 +7377,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
6973
7377
|
return color;
|
6974
7378
|
},
|
6975
7379
|
|
6976
|
-
|
7380
|
+
/**
|
7381
|
+
* Get data indices for show tooltip content. See tooltip.
|
7382
|
+
* @abstract
|
7383
|
+
* @param {Array.<string>|string} dim
|
7384
|
+
* @param {Array.<number>} value
|
7385
|
+
* @param {module:echarts/coord/single/SingleAxis} baseAxis
|
7386
|
+
* @return {Array.<number>} data indices.
|
7387
|
+
*/
|
7388
|
+
getAxisTooltipDataIndex: null,
|
7389
|
+
|
7390
|
+
/**
|
7391
|
+
* See tooltip.
|
7392
|
+
* @abstract
|
7393
|
+
* @param {number} dataIndex
|
7394
|
+
* @return {Array.<number>} Point of tooltip. null/undefined can be returned.
|
7395
|
+
*/
|
7396
|
+
getTooltipPosition: null
|
6977
7397
|
});
|
6978
7398
|
|
6979
7399
|
zrUtil.mixin(SeriesModel, modelUtil.dataFormatMixin);
|
@@ -7015,6 +7435,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7015
7435
|
render: function (componentModel, ecModel, api, payload) {},
|
7016
7436
|
|
7017
7437
|
dispose: function () {}
|
7438
|
+
|
7018
7439
|
};
|
7019
7440
|
|
7020
7441
|
var componentProto = Component.prototype;
|
@@ -7074,7 +7495,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
7074
7495
|
Element.call(this, opts);
|
7075
7496
|
|
7076
7497
|
for (var key in opts) {
|
7077
|
-
|
7498
|
+
if (opts.hasOwnProperty(key)) {
|
7499
|
+
this[key] = opts[key];
|
7500
|
+
}
|
7078
7501
|
}
|
7079
7502
|
|
7080
7503
|
this._children = [];
|
@@ -8420,6 +8843,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8420
8843
|
var objShallow = {};
|
8421
8844
|
var propertyCount = 0;
|
8422
8845
|
for (var name in target) {
|
8846
|
+
if (!target.hasOwnProperty(name)) {
|
8847
|
+
continue;
|
8848
|
+
}
|
8849
|
+
|
8423
8850
|
if (source[name] != null) {
|
8424
8851
|
if (isObject(target[name]) && !util.isArrayLike(target[name])) {
|
8425
8852
|
this._animateToShallow(
|
@@ -8941,6 +9368,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
8941
9368
|
when: function(time /* ms */, props) {
|
8942
9369
|
var tracks = this._tracks;
|
8943
9370
|
for (var propName in props) {
|
9371
|
+
if (!props.hasOwnProperty(propName)) {
|
9372
|
+
continue;
|
9373
|
+
}
|
9374
|
+
|
8944
9375
|
if (!tracks[propName]) {
|
8945
9376
|
tracks[propName] = [];
|
8946
9377
|
// Invalid value
|
@@ -9009,6 +9440,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
9009
9440
|
|
9010
9441
|
var lastClip;
|
9011
9442
|
for (var propName in this._tracks) {
|
9443
|
+
if (!this._tracks.hasOwnProperty(propName)) {
|
9444
|
+
continue;
|
9445
|
+
}
|
9012
9446
|
var clip = createTrackClip(
|
9013
9447
|
this, easing, oneTrackDone,
|
9014
9448
|
this._tracks[propName], propName
|
@@ -10069,7 +10503,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
10069
10503
|
return function(mes) {
|
10070
10504
|
document.getElementById('wrong-message').innerHTML =
|
10071
10505
|
mes + ' ' + (new Date() - 0)
|
10072
|
-
+ '<br/>'
|
10506
|
+
+ '<br/>'
|
10073
10507
|
+ document.getElementById('wrong-message').innerHTML;
|
10074
10508
|
};
|
10075
10509
|
*/
|
@@ -10117,6 +10551,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
10117
10551
|
var Group = __webpack_require__(30);
|
10118
10552
|
var componentUtil = __webpack_require__(20);
|
10119
10553
|
var clazzUtil = __webpack_require__(13);
|
10554
|
+
var modelUtil = __webpack_require__(5);
|
10555
|
+
var zrUtil = __webpack_require__(4);
|
10120
10556
|
|
10121
10557
|
function Chart() {
|
10122
10558
|
|
@@ -10190,6 +10626,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
10190
10626
|
* @param {module:echarts/ExtensionAPI} api
|
10191
10627
|
*/
|
10192
10628
|
dispose: function () {}
|
10629
|
+
|
10630
|
+
/**
|
10631
|
+
* The view contains the given point.
|
10632
|
+
* @interface
|
10633
|
+
* @param {Array.<number>} point
|
10634
|
+
* @return {boolean}
|
10635
|
+
*/
|
10636
|
+
// containPoint: function () {}
|
10637
|
+
|
10193
10638
|
};
|
10194
10639
|
|
10195
10640
|
var chartProto = Chart.prototype;
|
@@ -10222,21 +10667,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
10222
10667
|
* @inner
|
10223
10668
|
*/
|
10224
10669
|
function toggleHighlight(data, payload, state) {
|
10225
|
-
var dataIndex =
|
10226
|
-
var name = payload && payload.name;
|
10670
|
+
var dataIndex = modelUtil.queryDataIndex(data, payload);
|
10227
10671
|
|
10228
10672
|
if (dataIndex != null) {
|
10229
|
-
|
10230
|
-
|
10231
|
-
|
10232
|
-
}
|
10233
|
-
}
|
10234
|
-
else if (name) {
|
10235
|
-
var names = name instanceof Array ? name : [name];
|
10236
|
-
for (var i = 0, len = names.length; i < len; i++) {
|
10237
|
-
var dataIndex = data.indexOfName(names[i]);
|
10238
|
-
elSetState(data.getItemGraphicEl(dataIndex), state);
|
10239
|
-
}
|
10673
|
+
zrUtil.each(modelUtil.normalizeToArray(dataIndex), function (dataIdx) {
|
10674
|
+
elSetState(data.getItemGraphicEl(dataIdx), state);
|
10675
|
+
});
|
10240
10676
|
}
|
10241
10677
|
else {
|
10242
10678
|
data.eachItemGraphicEl(function (el) {
|
@@ -10246,7 +10682,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
10246
10682
|
}
|
10247
10683
|
|
10248
10684
|
// Enable Chart.extend.
|
10249
|
-
clazzUtil.enableClassExtend(Chart);
|
10685
|
+
clazzUtil.enableClassExtend(Chart, ['dispose']);
|
10250
10686
|
|
10251
10687
|
// Add capability of registerClass, getClass, hasClass, registerSubTypeDefaulter and so on.
|
10252
10688
|
clazzUtil.enableClassManagement(Chart, {registerWhenExtend: true});
|
@@ -11505,7 +11941,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
11505
11941
|
if (shape) {
|
11506
11942
|
if (zrUtil.isObject(key)) {
|
11507
11943
|
for (var name in key) {
|
11508
|
-
|
11944
|
+
if (key.hasOwnProperty(name)) {
|
11945
|
+
shape[name] = key[name];
|
11946
|
+
}
|
11509
11947
|
}
|
11510
11948
|
}
|
11511
11949
|
else {
|
@@ -16177,10 +16615,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16177
16615
|
var instances = {}; // ZRender实例map索引
|
16178
16616
|
|
16179
16617
|
var zrender = {};
|
16618
|
+
|
16180
16619
|
/**
|
16181
16620
|
* @type {string}
|
16182
16621
|
*/
|
16183
|
-
zrender.version = '3.
|
16622
|
+
zrender.version = '3.2.0';
|
16184
16623
|
|
16185
16624
|
/**
|
16186
16625
|
* Initializing a zrender instance
|
@@ -16188,6 +16627,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16188
16627
|
* @param {Object} opts
|
16189
16628
|
* @param {string} [opts.renderer='canvas'] 'canvas' or 'svg'
|
16190
16629
|
* @param {number} [opts.devicePixelRatio]
|
16630
|
+
* @param {number|string} [opts.width] Can be 'auto' (the same as null/undefined)
|
16631
|
+
* @param {number|string} [opts.height] Can be 'auto' (the same as null/undefined)
|
16191
16632
|
* @return {module:zrender/ZRender}
|
16192
16633
|
*/
|
16193
16634
|
zrender.init = function(dom, opts) {
|
@@ -16206,7 +16647,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16206
16647
|
}
|
16207
16648
|
else {
|
16208
16649
|
for (var key in instances) {
|
16209
|
-
instances
|
16650
|
+
if (instances.hasOwnProperty(key)) {
|
16651
|
+
instances[key].dispose();
|
16652
|
+
}
|
16210
16653
|
}
|
16211
16654
|
instances = {};
|
16212
16655
|
}
|
@@ -16242,6 +16685,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16242
16685
|
* @param {Object} opts
|
16243
16686
|
* @param {string} [opts.renderer='canvas'] 'canvas' or 'svg'
|
16244
16687
|
* @param {number} [opts.devicePixelRatio]
|
16688
|
+
* @param {number} [opts.width] Can be 'auto' (the same as null/undefined)
|
16689
|
+
* @param {number} [opts.height] Can be 'auto' (the same as null/undefined)
|
16245
16690
|
*/
|
16246
16691
|
var ZRender = function(id, dom, opts) {
|
16247
16692
|
|
@@ -16276,7 +16721,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16276
16721
|
this.painter = painter;
|
16277
16722
|
|
16278
16723
|
var handerProxy = !env.node ? new HandlerProxy(painter.getViewportRoot()) : null;
|
16279
|
-
this.handler = new Handler(storage, painter, handerProxy);
|
16724
|
+
this.handler = new Handler(storage, painter, handerProxy, painter.root);
|
16280
16725
|
|
16281
16726
|
/**
|
16282
16727
|
* @type {module:zrender/animation/Animation}
|
@@ -16436,9 +16881,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16436
16881
|
/**
|
16437
16882
|
* Resize the canvas.
|
16438
16883
|
* Should be invoked when container size is changed
|
16884
|
+
* @param {Object} [opts]
|
16885
|
+
* @param {number|string} [opts.width] Can be 'auto' (the same as null/undefined)
|
16886
|
+
* @param {number|string} [opts.height] Can be 'auto' (the same as null/undefined)
|
16439
16887
|
*/
|
16440
|
-
resize: function() {
|
16441
|
-
|
16888
|
+
resize: function(opts) {
|
16889
|
+
opts = opts || {};
|
16890
|
+
this.painter.resize(opts.width, opts.height);
|
16442
16891
|
this.handler.resize();
|
16443
16892
|
},
|
16444
16893
|
|
@@ -16598,24 +17047,28 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16598
17047
|
|
16599
17048
|
var handlerNames = [
|
16600
17049
|
'click', 'dblclick', 'mousewheel', 'mouseout',
|
16601
|
-
'mouseup', 'mousedown', 'mousemove'
|
17050
|
+
'mouseup', 'mousedown', 'mousemove', 'contextmenu'
|
16602
17051
|
];
|
16603
17052
|
/**
|
16604
17053
|
* @alias module:zrender/Handler
|
16605
17054
|
* @constructor
|
16606
17055
|
* @extends module:zrender/mixin/Eventful
|
16607
|
-
* @param {HTMLElement} root Main HTML element for painting.
|
16608
17056
|
* @param {module:zrender/Storage} storage Storage instance.
|
16609
17057
|
* @param {module:zrender/Painter} painter Painter instance.
|
17058
|
+
* @param {module:zrender/dom/HandlerProxy} proxy HandlerProxy instance.
|
17059
|
+
* @param {HTMLElement} painterRoot painter.root (not painter.getViewportRoot()).
|
16610
17060
|
*/
|
16611
|
-
var Handler = function(storage, painter, proxy) {
|
17061
|
+
var Handler = function(storage, painter, proxy, painterRoot) {
|
16612
17062
|
Eventful.call(this);
|
16613
17063
|
|
16614
17064
|
this.storage = storage;
|
16615
17065
|
|
16616
17066
|
this.painter = painter;
|
16617
17067
|
|
17068
|
+
this.painterRoot = painterRoot;
|
17069
|
+
|
16618
17070
|
proxy = proxy || new EmptyProxy();
|
17071
|
+
|
16619
17072
|
/**
|
16620
17073
|
* Proxy of event. can be Dom, WebGLSurface, etc.
|
16621
17074
|
*/
|
@@ -16689,9 +17142,21 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16689
17142
|
mouseout: function (event) {
|
16690
17143
|
this.dispatchToElement(this._hovered, 'mouseout', event);
|
16691
17144
|
|
16692
|
-
|
16693
|
-
|
16694
|
-
|
17145
|
+
// There might be some doms created by upper layer application
|
17146
|
+
// at the same level of painter.getViewportRoot() (e.g., tooltip
|
17147
|
+
// dom created by echarts), where 'globalout' event should not
|
17148
|
+
// be triggered when mouse enters these doms. (But 'mouseout'
|
17149
|
+
// should be triggered at the original hovered element as usual).
|
17150
|
+
var element = event.toElement || event.relatedTarget;
|
17151
|
+
var innerDom;
|
17152
|
+
do {
|
17153
|
+
element = element && element.parentNode;
|
17154
|
+
}
|
17155
|
+
while (element && element.nodeType != 9 && !(
|
17156
|
+
innerDom = element === this.painterRoot
|
17157
|
+
));
|
17158
|
+
|
17159
|
+
!innerDom && this.trigger('globalout', {event: event});
|
16695
17160
|
},
|
16696
17161
|
|
16697
17162
|
/**
|
@@ -16797,7 +17262,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
16797
17262
|
};
|
16798
17263
|
|
16799
17264
|
// Common handlers
|
16800
|
-
util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick'], function (name) {
|
17265
|
+
util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) {
|
16801
17266
|
Handler.prototype[name] = function (event) {
|
16802
17267
|
// Find hover again to avoid click event is dispatched manually. Or click is triggered without mouseover
|
16803
17268
|
var hovered = this.findHover(event.zrX, event.zrY, null);
|
@@ -18155,6 +18620,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18155
18620
|
|
18156
18621
|
|
18157
18622
|
var Eventful = __webpack_require__(33);
|
18623
|
+
var env = __webpack_require__(2);
|
18158
18624
|
|
18159
18625
|
var isDomLevel2 = (typeof window !== 'undefined') && !!window.addEventListener;
|
18160
18626
|
|
@@ -18164,12 +18630,51 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18164
18630
|
}
|
18165
18631
|
|
18166
18632
|
function clientToLocal(el, e, out) {
|
18167
|
-
//
|
18633
|
+
// According to the W3C Working Draft, offsetX and offsetY should be relative
|
18634
|
+
// to the padding edge of the target element. The only browser using this convention
|
18635
|
+
// is IE. Webkit uses the border edge, Opera uses the content edge, and FireFox does
|
18636
|
+
// not support the properties.
|
18637
|
+
// (see http://www.jacklmoore.com/notes/mouse-position/)
|
18638
|
+
// In zr painter.dom, padding edge equals to border edge.
|
18639
|
+
|
18640
|
+
// FIXME
|
18641
|
+
// When mousemove event triggered on ec tooltip, target is not zr painter.dom, and
|
18642
|
+
// offsetX/Y is relative to e.target, where the calculation of zrX/Y via offsetX/Y
|
18643
|
+
// is too complex. So css-transfrom dont support in this case temporarily.
|
18644
|
+
|
18645
|
+
if (!e.currentTarget || el !== e.currentTarget) {
|
18646
|
+
defaultGetZrXY(el, e, out);
|
18647
|
+
}
|
18648
|
+
// Caution: In FireFox, layerX/layerY Mouse position relative to the closest positioned
|
18649
|
+
// ancestor element, so we should make sure el is positioned (e.g., not position:static).
|
18650
|
+
// BTW1, Webkit don't return the same results as FF in non-simple cases (like add
|
18651
|
+
// zoom-factor, overflow / opacity layers, transforms ...)
|
18652
|
+
// BTW2, (ev.offsetY || ev.pageY - $(ev.target).offset().top) is not correct in preserve-3d.
|
18653
|
+
// <https://bugs.jquery.com/ticket/8523#comment:14>
|
18654
|
+
// BTW3, In ff, offsetX/offsetY is always 0.
|
18655
|
+
else if (env.browser.firefox && e.layerX != null && e.layerX !== e.offsetX) {
|
18656
|
+
out.zrX = e.layerX;
|
18657
|
+
out.zrY = e.layerY;
|
18658
|
+
}
|
18659
|
+
// For IE6+, chrome, safari, opera. (When will ff support offsetX?)
|
18660
|
+
else if (e.offsetX != null) {
|
18661
|
+
out.zrX = e.offsetX;
|
18662
|
+
out.zrY = e.offsetY;
|
18663
|
+
}
|
18664
|
+
// For some other device, e.g., IOS safari.
|
18665
|
+
else {
|
18666
|
+
defaultGetZrXY(el, e, out);
|
18667
|
+
}
|
18668
|
+
|
18669
|
+
return out;
|
18670
|
+
}
|
18671
|
+
|
18672
|
+
function defaultGetZrXY(el, e, out) {
|
18673
|
+
// This well-known method below does not support css transform.
|
18168
18674
|
var box = getBoundingClientRect(el);
|
18169
18675
|
out = out || {};
|
18170
18676
|
out.zrX = e.clientX - box.left;
|
18171
18677
|
out.zrY = e.clientY - box.top;
|
18172
|
-
return out;
|
18173
18678
|
}
|
18174
18679
|
|
18175
18680
|
/**
|
@@ -18285,7 +18790,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18285
18790
|
|
18286
18791
|
var mouseHandlerNames = [
|
18287
18792
|
'click', 'dblclick', 'mousewheel', 'mouseout',
|
18288
|
-
'mouseup', 'mousedown', 'mousemove'
|
18793
|
+
'mouseup', 'mousedown', 'mousemove', 'contextmenu'
|
18289
18794
|
];
|
18290
18795
|
|
18291
18796
|
var touchHandlerNames = [
|
@@ -18440,7 +18945,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18440
18945
|
};
|
18441
18946
|
|
18442
18947
|
// Common handlers
|
18443
|
-
zrUtil.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick'], function (name) {
|
18948
|
+
zrUtil.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) {
|
18444
18949
|
domHandlers[name] = function (event) {
|
18445
18950
|
event = normalizeEvent(this.dom, event);
|
18446
18951
|
this.trigger(name, event);
|
@@ -18771,13 +19276,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18771
19276
|
|
18772
19277
|
function createRoot(width, height) {
|
18773
19278
|
var domRoot = document.createElement('div');
|
18774
|
-
var domRootStyle = domRoot.style;
|
18775
19279
|
|
18776
19280
|
// domRoot.onselectstart = returnFalse; // 避免页面选中的尴尬
|
18777
|
-
|
18778
|
-
|
18779
|
-
|
18780
|
-
|
19281
|
+
domRoot.style.cssText = [
|
19282
|
+
'position:relative',
|
19283
|
+
'overflow:hidden',
|
19284
|
+
'width:' + width + 'px',
|
19285
|
+
'height:' + height + 'px',
|
19286
|
+
'padding:0',
|
19287
|
+
'margin:0',
|
19288
|
+
'border-width:0'
|
19289
|
+
].join(';') + ';';
|
19290
|
+
|
18781
19291
|
return domRoot;
|
18782
19292
|
}
|
18783
19293
|
|
@@ -18793,7 +19303,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18793
19303
|
var singleCanvas = !root.nodeName // In node ?
|
18794
19304
|
|| root.nodeName.toUpperCase() === 'CANVAS';
|
18795
19305
|
|
18796
|
-
opts = opts || {};
|
19306
|
+
this._opts = opts = util.extend({}, opts || {});
|
18797
19307
|
|
18798
19308
|
/**
|
18799
19309
|
* @type {number}
|
@@ -18845,8 +19355,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
18845
19355
|
this._layerConfig = {};
|
18846
19356
|
|
18847
19357
|
if (!singleCanvas) {
|
18848
|
-
this._width = this.
|
18849
|
-
this._height = this.
|
19358
|
+
this._width = this._getSize(0);
|
19359
|
+
this._height = this._getSize(1);
|
18850
19360
|
|
18851
19361
|
var domRoot = this._domRoot = createRoot(
|
18852
19362
|
this._width, this._height
|
@@ -19551,8 +20061,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19551
20061
|
// FIXME Why ?
|
19552
20062
|
domRoot.style.display = 'none';
|
19553
20063
|
|
19554
|
-
|
19555
|
-
|
20064
|
+
// Save input w/h
|
20065
|
+
var opts = this._opts;
|
20066
|
+
width != null && (opts.width = width);
|
20067
|
+
height != null && (opts.height = height);
|
20068
|
+
|
20069
|
+
width = this._getSize(0);
|
20070
|
+
height = this._getSize(1);
|
19556
20071
|
|
19557
20072
|
domRoot.style.display = '';
|
19558
20073
|
|
@@ -19562,8 +20077,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19562
20077
|
domRoot.style.height = height + 'px';
|
19563
20078
|
|
19564
20079
|
for (var id in this._layers) {
|
19565
|
-
this._layers
|
20080
|
+
if (this._layers.hasOwnProperty(id)) {
|
20081
|
+
this._layers[id].resize(width, height);
|
20082
|
+
}
|
19566
20083
|
}
|
20084
|
+
util.each(this._progressiveLayers, function (layer) {
|
20085
|
+
layer.resize(width, height);
|
20086
|
+
});
|
19567
20087
|
|
19568
20088
|
this.refresh(true);
|
19569
20089
|
}
|
@@ -19639,23 +20159,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19639
20159
|
return this._height;
|
19640
20160
|
},
|
19641
20161
|
|
19642
|
-
|
19643
|
-
var
|
19644
|
-
var
|
20162
|
+
_getSize: function (whIdx) {
|
20163
|
+
var opts = this._opts;
|
20164
|
+
var wh = ['width', 'height'][whIdx];
|
20165
|
+
var cwh = ['clientWidth', 'clientHeight'][whIdx];
|
20166
|
+
var plt = ['paddingLeft', 'paddingTop'][whIdx];
|
20167
|
+
var prb = ['paddingRight', 'paddingBottom'][whIdx];
|
19645
20168
|
|
19646
|
-
|
19647
|
-
|
19648
|
-
|
19649
|
-
- (parseInt10(stl.paddingRight) || 0)) | 0;
|
19650
|
-
},
|
20169
|
+
if (opts[wh] != null && opts[wh] !== 'auto') {
|
20170
|
+
return parseFloat(opts[wh]);
|
20171
|
+
}
|
19651
20172
|
|
19652
|
-
_getHeight: function () {
|
19653
20173
|
var root = this.root;
|
19654
20174
|
var stl = document.defaultView.getComputedStyle(root);
|
19655
20175
|
|
19656
|
-
return (
|
19657
|
-
|
19658
|
-
|
20176
|
+
return (
|
20177
|
+
(root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh]))
|
20178
|
+
- (parseInt10(stl[plt]) || 0)
|
20179
|
+
- (parseInt10(stl[prb]) || 0)
|
20180
|
+
) | 0;
|
19659
20181
|
},
|
19660
20182
|
|
19661
20183
|
_pathToImage: function (id, path, width, height, dpr) {
|
@@ -19796,6 +20318,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
19796
20318
|
domStyle['user-select'] = 'none';
|
19797
20319
|
domStyle['-webkit-touch-callout'] = 'none';
|
19798
20320
|
domStyle['-webkit-tap-highlight-color'] = 'rgba(0,0,0,0)';
|
20321
|
+
domStyle['padding'] = 0;
|
20322
|
+
domStyle['margin'] = 0;
|
20323
|
+
domStyle['border-width'] = 0;
|
19799
20324
|
}
|
19800
20325
|
|
19801
20326
|
this.domBack = null;
|
@@ -20804,6 +21329,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
20804
21329
|
listProto.indexOfRawIndex = function (rawIndex) {
|
20805
21330
|
// Indices are ascending
|
20806
21331
|
var indices = this.indices;
|
21332
|
+
|
21333
|
+
// If rawIndex === dataIndex
|
21334
|
+
var rawDataIndex = indices[rawIndex];
|
21335
|
+
if (rawDataIndex != null && rawDataIndex === rawIndex) {
|
21336
|
+
return rawIndex;
|
21337
|
+
}
|
21338
|
+
|
20807
21339
|
var left = 0;
|
20808
21340
|
var right = indices.length - 1;
|
20809
21341
|
while (left <= right) {
|
@@ -22034,6 +22566,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22034
22566
|
var Symbol = __webpack_require__(105);
|
22035
22567
|
var lineAnimationDiff = __webpack_require__(107);
|
22036
22568
|
var graphic = __webpack_require__(43);
|
22569
|
+
var modelUtil = __webpack_require__(5);
|
22037
22570
|
|
22038
22571
|
var polyHelper = __webpack_require__(108);
|
22039
22572
|
|
@@ -22107,15 +22640,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22107
22640
|
}, true);
|
22108
22641
|
}
|
22109
22642
|
|
22110
|
-
function queryDataIndex(data, payload) {
|
22111
|
-
if (payload.dataIndex != null) {
|
22112
|
-
return payload.dataIndex;
|
22113
|
-
}
|
22114
|
-
else if (payload.name != null) {
|
22115
|
-
return data.indexOfName(payload.name);
|
22116
|
-
}
|
22117
|
-
}
|
22118
|
-
|
22119
22643
|
function createGridClipShape(cartesian, hasAnimation, seriesModel) {
|
22120
22644
|
var xExtent = getAxisExtentWithGap(cartesian.getAxis('x'));
|
22121
22645
|
var yExtent = getAxisExtentWithGap(cartesian.getAxis('y'));
|
@@ -22244,7 +22768,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22244
22768
|
|
22245
22769
|
function getVisualGradient(data, coordSys) {
|
22246
22770
|
var visualMetaList = data.getVisual('visualMeta');
|
22247
|
-
if (!visualMetaList || !visualMetaList.length) {
|
22771
|
+
if (!visualMetaList || !visualMetaList.length || !data.count()) {
|
22772
|
+
// When data.count() is 0, gradient range can not be calculated.
|
22248
22773
|
return;
|
22249
22774
|
}
|
22250
22775
|
|
@@ -22262,6 +22787,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22262
22787
|
}
|
22263
22788
|
return;
|
22264
22789
|
}
|
22790
|
+
|
22265
22791
|
var dimension = visualMeta.dimension;
|
22266
22792
|
var dimName = data.dimensions[dimension];
|
22267
22793
|
var dataExtent = data.getDataExtent(dimName);
|
@@ -22313,13 +22839,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22313
22839
|
});
|
22314
22840
|
}
|
22315
22841
|
}
|
22842
|
+
|
22316
22843
|
var gradient = new graphic.LinearGradient(
|
22317
22844
|
0, 0, 0, 0, colorStops, true
|
22318
22845
|
);
|
22319
22846
|
var axis = coordSys.getAxis(dimName);
|
22320
22847
|
|
22321
|
-
var start =
|
22322
|
-
var end =
|
22848
|
+
var start = axis.toGlobalCoord(axis.dataToCoord(min));
|
22849
|
+
var end = axis.toGlobalCoord(axis.dataToCoord(max));
|
22323
22850
|
// zrUtil.each(colorStops, function (colorStop) {
|
22324
22851
|
// // Make sure each offset has rounded px to avoid not sharp edge
|
22325
22852
|
// colorStop.offset = (Math.round(colorStop.offset * (end - start) + start) - start) / (end - start);
|
@@ -22469,6 +22996,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22469
22996
|
}
|
22470
22997
|
|
22471
22998
|
var visualColor = getVisualGradient(data, coordSys) || data.getVisual('color');
|
22999
|
+
|
22472
23000
|
polyline.useStyle(zrUtil.defaults(
|
22473
23001
|
// Use color in lineStyle first
|
22474
23002
|
lineStyleModel.getLineStyle(),
|
@@ -22521,9 +23049,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22521
23049
|
this._step = step;
|
22522
23050
|
},
|
22523
23051
|
|
23052
|
+
dispose: function () {},
|
23053
|
+
|
22524
23054
|
highlight: function (seriesModel, ecModel, api, payload) {
|
22525
23055
|
var data = seriesModel.getData();
|
22526
|
-
var dataIndex = queryDataIndex(data, payload);
|
23056
|
+
var dataIndex = modelUtil.queryDataIndex(data, payload);
|
22527
23057
|
|
22528
23058
|
if (!(dataIndex instanceof Array) && dataIndex != null && dataIndex >= 0) {
|
22529
23059
|
var symbol = data.getItemGraphicEl(dataIndex);
|
@@ -22557,7 +23087,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22557
23087
|
|
22558
23088
|
downplay: function (seriesModel, ecModel, api, payload) {
|
22559
23089
|
var data = seriesModel.getData();
|
22560
|
-
var dataIndex = queryDataIndex(data, payload);
|
23090
|
+
var dataIndex = modelUtil.queryDataIndex(data, payload);
|
22561
23091
|
if (dataIndex != null && dataIndex >= 0) {
|
22562
23092
|
var symbol = data.getItemGraphicEl(dataIndex);
|
22563
23093
|
if (symbol) {
|
@@ -22668,6 +23198,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22668
23198
|
next = turnPointsIntoStep(diff.next, coordSys, step);
|
22669
23199
|
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
|
22670
23200
|
}
|
23201
|
+
// `diff.current` is subset of `current` (which should be ensured by
|
23202
|
+
// turnPointsIntoStep), so points in `__points` can be updated when
|
23203
|
+
// points in `current` are update during animation.
|
22671
23204
|
polyline.shape.__points = diff.current;
|
22672
23205
|
polyline.shape.points = current;
|
22673
23206
|
|
@@ -22685,8 +23218,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22685
23218
|
graphic.updateProps(polygon, {
|
22686
23219
|
shape: {
|
22687
23220
|
points: next,
|
22688
|
-
stackedOnPoints: stackedOnNext
|
22689
|
-
__points: diff.next
|
23221
|
+
stackedOnPoints: stackedOnNext
|
22690
23222
|
}
|
22691
23223
|
}, seriesModel);
|
22692
23224
|
}
|
@@ -22887,9 +23419,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22887
23419
|
var numberUtil = __webpack_require__(7);
|
22888
23420
|
|
22889
23421
|
function normalizeSymbolSize(symbolSize) {
|
22890
|
-
|
22891
|
-
|
22892
|
-
|
23422
|
+
symbolSize = symbolSize instanceof Array
|
23423
|
+
? symbolSize.slice()
|
23424
|
+
: [+symbolSize, +symbolSize];
|
23425
|
+
symbolSize[0] /= 2;
|
23426
|
+
symbolSize[1] /= 2;
|
22893
23427
|
return symbolSize;
|
22894
23428
|
}
|
22895
23429
|
|
@@ -22919,8 +23453,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22919
23453
|
var seriesModel = data.hostModel;
|
22920
23454
|
var color = data.getItemVisual(idx, 'color');
|
22921
23455
|
|
23456
|
+
// var symbolPath = symbolUtil.createSymbol(
|
23457
|
+
// symbolType, -0.5, -0.5, 1, 1, color
|
23458
|
+
// );
|
23459
|
+
// If width/height are set too small (e.g., set to 1) on ios10
|
23460
|
+
// and macOS Sierra, a circle stroke become a rect, no matter what
|
23461
|
+
// the scale is set. So we set width/height as 2. See #4150.
|
22922
23462
|
var symbolPath = symbolUtil.createSymbol(
|
22923
|
-
symbolType, -
|
23463
|
+
symbolType, -1, -1, 2, 2, color
|
22924
23464
|
);
|
22925
23465
|
|
22926
23466
|
symbolPath.attr({
|
@@ -22936,7 +23476,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
22936
23476
|
graphic.initProps(symbolPath, {
|
22937
23477
|
scale: size
|
22938
23478
|
}, seriesModel, idx);
|
22939
|
-
|
22940
23479
|
this._symbolType = symbolType;
|
22941
23480
|
|
22942
23481
|
this.add(symbolPath);
|
@@ -23016,7 +23555,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
23016
23555
|
}, seriesModel, idx);
|
23017
23556
|
}
|
23018
23557
|
this._updateCommon(data, idx, symbolSize, seriesScope);
|
23019
|
-
|
23020
23558
|
this._seriesModel = seriesModel;
|
23021
23559
|
};
|
23022
23560
|
|
@@ -23069,7 +23607,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
23069
23607
|
|
23070
23608
|
var elStyle = symbolPath.style;
|
23071
23609
|
|
23072
|
-
symbolPath.rotation
|
23610
|
+
symbolPath.attr('rotation', (symbolRotate || 0) * Math.PI / 180 || 0);
|
23073
23611
|
|
23074
23612
|
if (symbolOffset) {
|
23075
23613
|
symbolPath.attr('position', [
|
@@ -23407,7 +23945,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
23407
23945
|
|
23408
23946
|
var symbolBuildProxies = {};
|
23409
23947
|
for (var name in symbolCtors) {
|
23410
|
-
|
23948
|
+
if (symbolCtors.hasOwnProperty(name)) {
|
23949
|
+
symbolBuildProxies[name] = new symbolCtors[name]();
|
23950
|
+
}
|
23411
23951
|
}
|
23412
23952
|
|
23413
23953
|
var Symbol = graphic.extendShape({
|
@@ -24174,7 +24714,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24174
24714
|
|
24175
24715
|
__webpack_require__(113);
|
24176
24716
|
|
24177
|
-
__webpack_require__(
|
24717
|
+
__webpack_require__(131);
|
24178
24718
|
|
24179
24719
|
// Grid view
|
24180
24720
|
echarts.extendComponentView({
|
@@ -24185,14 +24725,16 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24185
24725
|
this.group.removeAll();
|
24186
24726
|
if (gridModel.get('show')) {
|
24187
24727
|
this.group.add(new graphic.Rect({
|
24188
|
-
shape:gridModel.coordinateSystem.getRect(),
|
24728
|
+
shape: gridModel.coordinateSystem.getRect(),
|
24189
24729
|
style: zrUtil.defaults({
|
24190
24730
|
fill: gridModel.get('backgroundColor')
|
24191
24731
|
}, gridModel.getItemStyle()),
|
24192
|
-
silent: true
|
24732
|
+
silent: true,
|
24733
|
+
z2: -1
|
24193
24734
|
}));
|
24194
24735
|
}
|
24195
24736
|
}
|
24737
|
+
|
24196
24738
|
});
|
24197
24739
|
|
24198
24740
|
echarts.registerPreprocessor(function (option) {
|
@@ -24304,9 +24846,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24304
24846
|
function ifAxisCanNotOnZero(otherAxisDim) {
|
24305
24847
|
var axes = axesMap[otherAxisDim];
|
24306
24848
|
for (var idx in axes) {
|
24307
|
-
|
24308
|
-
|
24309
|
-
|
24849
|
+
if (axes.hasOwnProperty(idx)) {
|
24850
|
+
var axis = axes[idx];
|
24851
|
+
if (axis && (axis.type === 'category' || !ifAxisCrossZero(axis))) {
|
24852
|
+
return true;
|
24853
|
+
}
|
24310
24854
|
}
|
24311
24855
|
}
|
24312
24856
|
return false;
|
@@ -24400,7 +24944,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24400
24944
|
if (axisIndex == null) {
|
24401
24945
|
// Find first axis
|
24402
24946
|
for (var name in axesMapOnDim) {
|
24403
|
-
|
24947
|
+
if (axesMapOnDim.hasOwnProperty(name)) {
|
24948
|
+
return axesMapOnDim[name];
|
24949
|
+
}
|
24404
24950
|
}
|
24405
24951
|
}
|
24406
24952
|
return axesMapOnDim[axisIndex];
|
@@ -24424,6 +24970,83 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24424
24970
|
}
|
24425
24971
|
};
|
24426
24972
|
|
24973
|
+
/**
|
24974
|
+
* @implements
|
24975
|
+
* see {module:echarts/CoodinateSystem}
|
24976
|
+
*/
|
24977
|
+
gridProto.convertToPixel = function (ecModel, finder, value) {
|
24978
|
+
var target = this._findConvertTarget(ecModel, finder);
|
24979
|
+
|
24980
|
+
return target.cartesian
|
24981
|
+
? target.cartesian.dataToPoint(value)
|
24982
|
+
: target.axis
|
24983
|
+
? target.axis.toGlobalCoord(target.axis.dataToCoord(value))
|
24984
|
+
: null;
|
24985
|
+
};
|
24986
|
+
|
24987
|
+
/**
|
24988
|
+
* @implements
|
24989
|
+
* see {module:echarts/CoodinateSystem}
|
24990
|
+
*/
|
24991
|
+
gridProto.convertFromPixel = function (ecModel, finder, value) {
|
24992
|
+
var target = this._findConvertTarget(ecModel, finder);
|
24993
|
+
|
24994
|
+
return target.cartesian
|
24995
|
+
? target.cartesian.pointToData(value)
|
24996
|
+
: target.axis
|
24997
|
+
? target.axis.coordToData(target.axis.toLocalCoord(value))
|
24998
|
+
: null;
|
24999
|
+
};
|
25000
|
+
|
25001
|
+
/**
|
25002
|
+
* @inner
|
25003
|
+
*/
|
25004
|
+
gridProto._findConvertTarget = function (ecModel, finder) {
|
25005
|
+
var seriesModel = finder.seriesModel;
|
25006
|
+
var xAxisModel = finder.xAxisModel
|
25007
|
+
|| (seriesModel && seriesModel.getReferringComponents('xAxis')[0]);
|
25008
|
+
var yAxisModel = finder.yAxisModel
|
25009
|
+
|| (seriesModel && seriesModel.getReferringComponents('yAxis')[0]);
|
25010
|
+
var gridModel = finder.gridModel;
|
25011
|
+
var coordsList = this._coordsList;
|
25012
|
+
var cartesian;
|
25013
|
+
var axis;
|
25014
|
+
|
25015
|
+
if (seriesModel) {
|
25016
|
+
cartesian = seriesModel.coordinateSystem;
|
25017
|
+
zrUtil.indexOf(coordsList, cartesian) < 0 && (cartesian = null);
|
25018
|
+
}
|
25019
|
+
else if (xAxisModel && yAxisModel) {
|
25020
|
+
cartesian = this.getCartesian(xAxisModel.componentIndex, yAxisModel.componentIndex);
|
25021
|
+
}
|
25022
|
+
else if (xAxisModel) {
|
25023
|
+
axis = this.getAxis('x', xAxisModel.componentIndex);
|
25024
|
+
}
|
25025
|
+
else if (yAxisModel) {
|
25026
|
+
axis = this.getAxis('y', yAxisModel.componentIndex);
|
25027
|
+
}
|
25028
|
+
// Lowest priority.
|
25029
|
+
else if (gridModel) {
|
25030
|
+
var grid = gridModel.coordinateSystem;
|
25031
|
+
if (grid === this) {
|
25032
|
+
cartesian = this._coordsList[0];
|
25033
|
+
}
|
25034
|
+
}
|
25035
|
+
|
25036
|
+
return {cartesian: cartesian, axis: axis};
|
25037
|
+
};
|
25038
|
+
|
25039
|
+
/**
|
25040
|
+
* @implements
|
25041
|
+
* see {module:echarts/CoodinateSystem}
|
25042
|
+
*/
|
25043
|
+
gridProto.containPoint = function (point) {
|
25044
|
+
var coord = this._coordsList[0];
|
25045
|
+
if (coord) {
|
25046
|
+
return coord.containPoint(point);
|
25047
|
+
}
|
25048
|
+
};
|
25049
|
+
|
24427
25050
|
/**
|
24428
25051
|
* Initialize cartesian coordinate systems
|
24429
25052
|
* @private
|
@@ -24611,11 +25234,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24611
25234
|
*/
|
24612
25235
|
function findAxesModels(seriesModel, ecModel) {
|
24613
25236
|
return zrUtil.map(axesTypes, function (axisType) {
|
24614
|
-
var axisModel =
|
24615
|
-
mainType: axisType,
|
24616
|
-
index: seriesModel.get(axisType + 'Index'),
|
24617
|
-
id: seriesModel.get(axisType + 'Id')
|
24618
|
-
})[0];
|
25237
|
+
var axisModel = seriesModel.getReferringComponents(axisType)[0];
|
24619
25238
|
|
24620
25239
|
if (true) {
|
24621
25240
|
if (!axisModel) {
|
@@ -24798,7 +25417,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
24798
25417
|
// scaleQuantity *= 10;
|
24799
25418
|
// }
|
24800
25419
|
extent = scale.getExtent();
|
24801
|
-
|
25420
|
+
var origin = (extent[1] + extent[0]) / 2;
|
25421
|
+
scale.setExtent(
|
25422
|
+
intervalScale * (extent[0] - origin) + origin,
|
25423
|
+
intervalScale * (extent[1] - origin) + origin
|
25424
|
+
);
|
24802
25425
|
scale.niceExtent(splitNumber);
|
24803
25426
|
}
|
24804
25427
|
|
@@ -25247,6 +25870,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25247
25870
|
ticks.push(extent[0]);
|
25248
25871
|
}
|
25249
25872
|
var tick = niceExtent[0];
|
25873
|
+
|
25250
25874
|
while (tick <= niceExtent[1]) {
|
25251
25875
|
ticks.push(tick);
|
25252
25876
|
// Avoid rounding error
|
@@ -25255,7 +25879,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25255
25879
|
return [];
|
25256
25880
|
}
|
25257
25881
|
}
|
25258
|
-
|
25882
|
+
// Consider this case: the last item of ticks is smaller
|
25883
|
+
// than niceExtent[1] and niceExtent[1] === extent[1].
|
25884
|
+
if (extent[1] > (ticks.length ? ticks[ticks.length - 1] : niceExtent[1])) {
|
25259
25885
|
ticks.push(extent[1]);
|
25260
25886
|
}
|
25261
25887
|
}
|
@@ -25573,6 +26199,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25573
26199
|
var scaleProto = Scale.prototype;
|
25574
26200
|
var intervalScaleProto = IntervalScale.prototype;
|
25575
26201
|
|
26202
|
+
var getPrecisionSafe = numberUtil.getPrecisionSafe;
|
26203
|
+
var roundingErrorFix = numberUtil.round;
|
26204
|
+
|
25576
26205
|
var mathFloor = Math.floor;
|
25577
26206
|
var mathCeil = Math.ceil;
|
25578
26207
|
var mathPow = Math.pow;
|
@@ -25585,12 +26214,31 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25585
26214
|
|
25586
26215
|
base: 10,
|
25587
26216
|
|
26217
|
+
$constructor: function () {
|
26218
|
+
Scale.apply(this, arguments);
|
26219
|
+
this._originalScale = new IntervalScale();
|
26220
|
+
},
|
26221
|
+
|
25588
26222
|
/**
|
25589
26223
|
* @return {Array.<number>}
|
25590
26224
|
*/
|
25591
26225
|
getTicks: function () {
|
26226
|
+
var originalScale = this._originalScale;
|
26227
|
+
var extent = this._extent;
|
26228
|
+
var originalExtent = originalScale.getExtent();
|
26229
|
+
|
25592
26230
|
return zrUtil.map(intervalScaleProto.getTicks.call(this), function (val) {
|
25593
|
-
|
26231
|
+
var powVal = numberUtil.round(mathPow(this.base, val));
|
26232
|
+
|
26233
|
+
// Fix #4158
|
26234
|
+
powVal = (val === extent[0] && originalScale.__fixMin)
|
26235
|
+
? fixRoundingError(powVal, originalExtent[0])
|
26236
|
+
: powVal;
|
26237
|
+
powVal = (val === extent[1] && originalScale.__fixMax)
|
26238
|
+
? fixRoundingError(powVal, originalExtent[1])
|
26239
|
+
: powVal;
|
26240
|
+
|
26241
|
+
return powVal;
|
25594
26242
|
}, this);
|
25595
26243
|
},
|
25596
26244
|
|
@@ -25628,6 +26276,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25628
26276
|
var extent = scaleProto.getExtent.call(this);
|
25629
26277
|
extent[0] = mathPow(base, extent[0]);
|
25630
26278
|
extent[1] = mathPow(base, extent[1]);
|
26279
|
+
|
26280
|
+
// Fix #4158
|
26281
|
+
var originalScale = this._originalScale;
|
26282
|
+
var originalExtent = originalScale.getExtent();
|
26283
|
+
originalScale.__fixMin && (extent[0] = fixRoundingError(extent[0], originalExtent[0]));
|
26284
|
+
originalScale.__fixMax && (extent[1] = fixRoundingError(extent[1], originalExtent[1]));
|
26285
|
+
|
25631
26286
|
return extent;
|
25632
26287
|
},
|
25633
26288
|
|
@@ -25635,6 +26290,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25635
26290
|
* @param {Array.<number>} extent
|
25636
26291
|
*/
|
25637
26292
|
unionExtent: function (extent) {
|
26293
|
+
this._originalScale.unionExtent(extent);
|
26294
|
+
|
25638
26295
|
var base = this.base;
|
25639
26296
|
extent[0] = mathLog(extent[0]) / mathLog(base);
|
25640
26297
|
extent[1] = mathLog(extent[1]) / mathLog(base);
|
@@ -25681,7 +26338,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25681
26338
|
* @param {boolean} [fixMin=false]
|
25682
26339
|
* @param {boolean} [fixMax=false]
|
25683
26340
|
*/
|
25684
|
-
niceExtent:
|
26341
|
+
niceExtent: function (splitNumber, fixMin, fixMax) {
|
26342
|
+
intervalScaleProto.niceExtent.call(this, splitNumber, fixMin, fixMax);
|
26343
|
+
|
26344
|
+
var originalScale = this._originalScale;
|
26345
|
+
originalScale.__fixMin = fixMin;
|
26346
|
+
originalScale.__fixMax = fixMax;
|
26347
|
+
}
|
26348
|
+
|
25685
26349
|
});
|
25686
26350
|
|
25687
26351
|
zrUtil.each(['contain', 'normalize'], function (methodName) {
|
@@ -25695,6 +26359,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
25695
26359
|
return new LogScale();
|
25696
26360
|
};
|
25697
26361
|
|
26362
|
+
function fixRoundingError(val, originalVal) {
|
26363
|
+
return roundingErrorFix(val, getPrecisionSafe(originalVal));
|
26364
|
+
}
|
26365
|
+
|
25698
26366
|
module.exports = LogScale;
|
25699
26367
|
|
25700
26368
|
|
@@ -26379,7 +27047,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26379
27047
|
*/
|
26380
27048
|
init: function () {
|
26381
27049
|
AxisModel.superApply(this, 'init', arguments);
|
26382
|
-
this.
|
27050
|
+
this.resetRange();
|
26383
27051
|
},
|
26384
27052
|
|
26385
27053
|
/**
|
@@ -26387,7 +27055,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26387
27055
|
*/
|
26388
27056
|
mergeOption: function () {
|
26389
27057
|
AxisModel.superApply(this, 'mergeOption', arguments);
|
26390
|
-
this.
|
27058
|
+
this.resetRange();
|
26391
27059
|
},
|
26392
27060
|
|
26393
27061
|
/**
|
@@ -26395,45 +27063,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26395
27063
|
*/
|
26396
27064
|
restoreData: function () {
|
26397
27065
|
AxisModel.superApply(this, 'restoreData', arguments);
|
26398
|
-
this.
|
26399
|
-
},
|
26400
|
-
|
26401
|
-
/**
|
26402
|
-
* @public
|
26403
|
-
* @param {number} rangeStart
|
26404
|
-
* @param {number} rangeEnd
|
26405
|
-
*/
|
26406
|
-
setRange: function (rangeStart, rangeEnd) {
|
26407
|
-
this.option.rangeStart = rangeStart;
|
26408
|
-
this.option.rangeEnd = rangeEnd;
|
26409
|
-
},
|
26410
|
-
|
26411
|
-
/**
|
26412
|
-
* @public
|
26413
|
-
* @return {Array.<number|string|Date>}
|
26414
|
-
*/
|
26415
|
-
getMin: function () {
|
26416
|
-
var option = this.option;
|
26417
|
-
return option.rangeStart != null ? option.rangeStart : option.min;
|
26418
|
-
},
|
26419
|
-
|
26420
|
-
/**
|
26421
|
-
* @public
|
26422
|
-
* @return {Array.<number|string|Date>}
|
26423
|
-
*/
|
26424
|
-
getMax: function () {
|
26425
|
-
var option = this.option;
|
26426
|
-
return option.rangeEnd != null ? option.rangeEnd : option.max;
|
26427
|
-
},
|
26428
|
-
|
26429
|
-
/**
|
26430
|
-
* @public
|
26431
|
-
* @return {boolean}
|
26432
|
-
*/
|
26433
|
-
getNeedCrossZero: function () {
|
26434
|
-
var option = this.option;
|
26435
|
-
return (option.rangeStart != null || option.rangeEnd != null)
|
26436
|
-
? false : !option.scale;
|
27066
|
+
this.resetRange();
|
26437
27067
|
},
|
26438
27068
|
|
26439
27069
|
/**
|
@@ -26445,14 +27075,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26445
27075
|
index: this.get('gridIndex'),
|
26446
27076
|
id: this.get('gridId')
|
26447
27077
|
})[0];
|
26448
|
-
},
|
26449
|
-
|
26450
|
-
/**
|
26451
|
-
* @private
|
26452
|
-
*/
|
26453
|
-
_resetRange: function () {
|
26454
|
-
// rangeStart and rangeEnd is readonly.
|
26455
|
-
this.option.rangeStart = this.option.rangeEnd = null;
|
26456
27078
|
}
|
26457
27079
|
|
26458
27080
|
});
|
@@ -26463,6 +27085,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26463
27085
|
}
|
26464
27086
|
|
26465
27087
|
zrUtil.merge(AxisModel.prototype, __webpack_require__(129));
|
27088
|
+
zrUtil.merge(AxisModel.prototype, __webpack_require__(130));
|
26466
27089
|
|
26467
27090
|
var extraOption = {
|
26468
27091
|
// gridIndex: 0,
|
@@ -26745,6 +27368,75 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26745
27368
|
|
26746
27369
|
/***/ },
|
26747
27370
|
/* 130 */
|
27371
|
+
/***/ function(module, exports) {
|
27372
|
+
|
27373
|
+
|
27374
|
+
|
27375
|
+
module.exports = {
|
27376
|
+
|
27377
|
+
/**
|
27378
|
+
* @public
|
27379
|
+
* @return {Array.<number|string|Date>}
|
27380
|
+
*/
|
27381
|
+
getMin: function () {
|
27382
|
+
var option = this.option;
|
27383
|
+
var min = option.rangeStart != null ? option.rangeStart : option.min;
|
27384
|
+
// In case of axis.type === 'time', Date should be converted to timestamp.
|
27385
|
+
// In other cases, min/max should be a number or null/undefined or 'dataMin/Max'.
|
27386
|
+
if (min instanceof Date) {
|
27387
|
+
min = +min;
|
27388
|
+
}
|
27389
|
+
return min;
|
27390
|
+
},
|
27391
|
+
|
27392
|
+
/**
|
27393
|
+
* @public
|
27394
|
+
* @return {Array.<number|string|Date>}
|
27395
|
+
*/
|
27396
|
+
getMax: function () {
|
27397
|
+
var option = this.option;
|
27398
|
+
var max = option.rangeEnd != null ? option.rangeEnd : option.max;
|
27399
|
+
// In case of axis.type === 'time', Date should be converted to timestamp.
|
27400
|
+
// In other cases, min/max should be a number or null/undefined or 'dataMin/Max'.
|
27401
|
+
if (max instanceof Date) {
|
27402
|
+
max = +max;
|
27403
|
+
}
|
27404
|
+
return max;
|
27405
|
+
},
|
27406
|
+
|
27407
|
+
/**
|
27408
|
+
* @public
|
27409
|
+
* @return {boolean}
|
27410
|
+
*/
|
27411
|
+
getNeedCrossZero: function () {
|
27412
|
+
var option = this.option;
|
27413
|
+
return (option.rangeStart != null || option.rangeEnd != null)
|
27414
|
+
? false : !option.scale;
|
27415
|
+
},
|
27416
|
+
|
27417
|
+
/**
|
27418
|
+
* @public
|
27419
|
+
* @param {number} rangeStart
|
27420
|
+
* @param {number} rangeEnd
|
27421
|
+
*/
|
27422
|
+
setRange: function (rangeStart, rangeEnd) {
|
27423
|
+
this.option.rangeStart = rangeStart;
|
27424
|
+
this.option.rangeEnd = rangeEnd;
|
27425
|
+
},
|
27426
|
+
|
27427
|
+
/**
|
27428
|
+
* @public
|
27429
|
+
*/
|
27430
|
+
resetRange: function () {
|
27431
|
+
// rangeStart and rangeEnd is readonly.
|
27432
|
+
this.option.rangeStart = this.option.rangeEnd = null;
|
27433
|
+
}
|
27434
|
+
};
|
27435
|
+
|
27436
|
+
|
27437
|
+
|
27438
|
+
/***/ },
|
27439
|
+
/* 131 */
|
26748
27440
|
/***/ function(module, exports, __webpack_require__) {
|
26749
27441
|
|
26750
27442
|
'use strict';
|
@@ -26753,18 +27445,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
26753
27445
|
|
26754
27446
|
__webpack_require__(126);
|
26755
27447
|
|
26756
|
-
__webpack_require__(
|
27448
|
+
__webpack_require__(132);
|
26757
27449
|
|
26758
27450
|
|
26759
27451
|
/***/ },
|
26760
|
-
/*
|
27452
|
+
/* 132 */
|
26761
27453
|
/***/ function(module, exports, __webpack_require__) {
|
26762
27454
|
|
26763
27455
|
|
26764
27456
|
|
26765
27457
|
var zrUtil = __webpack_require__(4);
|
26766
27458
|
var graphic = __webpack_require__(43);
|
26767
|
-
var AxisBuilder = __webpack_require__(
|
27459
|
+
var AxisBuilder = __webpack_require__(133);
|
26768
27460
|
var ifIgnoreOnTick = AxisBuilder.ifIgnoreOnTick;
|
26769
27461
|
var getInterval = AxisBuilder.getInterval;
|
26770
27462
|
|
@@ -27042,7 +27734,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27042
27734
|
|
27043
27735
|
|
27044
27736
|
/***/ },
|
27045
|
-
/*
|
27737
|
+
/* 133 */
|
27046
27738
|
/***/ function(module, exports, __webpack_require__) {
|
27047
27739
|
|
27048
27740
|
|
@@ -27643,7 +28335,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27643
28335
|
|
27644
28336
|
|
27645
28337
|
/***/ },
|
27646
|
-
/*
|
28338
|
+
/* 134 */
|
27647
28339
|
/***/ function(module, exports, __webpack_require__) {
|
27648
28340
|
|
27649
28341
|
|
@@ -27652,10 +28344,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27652
28344
|
|
27653
28345
|
__webpack_require__(113);
|
27654
28346
|
|
27655
|
-
__webpack_require__(134);
|
27656
28347
|
__webpack_require__(135);
|
28348
|
+
__webpack_require__(136);
|
27657
28349
|
|
27658
|
-
var barLayoutGrid = __webpack_require__(
|
28350
|
+
var barLayoutGrid = __webpack_require__(138);
|
27659
28351
|
var echarts = __webpack_require__(1);
|
27660
28352
|
|
27661
28353
|
echarts.registerLayout(zrUtil.curry(barLayoutGrid, 'bar'));
|
@@ -27672,7 +28364,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27672
28364
|
|
27673
28365
|
|
27674
28366
|
/***/ },
|
27675
|
-
/*
|
28367
|
+
/* 135 */
|
27676
28368
|
/***/ function(module, exports, __webpack_require__) {
|
27677
28369
|
|
27678
28370
|
'use strict';
|
@@ -27751,7 +28443,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27751
28443
|
|
27752
28444
|
|
27753
28445
|
/***/ },
|
27754
|
-
/*
|
28446
|
+
/* 136 */
|
27755
28447
|
/***/ function(module, exports, __webpack_require__) {
|
27756
28448
|
|
27757
28449
|
'use strict';
|
@@ -27760,7 +28452,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27760
28452
|
var zrUtil = __webpack_require__(4);
|
27761
28453
|
var graphic = __webpack_require__(43);
|
27762
28454
|
|
27763
|
-
zrUtil.extend(__webpack_require__(12).prototype, __webpack_require__(
|
28455
|
+
zrUtil.extend(__webpack_require__(12).prototype, __webpack_require__(137));
|
27764
28456
|
|
27765
28457
|
function fixLayoutWithLineWidth(layout, lineWidth) {
|
27766
28458
|
var signX = layout.width > 0 ? 1 : -1;
|
@@ -27787,6 +28479,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27787
28479
|
return this.group;
|
27788
28480
|
},
|
27789
28481
|
|
28482
|
+
dispose: zrUtil.noop,
|
28483
|
+
|
27790
28484
|
_renderOnCartesian: function (seriesModel, ecModel, api) {
|
27791
28485
|
var group = this.group;
|
27792
28486
|
var data = seriesModel.getData();
|
@@ -27970,7 +28664,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
27970
28664
|
|
27971
28665
|
|
27972
28666
|
/***/ },
|
27973
|
-
/*
|
28667
|
+
/* 137 */
|
27974
28668
|
/***/ function(module, exports, __webpack_require__) {
|
27975
28669
|
|
27976
28670
|
|
@@ -28004,7 +28698,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28004
28698
|
|
28005
28699
|
|
28006
28700
|
/***/ },
|
28007
|
-
/*
|
28701
|
+
/* 138 */
|
28008
28702
|
/***/ function(module, exports, __webpack_require__) {
|
28009
28703
|
|
28010
28704
|
'use strict';
|
@@ -28156,6 +28850,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28156
28850
|
);
|
28157
28851
|
|
28158
28852
|
var lastStackCoords = {};
|
28853
|
+
var lastStackCoordsOrigin = {};
|
28159
28854
|
|
28160
28855
|
ecModel.eachSeriesByType(seriesType, function (seriesModel) {
|
28161
28856
|
|
@@ -28177,11 +28872,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28177
28872
|
|
28178
28873
|
var coords = cartesian.dataToPoints(data, true);
|
28179
28874
|
lastStackCoords[stackId] = lastStackCoords[stackId] || [];
|
28875
|
+
lastStackCoordsOrigin[stackId] = lastStackCoordsOrigin[stackId] || []; // Fix #4243
|
28180
28876
|
|
28181
28877
|
data.setLayout({
|
28182
28878
|
offset: columnOffset,
|
28183
28879
|
size: columnWidth
|
28184
28880
|
});
|
28881
|
+
|
28185
28882
|
data.each(valueAxis.dim, function (value, idx) {
|
28186
28883
|
// 空数据
|
28187
28884
|
if (isNaN(value)) {
|
@@ -28189,22 +28886,30 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28189
28886
|
}
|
28190
28887
|
if (!lastStackCoords[stackId][idx]) {
|
28191
28888
|
lastStackCoords[stackId][idx] = {
|
28192
|
-
// Positive stack
|
28193
|
-
|
28194
|
-
|
28195
|
-
|
28889
|
+
p: valueAxisStart, // Positive stack
|
28890
|
+
n: valueAxisStart // Negative stack
|
28891
|
+
};
|
28892
|
+
lastStackCoordsOrigin[stackId][idx] = {
|
28893
|
+
p: valueAxisStart, // Positive stack
|
28894
|
+
n: valueAxisStart // Negative stack
|
28196
28895
|
};
|
28197
28896
|
}
|
28198
28897
|
var sign = value >= 0 ? 'p' : 'n';
|
28199
28898
|
var coord = coords[idx];
|
28200
28899
|
var lastCoord = lastStackCoords[stackId][idx][sign];
|
28201
|
-
var
|
28900
|
+
var lastCoordOrigin = lastStackCoordsOrigin[stackId][idx][sign];
|
28901
|
+
var x;
|
28902
|
+
var y;
|
28903
|
+
var width;
|
28904
|
+
var height;
|
28905
|
+
|
28202
28906
|
if (valueAxis.isHorizontal()) {
|
28203
28907
|
x = lastCoord;
|
28204
28908
|
y = coord[1] + columnOffset;
|
28205
|
-
width = coord[0] -
|
28909
|
+
width = coord[0] - lastCoordOrigin;
|
28206
28910
|
height = columnWidth;
|
28207
28911
|
|
28912
|
+
lastStackCoordsOrigin[stackId][idx][sign] += width;
|
28208
28913
|
if (Math.abs(width) < barMinHeight) {
|
28209
28914
|
width = (width < 0 ? -1 : 1) * barMinHeight;
|
28210
28915
|
}
|
@@ -28214,7 +28919,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28214
28919
|
x = coord[0] + columnOffset;
|
28215
28920
|
y = lastCoord;
|
28216
28921
|
width = columnWidth;
|
28217
|
-
height = coord[1] -
|
28922
|
+
height = coord[1] - lastCoordOrigin;
|
28923
|
+
|
28924
|
+
lastStackCoordsOrigin[stackId][idx][sign] += height;
|
28218
28925
|
if (Math.abs(height) < barMinHeight) {
|
28219
28926
|
// Include zero to has a positive bar
|
28220
28927
|
height = (height <= 0 ? -1 : 1) * barMinHeight;
|
@@ -28237,7 +28944,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28237
28944
|
|
28238
28945
|
|
28239
28946
|
/***/ },
|
28240
|
-
/*
|
28947
|
+
/* 139 */
|
28241
28948
|
/***/ function(module, exports, __webpack_require__) {
|
28242
28949
|
|
28243
28950
|
|
@@ -28245,10 +28952,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28245
28952
|
var zrUtil = __webpack_require__(4);
|
28246
28953
|
var echarts = __webpack_require__(1);
|
28247
28954
|
|
28248
|
-
__webpack_require__(
|
28249
|
-
__webpack_require__(
|
28955
|
+
__webpack_require__(140);
|
28956
|
+
__webpack_require__(142);
|
28250
28957
|
|
28251
|
-
__webpack_require__(
|
28958
|
+
__webpack_require__(143)('pie', [{
|
28252
28959
|
type: 'pieToggleSelect',
|
28253
28960
|
event: 'pieselectchanged',
|
28254
28961
|
method: 'toggleSelected'
|
@@ -28262,17 +28969,17 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28262
28969
|
method: 'unSelect'
|
28263
28970
|
}]);
|
28264
28971
|
|
28265
|
-
echarts.registerVisual(zrUtil.curry(__webpack_require__(
|
28972
|
+
echarts.registerVisual(zrUtil.curry(__webpack_require__(144), 'pie'));
|
28266
28973
|
|
28267
28974
|
echarts.registerLayout(zrUtil.curry(
|
28268
|
-
__webpack_require__(
|
28975
|
+
__webpack_require__(145), 'pie'
|
28269
28976
|
));
|
28270
28977
|
|
28271
|
-
echarts.registerProcessor(zrUtil.curry(__webpack_require__(
|
28978
|
+
echarts.registerProcessor(zrUtil.curry(__webpack_require__(147), 'pie'));
|
28272
28979
|
|
28273
28980
|
|
28274
28981
|
/***/ },
|
28275
|
-
/*
|
28982
|
+
/* 140 */
|
28276
28983
|
/***/ function(module, exports, __webpack_require__) {
|
28277
28984
|
|
28278
28985
|
'use strict';
|
@@ -28283,7 +28990,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28283
28990
|
var modelUtil = __webpack_require__(5);
|
28284
28991
|
var completeDimensions = __webpack_require__(102);
|
28285
28992
|
|
28286
|
-
var dataSelectableMixin = __webpack_require__(
|
28993
|
+
var dataSelectableMixin = __webpack_require__(141);
|
28287
28994
|
|
28288
28995
|
var PieSeries = __webpack_require__(1).extendSeriesModel({
|
28289
28996
|
|
@@ -28416,7 +29123,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28416
29123
|
|
28417
29124
|
|
28418
29125
|
/***/ },
|
28419
|
-
/*
|
29126
|
+
/* 141 */
|
28420
29127
|
/***/ function(module, exports, __webpack_require__) {
|
28421
29128
|
|
28422
29129
|
/**
|
@@ -28486,7 +29193,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28486
29193
|
|
28487
29194
|
|
28488
29195
|
/***/ },
|
28489
|
-
/*
|
29196
|
+
/* 142 */
|
28490
29197
|
/***/ function(module, exports, __webpack_require__) {
|
28491
29198
|
|
28492
29199
|
|
@@ -28825,6 +29532,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28825
29532
|
this._data = data;
|
28826
29533
|
},
|
28827
29534
|
|
29535
|
+
dispose: function () {},
|
29536
|
+
|
28828
29537
|
_createClipPath: function (
|
28829
29538
|
cx, cy, r, startAngle, clockwise, cb, seriesModel
|
28830
29539
|
) {
|
@@ -28847,14 +29556,29 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28847
29556
|
}, seriesModel, cb);
|
28848
29557
|
|
28849
29558
|
return clipPath;
|
29559
|
+
},
|
29560
|
+
|
29561
|
+
/**
|
29562
|
+
* @implement
|
29563
|
+
*/
|
29564
|
+
containPoint: function (point, seriesModel) {
|
29565
|
+
var data = seriesModel.getData();
|
29566
|
+
var itemLayout = data.getItemLayout(0);
|
29567
|
+
if (itemLayout) {
|
29568
|
+
var dx = point[0] - itemLayout.cx;
|
29569
|
+
var dy = point[1] - itemLayout.cy;
|
29570
|
+
var radius = Math.sqrt(dx * dx + dy * dy);
|
29571
|
+
return radius <= itemLayout.r && radius >= itemLayout.r0;
|
29572
|
+
}
|
28850
29573
|
}
|
29574
|
+
|
28851
29575
|
});
|
28852
29576
|
|
28853
29577
|
module.exports = Pie;
|
28854
29578
|
|
28855
29579
|
|
28856
29580
|
/***/ },
|
28857
|
-
/*
|
29581
|
+
/* 143 */
|
28858
29582
|
/***/ function(module, exports, __webpack_require__) {
|
28859
29583
|
|
28860
29584
|
|
@@ -28894,7 +29618,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28894
29618
|
|
28895
29619
|
|
28896
29620
|
/***/ },
|
28897
|
-
/*
|
29621
|
+
/* 144 */
|
28898
29622
|
/***/ function(module, exports) {
|
28899
29623
|
|
28900
29624
|
// Pick color from palette for each data item
|
@@ -28943,7 +29667,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28943
29667
|
|
28944
29668
|
|
28945
29669
|
/***/ },
|
28946
|
-
/*
|
29670
|
+
/* 145 */
|
28947
29671
|
/***/ function(module, exports, __webpack_require__) {
|
28948
29672
|
|
28949
29673
|
// TODO minAngle
|
@@ -28952,7 +29676,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
28952
29676
|
|
28953
29677
|
var numberUtil = __webpack_require__(7);
|
28954
29678
|
var parsePercent = numberUtil.parsePercent;
|
28955
|
-
var labelLayout = __webpack_require__(
|
29679
|
+
var labelLayout = __webpack_require__(146);
|
28956
29680
|
var zrUtil = __webpack_require__(4);
|
28957
29681
|
|
28958
29682
|
var PI2 = Math.PI * 2;
|
@@ -29071,7 +29795,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
29071
29795
|
|
29072
29796
|
|
29073
29797
|
/***/ },
|
29074
|
-
/*
|
29798
|
+
/* 146 */
|
29075
29799
|
/***/ function(module, exports, __webpack_require__) {
|
29076
29800
|
|
29077
29801
|
'use strict';
|
@@ -29302,7 +30026,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|
29302
30026
|
|
29303
30027
|
|
29304
30028
|
/***/ },
|
29305
|
-
/*
|
30029
|
+
/* 147 */
|
29306
30030
|
/***/ function(module, exports) {
|
29307
30031
|
|
29308
30032
|
|