tvcharts 0.6.57 → 0.6.59
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.
- package/dist/echarts.js +621 -170
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -2
- package/lib/chart/fills.js +1 -1
- package/lib/chart/labels/LabelsSeries.js +30 -0
- package/lib/chart/lineFills/LineFillsLayout.js +122 -0
- package/lib/chart/lineFills/LineFillsPath.js +82 -0
- package/lib/chart/lineFills/LineFillsSeries.js +118 -0
- package/lib/chart/lineFills/LineFillsView.js +112 -0
- package/lib/chart/lineFills/install.js +51 -0
- package/lib/chart/lineFills.js +46 -0
- package/lib/chart/mineLines/LinesPath.js +226 -0
- package/lib/chart/mineLines/MineLinesLayout.js +118 -0
- package/lib/chart/mineLines/MineLinesSeries.js +118 -0
- package/lib/chart/mineLines/MineLinesView.js +133 -0
- package/lib/chart/mineLines/install.js +51 -0
- package/lib/chart/mineLines/util.js +109 -0
- package/lib/chart/mineLines.js +46 -0
- package/lib/component/dataZoom/AxisProxy.js +1 -0
- package/lib/core/echarts.js +31 -42
- package/lib/data/DataStore.js +10 -0
- package/lib/data/SeriesData.js +8 -0
- package/lib/data/helper/dataProvider.js +10 -3
- package/lib/export/charts.js +2 -0
- package/lib/model/Global.js +2 -0
- package/lib/model/Series.js +20 -1
- package/package.json +1 -1
- package/types/dist/charts.d.ts +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/echarts.d.ts +47 -1
- package/types/dist/option.d.ts +1 -1
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +56 -6
- package/types/src/chart/labels/LabelsSeries.d.ts +5 -1
- package/types/src/chart/lineFills/LineFillsLayout.d.ts +3 -0
- package/types/src/chart/lineFills/LineFillsPath.d.ts +16 -0
- package/types/src/chart/lineFills/LineFillsSeries.d.ts +53 -0
- package/types/src/chart/lineFills/LineFillsView.d.ts +17 -0
- package/types/src/chart/lineFills/install.d.ts +2 -0
- package/types/src/chart/lineFills.d.ts +1 -0
- package/types/src/chart/mineLines/LinesPath.d.ts +21 -0
- package/types/src/chart/mineLines/MineLinesLayout.d.ts +3 -0
- package/types/src/chart/mineLines/MineLinesSeries.d.ts +49 -0
- package/types/src/chart/mineLines/MineLinesView.d.ts +17 -0
- package/types/src/chart/mineLines/install.d.ts +2 -0
- package/types/src/chart/mineLines/util.d.ts +17 -0
- package/types/src/chart/mineLines.d.ts +1 -0
- package/types/src/data/DataStore.d.ts +1 -0
- package/types/src/data/SeriesData.d.ts +5 -0
- package/types/src/data/helper/dataProvider.d.ts +2 -0
- package/types/src/export/charts.d.ts +2 -0
- package/types/src/export/option.d.ts +3 -0
- package/types/src/model/Series.d.ts +2 -0
package/dist/echarts.js
CHANGED
|
@@ -226,16 +226,16 @@ var OFFSET = 20;
|
|
|
226
226
|
var SCALE = 100;
|
|
227
227
|
var defaultWidthMapStr = `007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;
|
|
228
228
|
function getTextWidthMap(mapStr) {
|
|
229
|
-
const
|
|
229
|
+
const map6 = {};
|
|
230
230
|
if (typeof JSON === "undefined") {
|
|
231
|
-
return
|
|
231
|
+
return map6;
|
|
232
232
|
}
|
|
233
233
|
for (let i = 0; i < mapStr.length; i++) {
|
|
234
234
|
const char = String.fromCharCode(i + 32);
|
|
235
235
|
const size = (mapStr.charCodeAt(i) - OFFSET) / SCALE;
|
|
236
|
-
|
|
236
|
+
map6[char] = size;
|
|
237
237
|
}
|
|
238
|
-
return
|
|
238
|
+
return map6;
|
|
239
239
|
}
|
|
240
240
|
var DEFAULT_TEXT_WIDTH_MAP = getTextWidthMap(defaultWidthMapStr);
|
|
241
241
|
var platformApi = {
|
|
@@ -348,15 +348,15 @@ var LRU = class {
|
|
|
348
348
|
}
|
|
349
349
|
put(key, value) {
|
|
350
350
|
const list = this._list;
|
|
351
|
-
const
|
|
351
|
+
const map6 = this._map;
|
|
352
352
|
let removed = null;
|
|
353
|
-
if (
|
|
353
|
+
if (map6[key] == null) {
|
|
354
354
|
const len2 = list.len();
|
|
355
355
|
let entry = this._lastRemovedEntry;
|
|
356
356
|
if (len2 >= this._maxSize && len2 > 0) {
|
|
357
357
|
const leastUsedEntry = list.head;
|
|
358
358
|
list.remove(leastUsedEntry);
|
|
359
|
-
delete
|
|
359
|
+
delete map6[leastUsedEntry.key];
|
|
360
360
|
removed = leastUsedEntry.value;
|
|
361
361
|
this._lastRemovedEntry = leastUsedEntry;
|
|
362
362
|
}
|
|
@@ -367,7 +367,7 @@ var LRU = class {
|
|
|
367
367
|
}
|
|
368
368
|
entry.key = key;
|
|
369
369
|
list.insertEntry(entry);
|
|
370
|
-
|
|
370
|
+
map6[key] = entry;
|
|
371
371
|
}
|
|
372
372
|
return removed;
|
|
373
373
|
}
|
|
@@ -7829,7 +7829,7 @@ function compressBatches(batchA, batchB) {
|
|
|
7829
7829
|
makeMap(batchA || [], mapA);
|
|
7830
7830
|
makeMap(batchB || [], mapB, mapA);
|
|
7831
7831
|
return [mapToArray(mapA), mapToArray(mapB)];
|
|
7832
|
-
function makeMap(sourceBatch,
|
|
7832
|
+
function makeMap(sourceBatch, map6, otherMap) {
|
|
7833
7833
|
for (let i = 0, len2 = sourceBatch.length; i < len2; i++) {
|
|
7834
7834
|
const seriesId = convertOptionIdName(sourceBatch[i].seriesId, null);
|
|
7835
7835
|
if (seriesId == null) {
|
|
@@ -7842,19 +7842,19 @@ function compressBatches(batchA, batchB) {
|
|
|
7842
7842
|
if (otherDataIndices && otherDataIndices[dataIndex]) {
|
|
7843
7843
|
otherDataIndices[dataIndex] = null;
|
|
7844
7844
|
} else {
|
|
7845
|
-
(
|
|
7845
|
+
(map6[seriesId] || (map6[seriesId] = {}))[dataIndex] = 1;
|
|
7846
7846
|
}
|
|
7847
7847
|
}
|
|
7848
7848
|
}
|
|
7849
7849
|
}
|
|
7850
|
-
function mapToArray(
|
|
7850
|
+
function mapToArray(map6, isData) {
|
|
7851
7851
|
const result = [];
|
|
7852
|
-
for (const i in
|
|
7853
|
-
if (
|
|
7852
|
+
for (const i in map6) {
|
|
7853
|
+
if (map6.hasOwnProperty(i) && map6[i] != null) {
|
|
7854
7854
|
if (isData) {
|
|
7855
7855
|
result.push(+i);
|
|
7856
7856
|
} else {
|
|
7857
|
-
const dataIndices = mapToArray(
|
|
7857
|
+
const dataIndices = mapToArray(map6[i], true);
|
|
7858
7858
|
dataIndices.length && result.push({seriesId: i, dataIndex: dataIndices});
|
|
7859
7859
|
}
|
|
7860
7860
|
}
|
|
@@ -16276,6 +16276,7 @@ var BUILTIN_CHARTS_MAP = {
|
|
|
16276
16276
|
lines: "LinesChart",
|
|
16277
16277
|
linesPlot: "LinesPlotChart",
|
|
16278
16278
|
strategy: "StrategyChart",
|
|
16279
|
+
mineLines: "MineLinesChart",
|
|
16279
16280
|
labels: "LabelsChart",
|
|
16280
16281
|
hlines: "HLinesChart",
|
|
16281
16282
|
fills: "FillsChart",
|
|
@@ -17802,6 +17803,8 @@ var DefaultDataProvider2 = class {
|
|
|
17802
17803
|
}
|
|
17803
17804
|
appendData(newData) {
|
|
17804
17805
|
}
|
|
17806
|
+
resetData(newData) {
|
|
17807
|
+
}
|
|
17805
17808
|
updateData(newData) {
|
|
17806
17809
|
return {update: 0};
|
|
17807
17810
|
}
|
|
@@ -17873,7 +17876,8 @@ DefaultDataProvider.internalField = function() {
|
|
|
17873
17876
|
[SOURCE_FORMAT_ARRAY_ROWS + "_" + SERIES_LAYOUT_BY_COLUMN]: {
|
|
17874
17877
|
pure: true,
|
|
17875
17878
|
appendData: appendDataSimply,
|
|
17876
|
-
updateData: updateDataSimply
|
|
17879
|
+
updateData: updateDataSimply,
|
|
17880
|
+
resetData: resetDataSimply
|
|
17877
17881
|
},
|
|
17878
17882
|
[SOURCE_FORMAT_ARRAY_ROWS + "_" + SERIES_LAYOUT_BY_ROW]: {
|
|
17879
17883
|
pure: true,
|
|
@@ -17884,7 +17888,8 @@ DefaultDataProvider.internalField = function() {
|
|
|
17884
17888
|
[SOURCE_FORMAT_OBJECT_ROWS]: {
|
|
17885
17889
|
pure: true,
|
|
17886
17890
|
appendData: appendDataSimply,
|
|
17887
|
-
updateData: updateDataSimply
|
|
17891
|
+
updateData: updateDataSimply,
|
|
17892
|
+
resetData: resetDataSimply
|
|
17888
17893
|
},
|
|
17889
17894
|
[SOURCE_FORMAT_KEYED_COLUMNS]: {
|
|
17890
17895
|
pure: true,
|
|
@@ -17900,7 +17905,8 @@ DefaultDataProvider.internalField = function() {
|
|
|
17900
17905
|
},
|
|
17901
17906
|
[SOURCE_FORMAT_ORIGINAL]: {
|
|
17902
17907
|
appendData: appendDataSimply,
|
|
17903
|
-
updateData: updateDataSimply
|
|
17908
|
+
updateData: updateDataSimply,
|
|
17909
|
+
resetData: resetDataSimply
|
|
17904
17910
|
},
|
|
17905
17911
|
[SOURCE_FORMAT_TYPED_ARRAY]: {
|
|
17906
17912
|
persistent: false,
|
|
@@ -17922,6 +17928,9 @@ DefaultDataProvider.internalField = function() {
|
|
|
17922
17928
|
this._data.push(newData[i]);
|
|
17923
17929
|
}
|
|
17924
17930
|
}
|
|
17931
|
+
function resetDataSimply(newData) {
|
|
17932
|
+
this._data = newData;
|
|
17933
|
+
}
|
|
17925
17934
|
function updateDataSimply(newData) {
|
|
17926
17935
|
const data = this._data;
|
|
17927
17936
|
let lastIndex = data.length - 1;
|
|
@@ -18873,6 +18882,16 @@ var DataStore2 = class {
|
|
|
18873
18882
|
}
|
|
18874
18883
|
return [start2, end2];
|
|
18875
18884
|
}
|
|
18885
|
+
resetUpdateData(data) {
|
|
18886
|
+
if (true) {
|
|
18887
|
+
assert(!this._indices, "appendData can only be called on raw data.");
|
|
18888
|
+
}
|
|
18889
|
+
const provider = this._provider;
|
|
18890
|
+
provider.resetData(data);
|
|
18891
|
+
const end2 = provider.count();
|
|
18892
|
+
this._initDataFromProvider(0, end2);
|
|
18893
|
+
return [0, end2];
|
|
18894
|
+
}
|
|
18876
18895
|
updateData(data) {
|
|
18877
18896
|
if (true) {
|
|
18878
18897
|
assert(!this._indices, "appendData can only be called on raw data.");
|
|
@@ -20121,7 +20140,18 @@ var SeriesModel2 = class extends Component_default {
|
|
|
20121
20140
|
}
|
|
20122
20141
|
updateData(params) {
|
|
20123
20142
|
const data = this.getRawData();
|
|
20124
|
-
|
|
20143
|
+
const formatData = this.getResetData(params.data);
|
|
20144
|
+
if (formatData) {
|
|
20145
|
+
data.resetUpdateData(formatData);
|
|
20146
|
+
return;
|
|
20147
|
+
}
|
|
20148
|
+
const lastIndex = data.count(true) - 1;
|
|
20149
|
+
const list = map(params.data, (item, index) => {
|
|
20150
|
+
const idx = lastIndex + index;
|
|
20151
|
+
item.value[0] = idx;
|
|
20152
|
+
return item;
|
|
20153
|
+
});
|
|
20154
|
+
data.updateData(list);
|
|
20125
20155
|
}
|
|
20126
20156
|
getData(dataType) {
|
|
20127
20157
|
const task = getCurrentTask(this);
|
|
@@ -20278,6 +20308,12 @@ var SeriesModel2 = class extends Component_default {
|
|
|
20278
20308
|
}
|
|
20279
20309
|
return universalTransitionOpt && universalTransitionOpt.enabled;
|
|
20280
20310
|
}
|
|
20311
|
+
getResetData(data) {
|
|
20312
|
+
return;
|
|
20313
|
+
}
|
|
20314
|
+
getUpdateData(data) {
|
|
20315
|
+
return;
|
|
20316
|
+
}
|
|
20281
20317
|
_innerSelect(data, innerDataIndices) {
|
|
20282
20318
|
const option = this.option;
|
|
20283
20319
|
const selectedMode = option.selectedMode;
|
|
@@ -24493,7 +24529,7 @@ var ECharts = class extends Eventful_default {
|
|
|
24493
24529
|
const seriesName = params.seriesName;
|
|
24494
24530
|
if (params.type === "component") {
|
|
24495
24531
|
const tableModal = ecModel.findComponents({mainType: "table", query: {name: seriesName}})[0];
|
|
24496
|
-
tableModal.
|
|
24532
|
+
tableModal.mergeTables(params.data);
|
|
24497
24533
|
tableModal.setAbleDataZoomUpdate(true);
|
|
24498
24534
|
return;
|
|
24499
24535
|
}
|
|
@@ -24507,27 +24543,16 @@ var ECharts = class extends Eventful_default {
|
|
|
24507
24543
|
if (isUpdate) {
|
|
24508
24544
|
seriesModel.updateValue({data: map(params.data, (item, index2) => {
|
|
24509
24545
|
const idx = lastIndex + index2;
|
|
24510
|
-
|
|
24546
|
+
const value = item.slice(1);
|
|
24547
|
+
seriesModel.option.data[idx] = value.length === 1 ? value[0] : value;
|
|
24511
24548
|
item[0] = idx;
|
|
24512
24549
|
return item;
|
|
24513
24550
|
})});
|
|
24514
24551
|
} else if (params.operation === "script") {
|
|
24515
|
-
|
|
24516
|
-
const data = map(params.data, (item, index2) => {
|
|
24517
|
-
const idx = lastIndex + index2;
|
|
24518
|
-
if (index2 !== 0) {
|
|
24519
|
-
categories.push(item.value[0]);
|
|
24520
|
-
}
|
|
24521
|
-
item.value[0] = idx;
|
|
24522
|
-
return item;
|
|
24523
|
-
});
|
|
24524
|
-
seriesModel.updateData({data});
|
|
24552
|
+
seriesModel.updateData({data: params.data});
|
|
24525
24553
|
} else {
|
|
24526
|
-
const categories = [];
|
|
24527
24554
|
const formatData = map(params.data, (item) => {
|
|
24528
|
-
const idx = lastIndex +
|
|
24529
|
-
seriesModel.option.data[idx] = item.slice(1);
|
|
24530
|
-
categories.push(item[0]);
|
|
24555
|
+
const idx = lastIndex + 1;
|
|
24531
24556
|
item[0] = idx;
|
|
24532
24557
|
return item;
|
|
24533
24558
|
});
|
|
@@ -24550,32 +24575,40 @@ var ECharts = class extends Eventful_default {
|
|
|
24550
24575
|
const scale4 = xAxisModal.axis.scale;
|
|
24551
24576
|
const ordinalMeta = scale4.getOrdinalMeta();
|
|
24552
24577
|
const lastTime = ordinalMeta.getLastCategories();
|
|
24553
|
-
const isMove = isAdd && scale4.lastBarRightSideDiffBarCount < 1.5;
|
|
24578
|
+
const isMove = isAdd && scale4.lastBarRightSideDiffBarCount < 1.5 && lastTime !== time;
|
|
24554
24579
|
if (isAdd && lastTime !== time) {
|
|
24555
24580
|
ordinalMeta.appendData([time]);
|
|
24556
24581
|
}
|
|
24557
|
-
|
|
24558
|
-
|
|
24559
|
-
|
|
24560
|
-
|
|
24561
|
-
|
|
24562
|
-
|
|
24582
|
+
if (isMove) {
|
|
24583
|
+
const payload = {
|
|
24584
|
+
type: "dataZoom",
|
|
24585
|
+
barSpace: scale4.barSpace,
|
|
24586
|
+
lastBarRightSideDiffBarCount: scale4.lastBarRightSideDiffBarCount - 1
|
|
24587
|
+
};
|
|
24588
|
+
doDispatchAction.call(chart, payload, false);
|
|
24589
|
+
return;
|
|
24590
|
+
}
|
|
24591
|
+
updateMethods.update.call(chart);
|
|
24563
24592
|
});
|
|
24564
24593
|
} else {
|
|
24565
24594
|
const xAxisModal = this._model.getComponent("xAxis", 0);
|
|
24566
24595
|
const scale4 = xAxisModal.axis.scale;
|
|
24567
24596
|
const ordinalMeta = scale4.getOrdinalMeta();
|
|
24568
24597
|
const lastTime = ordinalMeta.getLastCategories();
|
|
24569
|
-
const isMove = isAdd && scale4.lastBarRightSideDiffBarCount < 1.5;
|
|
24598
|
+
const isMove = isAdd && scale4.lastBarRightSideDiffBarCount < 1.5 && lastTime !== time;
|
|
24570
24599
|
if (isAdd && lastTime !== time) {
|
|
24571
24600
|
ordinalMeta.appendData([time]);
|
|
24572
24601
|
}
|
|
24573
|
-
|
|
24574
|
-
|
|
24575
|
-
|
|
24576
|
-
|
|
24577
|
-
|
|
24578
|
-
|
|
24602
|
+
if (isMove) {
|
|
24603
|
+
const payload = {
|
|
24604
|
+
type: "dataZoom",
|
|
24605
|
+
barSpace: scale4.barSpace,
|
|
24606
|
+
lastBarRightSideDiffBarCount: scale4.lastBarRightSideDiffBarCount - 1
|
|
24607
|
+
};
|
|
24608
|
+
doDispatchAction.call(this, payload, false);
|
|
24609
|
+
return;
|
|
24610
|
+
}
|
|
24611
|
+
updateMethods.update.call(this);
|
|
24579
24612
|
}
|
|
24580
24613
|
}
|
|
24581
24614
|
scrollByDistance(distance2, animationDuration) {
|
|
@@ -25851,25 +25884,25 @@ var DataDiffer = class {
|
|
|
25851
25884
|
newDataIndexMap[newKey] = null;
|
|
25852
25885
|
}
|
|
25853
25886
|
}
|
|
25854
|
-
_initIndexMap(arr,
|
|
25887
|
+
_initIndexMap(arr, map6, keyArr, keyGetterName) {
|
|
25855
25888
|
const cbModeMultiple = this._diffModeMultiple;
|
|
25856
25889
|
for (let i = 0; i < arr.length; i++) {
|
|
25857
25890
|
const key = "_ec_" + this[keyGetterName](arr[i], i);
|
|
25858
25891
|
if (!cbModeMultiple) {
|
|
25859
25892
|
keyArr[i] = key;
|
|
25860
25893
|
}
|
|
25861
|
-
if (!
|
|
25894
|
+
if (!map6) {
|
|
25862
25895
|
continue;
|
|
25863
25896
|
}
|
|
25864
|
-
const idxMapVal =
|
|
25897
|
+
const idxMapVal = map6[key];
|
|
25865
25898
|
const idxMapValLen = dataIndexMapValueLength(idxMapVal);
|
|
25866
25899
|
if (idxMapValLen === 0) {
|
|
25867
|
-
|
|
25900
|
+
map6[key] = i;
|
|
25868
25901
|
if (cbModeMultiple) {
|
|
25869
25902
|
keyArr.push(key);
|
|
25870
25903
|
}
|
|
25871
25904
|
} else if (idxMapValLen === 1) {
|
|
25872
|
-
|
|
25905
|
+
map6[key] = [idxMapVal, i];
|
|
25873
25906
|
} else {
|
|
25874
25907
|
idxMapVal.push(i);
|
|
25875
25908
|
}
|
|
@@ -26318,6 +26351,10 @@ var SeriesData2 = class {
|
|
|
26318
26351
|
const range = this._store.updateData(data);
|
|
26319
26352
|
this._doInit(range[0], range[1]);
|
|
26320
26353
|
}
|
|
26354
|
+
resetUpdateData(data) {
|
|
26355
|
+
const range = this._store.resetUpdateData(data);
|
|
26356
|
+
this._doInit(range[0], range[1]);
|
|
26357
|
+
}
|
|
26321
26358
|
updateValue(value) {
|
|
26322
26359
|
this._store.updateValue(value);
|
|
26323
26360
|
}
|
|
@@ -26984,15 +27021,15 @@ function getDimCount(source, sysDims, dimsDef, optDimCount) {
|
|
|
26984
27021
|
});
|
|
26985
27022
|
return dimCount;
|
|
26986
27023
|
}
|
|
26987
|
-
function genCoordDimName(name,
|
|
26988
|
-
if (fromZero ||
|
|
27024
|
+
function genCoordDimName(name, map6, fromZero) {
|
|
27025
|
+
if (fromZero || map6.hasKey(name)) {
|
|
26989
27026
|
let i = 0;
|
|
26990
|
-
while (
|
|
27027
|
+
while (map6.hasKey(name + i)) {
|
|
26991
27028
|
i++;
|
|
26992
27029
|
}
|
|
26993
27030
|
name += i;
|
|
26994
27031
|
}
|
|
26995
|
-
|
|
27032
|
+
map6.set(name, true);
|
|
26996
27033
|
return name;
|
|
26997
27034
|
}
|
|
26998
27035
|
|
|
@@ -27560,13 +27597,13 @@ var OrdinalMeta = class {
|
|
|
27560
27597
|
this.categories[index] = category;
|
|
27561
27598
|
return index;
|
|
27562
27599
|
}
|
|
27563
|
-
const
|
|
27564
|
-
index =
|
|
27600
|
+
const map6 = this._getOrCreateMap();
|
|
27601
|
+
index = map6.get(category);
|
|
27565
27602
|
if (index == null) {
|
|
27566
27603
|
if (needCollect) {
|
|
27567
27604
|
index = this.categories.length;
|
|
27568
27605
|
this.categories[index] = category;
|
|
27569
|
-
|
|
27606
|
+
map6.set(category, index);
|
|
27570
27607
|
} else {
|
|
27571
27608
|
index = NaN;
|
|
27572
27609
|
}
|
|
@@ -32294,19 +32331,19 @@ function isDef(s) {
|
|
|
32294
32331
|
return s !== void 0;
|
|
32295
32332
|
}
|
|
32296
32333
|
function createKeyToOldIdx(children, beginIdx, endIdx) {
|
|
32297
|
-
const
|
|
32334
|
+
const map6 = {};
|
|
32298
32335
|
for (let i = beginIdx; i <= endIdx; ++i) {
|
|
32299
32336
|
const key = children[i].key;
|
|
32300
32337
|
if (key !== void 0) {
|
|
32301
32338
|
if (true) {
|
|
32302
|
-
if (
|
|
32339
|
+
if (map6[key] != null) {
|
|
32303
32340
|
console.error(`Duplicate key ${key}`);
|
|
32304
32341
|
}
|
|
32305
32342
|
}
|
|
32306
|
-
|
|
32343
|
+
map6[key] = i;
|
|
32307
32344
|
}
|
|
32308
32345
|
}
|
|
32309
|
-
return
|
|
32346
|
+
return map6;
|
|
32310
32347
|
}
|
|
32311
32348
|
function sameVnode(vnode1, vnode2) {
|
|
32312
32349
|
const isSameKey = vnode1.key === vnode2.key;
|
|
@@ -43176,15 +43213,15 @@ var GEO_DEFAULT_PARAMS = {
|
|
|
43176
43213
|
};
|
|
43177
43214
|
var geo2DDimensions = ["lng", "lat"];
|
|
43178
43215
|
var Geo = class extends View_default {
|
|
43179
|
-
constructor(name,
|
|
43216
|
+
constructor(name, map6, opt) {
|
|
43180
43217
|
super(name);
|
|
43181
43218
|
this.dimensions = geo2DDimensions;
|
|
43182
43219
|
this.type = "geo";
|
|
43183
43220
|
this._nameCoordMap = createHashMap();
|
|
43184
|
-
this.map =
|
|
43221
|
+
this.map = map6;
|
|
43185
43222
|
let projection = opt.projection;
|
|
43186
|
-
const source = geoSourceManager_default.load(
|
|
43187
|
-
const resource = geoSourceManager_default.getGeoResource(
|
|
43223
|
+
const source = geoSourceManager_default.load(map6, opt.nameMap, opt.nameProperty);
|
|
43224
|
+
const resource = geoSourceManager_default.getGeoResource(map6);
|
|
43188
43225
|
const resourceType = this.resourceType = resource ? resource.type : null;
|
|
43189
43226
|
const regions = this.regions = source.regions;
|
|
43190
43227
|
const defaultParams = GEO_DEFAULT_PARAMS[resource.type];
|
|
@@ -43193,7 +43230,7 @@ var Geo = class extends View_default {
|
|
|
43193
43230
|
if (projection) {
|
|
43194
43231
|
if (resourceType === "geoSVG") {
|
|
43195
43232
|
if (true) {
|
|
43196
|
-
warn(`Map ${
|
|
43233
|
+
warn(`Map ${map6} with SVG source can't use projection. Only GeoJSON source supports projection.`);
|
|
43197
43234
|
}
|
|
43198
43235
|
projection = null;
|
|
43199
43236
|
}
|
|
@@ -51474,9 +51511,9 @@ function getTransform2(controller) {
|
|
|
51474
51511
|
return getTransform(controller.group);
|
|
51475
51512
|
}
|
|
51476
51513
|
function getGlobalDirection1(controller, localDirName) {
|
|
51477
|
-
const
|
|
51514
|
+
const map6 = {w: "left", e: "right", n: "top", s: "bottom"};
|
|
51478
51515
|
const inverseMap = {left: "w", right: "e", top: "n", bottom: "s"};
|
|
51479
|
-
const dir3 = transformDirection(
|
|
51516
|
+
const dir3 = transformDirection(map6[localDirName], getTransform2(controller));
|
|
51480
51517
|
return inverseMap[dir3];
|
|
51481
51518
|
}
|
|
51482
51519
|
function getGlobalDirection2(controller, localDirNameSeq) {
|
|
@@ -55759,7 +55796,6 @@ var StrategyView2 = class extends Chart_default {
|
|
|
55759
55796
|
} else {
|
|
55760
55797
|
this._symbolGroup.removeAll();
|
|
55761
55798
|
}
|
|
55762
|
-
console.log("\u6E32\u67D3\u7B56\u75651213123");
|
|
55763
55799
|
const symbolGroup = this._symbolGroup;
|
|
55764
55800
|
const z2 = seriesModel.get("z2");
|
|
55765
55801
|
const upTriangle = data.getLayout("upTriangle");
|
|
@@ -56080,13 +56116,380 @@ function install25(registers) {
|
|
|
56080
56116
|
registers.registerLayout(StrategyLayout_default);
|
|
56081
56117
|
}
|
|
56082
56118
|
|
|
56119
|
+
// src/chart/mineLines/LinesPath.ts
|
|
56120
|
+
var LinesPathShape = class {
|
|
56121
|
+
};
|
|
56122
|
+
function findIntersectionPoint(A, B, rectangle) {
|
|
56123
|
+
const [xA, yA] = A;
|
|
56124
|
+
const [xB, yB] = B;
|
|
56125
|
+
const {left, top, right, bottom} = rectangle;
|
|
56126
|
+
if (xA.toFixed(3) === xB.toFixed(3)) {
|
|
56127
|
+
return [xA, yA > yB ? top : bottom];
|
|
56128
|
+
} else if (yA.toFixed(3) === yB.toFixed(3)) {
|
|
56129
|
+
return [xA > xB ? right : left, yA];
|
|
56130
|
+
}
|
|
56131
|
+
const direction = [xB - xA, yB - yA];
|
|
56132
|
+
const t = Math.min((left - xA) / direction[0], (right - xA) / direction[0], (top - yA) / direction[1], (bottom - yA) / direction[1]);
|
|
56133
|
+
const intersectionPoint = [
|
|
56134
|
+
xA + t * direction[0],
|
|
56135
|
+
yA + t * direction[1]
|
|
56136
|
+
];
|
|
56137
|
+
return intersectionPoint;
|
|
56138
|
+
}
|
|
56139
|
+
function getArrowPoints(fromX, fromY, toX, toY, arrowAngle = Math.PI / 4) {
|
|
56140
|
+
const dx = toX - fromX;
|
|
56141
|
+
const dy = toY - fromY;
|
|
56142
|
+
const length2 = Math.sqrt(dx * dx + dy * dy);
|
|
56143
|
+
if (length2 <= 24) {
|
|
56144
|
+
return;
|
|
56145
|
+
}
|
|
56146
|
+
const arrowLength = Math.min(Math.floor(length2 / 3), 30);
|
|
56147
|
+
const normalizedDirectionX = dx / length2;
|
|
56148
|
+
const normalizedDirectionY = dy / length2;
|
|
56149
|
+
const perpendicularX = -normalizedDirectionY;
|
|
56150
|
+
const perpendicularY = normalizedDirectionX;
|
|
56151
|
+
const point1X = toX - arrowLength * (normalizedDirectionX * Math.cos(arrowAngle) - perpendicularX * Math.sin(arrowAngle));
|
|
56152
|
+
const point1Y = toY - arrowLength * (normalizedDirectionY * Math.cos(arrowAngle) - perpendicularY * Math.sin(arrowAngle));
|
|
56153
|
+
const point2X = toX - arrowLength * (normalizedDirectionX * Math.cos(-arrowAngle) - perpendicularX * Math.sin(-arrowAngle));
|
|
56154
|
+
const point2Y = toY - arrowLength * (normalizedDirectionY * Math.cos(-arrowAngle) - perpendicularY * Math.sin(-arrowAngle));
|
|
56155
|
+
return [point1X, point1Y, toX, toY, point2X, point2Y];
|
|
56156
|
+
}
|
|
56157
|
+
function drawArrow(params) {
|
|
56158
|
+
const {lineStyle, fromX, fromY, toX, toY, path} = params;
|
|
56159
|
+
switch (lineStyle) {
|
|
56160
|
+
case "style_arrow_left": {
|
|
56161
|
+
const points4 = getArrowPoints(toX, toY, fromX, fromY);
|
|
56162
|
+
if (!points4) {
|
|
56163
|
+
return;
|
|
56164
|
+
}
|
|
56165
|
+
const [x1, y1, x2, y2, x3, y3] = points4;
|
|
56166
|
+
path.moveTo(x1, y1);
|
|
56167
|
+
path.lineTo(x2, y2);
|
|
56168
|
+
path.lineTo(x3, y3);
|
|
56169
|
+
break;
|
|
56170
|
+
}
|
|
56171
|
+
case "style_arrow_right": {
|
|
56172
|
+
const points4 = getArrowPoints(fromX, fromY, toX, toY);
|
|
56173
|
+
if (!points4) {
|
|
56174
|
+
return;
|
|
56175
|
+
}
|
|
56176
|
+
const [x1, y1, x2, y2, x3, y3] = points4;
|
|
56177
|
+
path.moveTo(x1, y1);
|
|
56178
|
+
path.lineTo(x2, y2);
|
|
56179
|
+
path.lineTo(x3, y3);
|
|
56180
|
+
break;
|
|
56181
|
+
}
|
|
56182
|
+
case "style_arrow_both":
|
|
56183
|
+
{
|
|
56184
|
+
const points4 = getArrowPoints(toX, toY, fromX, fromY);
|
|
56185
|
+
if (!points4) {
|
|
56186
|
+
return;
|
|
56187
|
+
}
|
|
56188
|
+
const [lx1, ly1, lx2, ly2, lx3, ly3] = points4;
|
|
56189
|
+
path.moveTo(lx1, ly1);
|
|
56190
|
+
path.lineTo(lx2, ly2);
|
|
56191
|
+
path.lineTo(lx3, ly3);
|
|
56192
|
+
const [x1, y1, x2, y2, x3, y3] = getArrowPoints(fromX, fromY, toX, toY);
|
|
56193
|
+
path.moveTo(x1, y1);
|
|
56194
|
+
path.lineTo(x2, y2);
|
|
56195
|
+
path.lineTo(x3, y3);
|
|
56196
|
+
}
|
|
56197
|
+
break;
|
|
56198
|
+
default:
|
|
56199
|
+
break;
|
|
56200
|
+
}
|
|
56201
|
+
}
|
|
56202
|
+
function drawLine(params) {
|
|
56203
|
+
const {extent: extent3, fromX, fromY, toX, toY, path, height, width} = params;
|
|
56204
|
+
const rect = {
|
|
56205
|
+
left: 0,
|
|
56206
|
+
bottom: 0,
|
|
56207
|
+
top: height,
|
|
56208
|
+
right: width
|
|
56209
|
+
};
|
|
56210
|
+
switch (extent3) {
|
|
56211
|
+
case "left": {
|
|
56212
|
+
const pointC = findIntersectionPoint([fromX, fromY], [toX, toY], rect);
|
|
56213
|
+
path.moveTo(pointC[0], pointC[1]);
|
|
56214
|
+
path.lineTo(toX, toY);
|
|
56215
|
+
break;
|
|
56216
|
+
}
|
|
56217
|
+
case "right": {
|
|
56218
|
+
const pointB = findIntersectionPoint([toX, toY], [fromX, fromY], rect);
|
|
56219
|
+
path.moveTo(fromX, fromY);
|
|
56220
|
+
path.lineTo(pointB[0], pointB[1]);
|
|
56221
|
+
break;
|
|
56222
|
+
}
|
|
56223
|
+
case "both": {
|
|
56224
|
+
const pointC = findIntersectionPoint([fromX, fromY], [toX, toY], rect);
|
|
56225
|
+
const pointB = findIntersectionPoint([toX, toY], [fromX, fromY], rect);
|
|
56226
|
+
path.moveTo(pointC[0], pointC[1]);
|
|
56227
|
+
path.lineTo(pointB[0], pointB[1]);
|
|
56228
|
+
break;
|
|
56229
|
+
}
|
|
56230
|
+
default:
|
|
56231
|
+
path.moveTo(fromX, fromY);
|
|
56232
|
+
path.lineTo(toX, toY);
|
|
56233
|
+
break;
|
|
56234
|
+
}
|
|
56235
|
+
}
|
|
56236
|
+
var LinesPath = class extends Path_default {
|
|
56237
|
+
constructor(opts) {
|
|
56238
|
+
super(opts);
|
|
56239
|
+
}
|
|
56240
|
+
getDefaultShape() {
|
|
56241
|
+
return new LinesPathShape();
|
|
56242
|
+
}
|
|
56243
|
+
buildPath(path, shape) {
|
|
56244
|
+
const {points: points4, lineStyle, extent: extent3, rectWidth, rectHeight} = shape;
|
|
56245
|
+
for (let i = 0; i < points4.length; ) {
|
|
56246
|
+
const x1 = points4[i++];
|
|
56247
|
+
const y1 = points4[i++];
|
|
56248
|
+
const x2 = points4[i++];
|
|
56249
|
+
const y2 = points4[i++];
|
|
56250
|
+
drawArrow({lineStyle, fromX: x1, fromY: y1, toX: x2, toY: y2, path});
|
|
56251
|
+
drawLine({
|
|
56252
|
+
extent: extent3,
|
|
56253
|
+
fromX: x1,
|
|
56254
|
+
fromY: y1,
|
|
56255
|
+
toX: x2,
|
|
56256
|
+
toY: y2,
|
|
56257
|
+
path,
|
|
56258
|
+
width: rectWidth,
|
|
56259
|
+
height: rectHeight
|
|
56260
|
+
});
|
|
56261
|
+
}
|
|
56262
|
+
}
|
|
56263
|
+
};
|
|
56264
|
+
var LinesPath_default = LinesPath;
|
|
56265
|
+
|
|
56266
|
+
// src/chart/mineLines/MineLinesView.ts
|
|
56267
|
+
function getLineDashByLineStyle(lineStyle) {
|
|
56268
|
+
if (lineStyle === "style_dashed") {
|
|
56269
|
+
return [5, 5];
|
|
56270
|
+
} else if (lineStyle === "style_dotted") {
|
|
56271
|
+
return [2, 2];
|
|
56272
|
+
}
|
|
56273
|
+
return "solid";
|
|
56274
|
+
}
|
|
56275
|
+
var MineLinesView2 = class extends Chart_default {
|
|
56276
|
+
constructor() {
|
|
56277
|
+
super(...arguments);
|
|
56278
|
+
this.type = MineLinesView2.type;
|
|
56279
|
+
}
|
|
56280
|
+
init() {
|
|
56281
|
+
}
|
|
56282
|
+
render(seriesModel, ecModel, api2) {
|
|
56283
|
+
const data = seriesModel.getData();
|
|
56284
|
+
this._renderLines(data, seriesModel, api2);
|
|
56285
|
+
const clipPath = seriesModel.get("clip", true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);
|
|
56286
|
+
if (clipPath) {
|
|
56287
|
+
this.group.setClipPath(clipPath);
|
|
56288
|
+
} else {
|
|
56289
|
+
this.group.removeClipPath();
|
|
56290
|
+
}
|
|
56291
|
+
}
|
|
56292
|
+
_getClipShape(seriesModel) {
|
|
56293
|
+
if (!seriesModel.get("clip", true)) {
|
|
56294
|
+
return;
|
|
56295
|
+
}
|
|
56296
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
56297
|
+
return coordSys && coordSys.getArea && coordSys.getArea(0.1);
|
|
56298
|
+
}
|
|
56299
|
+
_renderLines(data, seriesModel, api2) {
|
|
56300
|
+
if (!this._linesGroup) {
|
|
56301
|
+
this._linesGroup = new Group_default();
|
|
56302
|
+
this.group.add(this._linesGroup);
|
|
56303
|
+
} else {
|
|
56304
|
+
this._linesGroup.removeAll();
|
|
56305
|
+
}
|
|
56306
|
+
const linesGroup = this._linesGroup;
|
|
56307
|
+
const z2 = seriesModel.get("z2");
|
|
56308
|
+
const linesPointById = data.getLayout("linesPointById");
|
|
56309
|
+
const rectWidth = api2.getWidth();
|
|
56310
|
+
const rectHeight = api2.getHeight();
|
|
56311
|
+
each(linesPointById, function(item, key) {
|
|
56312
|
+
const [color2, width, lineStyle, extent3] = key.split(":");
|
|
56313
|
+
const el = new LinesPath_default({
|
|
56314
|
+
shape: {
|
|
56315
|
+
points: item,
|
|
56316
|
+
extent: extent3,
|
|
56317
|
+
lineStyle,
|
|
56318
|
+
rectWidth,
|
|
56319
|
+
rectHeight
|
|
56320
|
+
},
|
|
56321
|
+
style: {
|
|
56322
|
+
fill: "none",
|
|
56323
|
+
stroke: color2,
|
|
56324
|
+
lineWidth: +width,
|
|
56325
|
+
lineDash: getLineDashByLineStyle(lineStyle)
|
|
56326
|
+
},
|
|
56327
|
+
z2
|
|
56328
|
+
});
|
|
56329
|
+
linesGroup.add(el);
|
|
56330
|
+
});
|
|
56331
|
+
}
|
|
56332
|
+
remove(ecModel, api2) {
|
|
56333
|
+
this._linesGroup && this._linesGroup.removeAll();
|
|
56334
|
+
this._linesGroup = null;
|
|
56335
|
+
}
|
|
56336
|
+
dispose(ecModel, api2) {
|
|
56337
|
+
this.remove(ecModel, api2);
|
|
56338
|
+
}
|
|
56339
|
+
};
|
|
56340
|
+
var MineLinesView = MineLinesView2;
|
|
56341
|
+
MineLinesView.type = "mineLines";
|
|
56342
|
+
var MineLinesView_default = MineLinesView;
|
|
56343
|
+
|
|
56344
|
+
// src/chart/mineLines/MineLinesSeries.ts
|
|
56345
|
+
var MineLinesSeriesModel2 = class extends Series_default {
|
|
56346
|
+
constructor() {
|
|
56347
|
+
super(...arguments);
|
|
56348
|
+
this.type = MineLinesSeriesModel2.type;
|
|
56349
|
+
this.dataIndexById = {};
|
|
56350
|
+
}
|
|
56351
|
+
getInitialData(option) {
|
|
56352
|
+
if (true) {
|
|
56353
|
+
const coordSys = option.coordinateSystem;
|
|
56354
|
+
if (coordSys !== "polar" && coordSys !== "cartesian2d") {
|
|
56355
|
+
throw new Error("MineLines not support coordinateSystem besides cartesian and polar");
|
|
56356
|
+
}
|
|
56357
|
+
}
|
|
56358
|
+
this.computedDataIndexById(option);
|
|
56359
|
+
return createSeriesData_default(null, this, {
|
|
56360
|
+
useEncodeDefaulter: true
|
|
56361
|
+
});
|
|
56362
|
+
}
|
|
56363
|
+
getZLevelKey() {
|
|
56364
|
+
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
|
|
56365
|
+
}
|
|
56366
|
+
computedDataIndexById(option) {
|
|
56367
|
+
const dataIndexById = {};
|
|
56368
|
+
each(option.data, function(item, index) {
|
|
56369
|
+
dataIndexById[item.id] = index;
|
|
56370
|
+
});
|
|
56371
|
+
this.dataIndexById = dataIndexById;
|
|
56372
|
+
}
|
|
56373
|
+
getResetData(data) {
|
|
56374
|
+
const dataIndexById = this.dataIndexById;
|
|
56375
|
+
const that = this;
|
|
56376
|
+
each(data, function(item) {
|
|
56377
|
+
const index = dataIndexById[item.id];
|
|
56378
|
+
if (typeof index === "number") {
|
|
56379
|
+
that.option.data[index] = item;
|
|
56380
|
+
} else {
|
|
56381
|
+
that.option.data.push(item);
|
|
56382
|
+
}
|
|
56383
|
+
});
|
|
56384
|
+
this.computedDataIndexById(this.option);
|
|
56385
|
+
return this.option.data;
|
|
56386
|
+
}
|
|
56387
|
+
};
|
|
56388
|
+
var MineLinesSeriesModel = MineLinesSeriesModel2;
|
|
56389
|
+
MineLinesSeriesModel.type = "series.mineLines";
|
|
56390
|
+
MineLinesSeriesModel.dependencies = ["grid", "polar"];
|
|
56391
|
+
MineLinesSeriesModel.defaultOption = {
|
|
56392
|
+
coordinateSystem: "cartesian2d",
|
|
56393
|
+
z: 2,
|
|
56394
|
+
z2: 0,
|
|
56395
|
+
legendHoverLink: true,
|
|
56396
|
+
xAxisIndex: 0,
|
|
56397
|
+
yAxisIndex: 0,
|
|
56398
|
+
dimensions: ["x1", "x2", "y1", "y2"],
|
|
56399
|
+
encode: {
|
|
56400
|
+
x: ["x1", "x2"],
|
|
56401
|
+
y: ["y1", "y2"]
|
|
56402
|
+
},
|
|
56403
|
+
large: true,
|
|
56404
|
+
largeThreshold: 600,
|
|
56405
|
+
clip: true
|
|
56406
|
+
};
|
|
56407
|
+
var MineLinesSeries_default = MineLinesSeriesModel;
|
|
56408
|
+
|
|
56409
|
+
// src/chart/mineLines/MineLinesLayout.ts
|
|
56410
|
+
function optimizePoint(point1, point2, lineWidth) {
|
|
56411
|
+
const notOptimize = lineWidth % 2 === 0;
|
|
56412
|
+
if (notOptimize) {
|
|
56413
|
+
return;
|
|
56414
|
+
}
|
|
56415
|
+
if (point1[0] === point2[0]) {
|
|
56416
|
+
point2[0] = point1[0] = Math.floor(point1[0]) + 0.5;
|
|
56417
|
+
}
|
|
56418
|
+
if (point1[1] === point2[1]) {
|
|
56419
|
+
point2[1] = point1[1] = Math.floor(point1[1]) + 0.5;
|
|
56420
|
+
}
|
|
56421
|
+
}
|
|
56422
|
+
var MineLinesLayout = {
|
|
56423
|
+
seriesType: "mineLines",
|
|
56424
|
+
plan: createRenderPlanner(),
|
|
56425
|
+
reset: function(seriesModel) {
|
|
56426
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
56427
|
+
if (!coordSys) {
|
|
56428
|
+
if (true) {
|
|
56429
|
+
error("The lines series must have a coordinate system.");
|
|
56430
|
+
}
|
|
56431
|
+
return;
|
|
56432
|
+
}
|
|
56433
|
+
const data = seriesModel.getData();
|
|
56434
|
+
const cDimIdx = 0;
|
|
56435
|
+
const vDimIdx = 1;
|
|
56436
|
+
const coordDims = ["x", "y"];
|
|
56437
|
+
const cDimsI = map(data.mapDimensionsAll(coordDims[cDimIdx]), data.getDimensionIndex, data);
|
|
56438
|
+
const vDimsI = map(data.mapDimensionsAll(coordDims[vDimIdx]), data.getDimensionIndex, data);
|
|
56439
|
+
const x1DimI = cDimsI[0];
|
|
56440
|
+
const x2DimI = cDimsI[1];
|
|
56441
|
+
const y1DimI = vDimsI[0];
|
|
56442
|
+
const y2DimI = vDimsI[1];
|
|
56443
|
+
if (cDimsI.length < 2 || vDimsI.length < 2) {
|
|
56444
|
+
return;
|
|
56445
|
+
}
|
|
56446
|
+
return {
|
|
56447
|
+
progress(params, mineLinesData) {
|
|
56448
|
+
const store = mineLinesData.getStore();
|
|
56449
|
+
const linesPointById = {};
|
|
56450
|
+
for (let i = params.start; i < params.end; i++) {
|
|
56451
|
+
const x1Val = store.get(x1DimI, i);
|
|
56452
|
+
const x2Val = store.get(x2DimI, i);
|
|
56453
|
+
const y1Val = store.get(y1DimI, i);
|
|
56454
|
+
const y2Val = store.get(y2DimI, i);
|
|
56455
|
+
const startPoint = coordSys.dataToPoint([x1Val, y1Val]);
|
|
56456
|
+
const endPoint = coordSys.dataToPoint([x2Val, y2Val]);
|
|
56457
|
+
const itemModel = data.getItemModel(i);
|
|
56458
|
+
const {width, color: color2, lineStyle, extend: extend2} = itemModel.get("itemStyle");
|
|
56459
|
+
if (!color2) {
|
|
56460
|
+
continue;
|
|
56461
|
+
}
|
|
56462
|
+
const key = `${color2}:${width}:${lineStyle}:${extend2}`;
|
|
56463
|
+
const points4 = linesPointById[key] || [];
|
|
56464
|
+
optimizePoint(startPoint, endPoint, width);
|
|
56465
|
+
points4.push(...startPoint, ...endPoint);
|
|
56466
|
+
linesPointById[key] = points4;
|
|
56467
|
+
}
|
|
56468
|
+
data.setLayout({
|
|
56469
|
+
linesPointById
|
|
56470
|
+
});
|
|
56471
|
+
}
|
|
56472
|
+
};
|
|
56473
|
+
}
|
|
56474
|
+
};
|
|
56475
|
+
var MineLinesLayout_default = MineLinesLayout;
|
|
56476
|
+
|
|
56477
|
+
// src/chart/mineLines/install.ts
|
|
56478
|
+
function install26(registers) {
|
|
56479
|
+
registers.registerChartView(MineLinesView_default);
|
|
56480
|
+
registers.registerSeriesModel(MineLinesSeries_default);
|
|
56481
|
+
registers.registerLayout(MineLinesLayout_default);
|
|
56482
|
+
}
|
|
56483
|
+
|
|
56083
56484
|
// src/chart/labels/LabelsSeries.ts
|
|
56084
56485
|
var LabelsSeriesModel2 = class extends Series_default {
|
|
56085
56486
|
constructor() {
|
|
56086
56487
|
super(...arguments);
|
|
56087
56488
|
this.type = LabelsSeriesModel2.type;
|
|
56489
|
+
this.dataIndexById = {};
|
|
56088
56490
|
}
|
|
56089
56491
|
getInitialData(option, ecModel) {
|
|
56492
|
+
this.computedDataIndexById(option);
|
|
56090
56493
|
return createSeriesData_default(null, this, {
|
|
56091
56494
|
useEncodeDefaulter: true
|
|
56092
56495
|
});
|
|
@@ -56111,6 +56514,32 @@ var LabelsSeriesModel2 = class extends Series_default {
|
|
|
56111
56514
|
getZLevelKey() {
|
|
56112
56515
|
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
|
|
56113
56516
|
}
|
|
56517
|
+
computedDataIndexById(option) {
|
|
56518
|
+
const dataIndexById = {};
|
|
56519
|
+
if (!option.isShape) {
|
|
56520
|
+
each(option.data, function(item, index) {
|
|
56521
|
+
dataIndexById[item.id] = index;
|
|
56522
|
+
});
|
|
56523
|
+
}
|
|
56524
|
+
this.dataIndexById = dataIndexById;
|
|
56525
|
+
}
|
|
56526
|
+
getResetData(data) {
|
|
56527
|
+
if (this.option.isShape) {
|
|
56528
|
+
return;
|
|
56529
|
+
}
|
|
56530
|
+
const dataIndexById = this.dataIndexById;
|
|
56531
|
+
const that = this;
|
|
56532
|
+
each(data, function(item) {
|
|
56533
|
+
const index = dataIndexById[item.id];
|
|
56534
|
+
if (typeof index === "number") {
|
|
56535
|
+
that.option.data[index] = item;
|
|
56536
|
+
} else {
|
|
56537
|
+
that.option.data.push(item);
|
|
56538
|
+
}
|
|
56539
|
+
});
|
|
56540
|
+
this.computedDataIndexById(this.option);
|
|
56541
|
+
return this.option.data;
|
|
56542
|
+
}
|
|
56114
56543
|
};
|
|
56115
56544
|
var LabelsSeriesModel = LabelsSeriesModel2;
|
|
56116
56545
|
LabelsSeriesModel.type = "series.labels";
|
|
@@ -56684,7 +57113,7 @@ var labelsLayout = {
|
|
|
56684
57113
|
var labelsLayout_default = labelsLayout;
|
|
56685
57114
|
|
|
56686
57115
|
// src/chart/labels/install.ts
|
|
56687
|
-
function
|
|
57116
|
+
function install27(registers) {
|
|
56688
57117
|
registers.registerSeriesModel(LabelsSeries_default);
|
|
56689
57118
|
registers.registerChartView(LabelsView_default);
|
|
56690
57119
|
registers.registerLayout(labelsLayout_default);
|
|
@@ -56819,7 +57248,7 @@ var hLinesLayout = {
|
|
|
56819
57248
|
var hLinesLayout_default = hLinesLayout;
|
|
56820
57249
|
|
|
56821
57250
|
// src/chart/hlines/install.ts
|
|
56822
|
-
function
|
|
57251
|
+
function install28(registers) {
|
|
56823
57252
|
registers.registerChartView(HLinesView_default);
|
|
56824
57253
|
registers.registerSeriesModel(HLinesSeries_default);
|
|
56825
57254
|
registers.registerLayout(hLinesLayout_default);
|
|
@@ -57102,7 +57531,7 @@ var fillsLayout = {
|
|
|
57102
57531
|
var fillsLayout_default = fillsLayout;
|
|
57103
57532
|
|
|
57104
57533
|
// src/chart/fills/install.ts
|
|
57105
|
-
function
|
|
57534
|
+
function install29(registers) {
|
|
57106
57535
|
registers.registerChartView(FillsView_default);
|
|
57107
57536
|
registers.registerSeriesModel(FillsSeries_default);
|
|
57108
57537
|
registers.registerLayout(fillsLayout_default);
|
|
@@ -57306,7 +57735,7 @@ var bgColorLayout = {
|
|
|
57306
57735
|
var BgColorLayout_default = bgColorLayout;
|
|
57307
57736
|
|
|
57308
57737
|
// src/chart/bgColor/install.ts
|
|
57309
|
-
function
|
|
57738
|
+
function install30(registers) {
|
|
57310
57739
|
registers.registerChartView(BgColorView_default);
|
|
57311
57740
|
registers.registerSeriesModel(BgColorSeries_default);
|
|
57312
57741
|
registers.registerLayout(BgColorLayout_default);
|
|
@@ -57704,7 +58133,7 @@ HeatmapSeriesModel.defaultOption = {
|
|
|
57704
58133
|
var HeatmapSeries_default = HeatmapSeriesModel;
|
|
57705
58134
|
|
|
57706
58135
|
// src/chart/heatmap/install.ts
|
|
57707
|
-
function
|
|
58136
|
+
function install31(registers) {
|
|
57708
58137
|
registers.registerChartView(HeatmapView_default);
|
|
57709
58138
|
registers.registerSeriesModel(HeatmapSeries_default);
|
|
57710
58139
|
}
|
|
@@ -58267,7 +58696,7 @@ PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries_defau
|
|
|
58267
58696
|
var PictorialBarSeries_default = PictorialBarSeriesModel;
|
|
58268
58697
|
|
|
58269
58698
|
// src/chart/bar/installPictorialBar.ts
|
|
58270
|
-
function
|
|
58699
|
+
function install32(registers) {
|
|
58271
58700
|
registers.registerChartView(PictorialBarView_default);
|
|
58272
58701
|
registers.registerSeriesModel(PictorialBarSeries_default);
|
|
58273
58702
|
registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout2, "pictorialBar"));
|
|
@@ -58668,7 +59097,7 @@ function computeBaseline(data) {
|
|
|
58668
59097
|
}
|
|
58669
59098
|
|
|
58670
59099
|
// src/chart/themeRiver/install.ts
|
|
58671
|
-
function
|
|
59100
|
+
function install33(registers) {
|
|
58672
59101
|
registers.registerChartView(ThemeRiverView_default);
|
|
58673
59102
|
registers.registerSeriesModel(ThemeRiverSeries_default);
|
|
58674
59103
|
registers.registerLayout(themeRiverLayout);
|
|
@@ -59306,7 +59735,7 @@ function sunburstVisual(ecModel) {
|
|
|
59306
59735
|
}
|
|
59307
59736
|
|
|
59308
59737
|
// src/chart/sunburst/install.ts
|
|
59309
|
-
function
|
|
59738
|
+
function install34(registers) {
|
|
59310
59739
|
registers.registerChartView(SunburstView_default);
|
|
59311
59740
|
registers.registerSeriesModel(SunburstSeries_default);
|
|
59312
59741
|
registers.registerLayout(curry(sunburstLayout, "sunburst"));
|
|
@@ -60754,7 +61183,7 @@ function hasOwnPathData(shape) {
|
|
|
60754
61183
|
}
|
|
60755
61184
|
|
|
60756
61185
|
// src/chart/custom/install.ts
|
|
60757
|
-
function
|
|
61186
|
+
function install35(registers) {
|
|
60758
61187
|
registers.registerChartView(CustomView_default);
|
|
60759
61188
|
registers.registerSeriesModel(CustomSeries_default);
|
|
60760
61189
|
}
|
|
@@ -61482,7 +61911,7 @@ var AxisPointerModel_default = AxisPointerModel;
|
|
|
61482
61911
|
|
|
61483
61912
|
// src/component/axisPointer/globalListener.ts
|
|
61484
61913
|
var inner12 = makeInner();
|
|
61485
|
-
var
|
|
61914
|
+
var each10 = each;
|
|
61486
61915
|
function register(key, api2, handler) {
|
|
61487
61916
|
if (env_default.node) {
|
|
61488
61917
|
return;
|
|
@@ -61506,7 +61935,7 @@ function initGlobalListeners(zr, api2) {
|
|
|
61506
61935
|
function useHandler(eventType, cb) {
|
|
61507
61936
|
zr.on(eventType, function(e2) {
|
|
61508
61937
|
const dis = makeDispatchAction(api2);
|
|
61509
|
-
|
|
61938
|
+
each10(inner12(zr).records, function(record) {
|
|
61510
61939
|
record && cb(record, e2, dis.dispatchAction);
|
|
61511
61940
|
});
|
|
61512
61941
|
dispatchTooltipFinally(dis.pendings, api2);
|
|
@@ -61975,7 +62404,7 @@ function illegalPoint(point) {
|
|
|
61975
62404
|
}
|
|
61976
62405
|
|
|
61977
62406
|
// src/component/axisPointer/install.ts
|
|
61978
|
-
function
|
|
62407
|
+
function install36(registers) {
|
|
61979
62408
|
AxisView_default.registerAxisPointerClass("CartesianAxisPointer", CartesianAxisPointer_default);
|
|
61980
62409
|
registers.registerComponentModel(AxisPointerModel_default);
|
|
61981
62410
|
registers.registerComponentView(AxisPointerView_default);
|
|
@@ -62004,9 +62433,9 @@ function install35(registers) {
|
|
|
62004
62433
|
}
|
|
62005
62434
|
|
|
62006
62435
|
// src/component/grid/install.ts
|
|
62007
|
-
function
|
|
62436
|
+
function install37(registers) {
|
|
62008
62437
|
use(install6);
|
|
62009
|
-
use(
|
|
62438
|
+
use(install36);
|
|
62010
62439
|
}
|
|
62011
62440
|
|
|
62012
62441
|
// src/component/axisPointer/PolarAxisPointer.ts
|
|
@@ -63060,8 +63489,8 @@ var PolarView2 = class extends Component_default2 {
|
|
|
63060
63489
|
};
|
|
63061
63490
|
var PolarView = PolarView2;
|
|
63062
63491
|
PolarView.type = "polar";
|
|
63063
|
-
function
|
|
63064
|
-
use(
|
|
63492
|
+
function install38(registers) {
|
|
63493
|
+
use(install36);
|
|
63065
63494
|
AxisView_default.registerAxisPointerClass("PolarAxisPointer", PolarAxisPointer_default);
|
|
63066
63495
|
registers.registerCoordinateSystem("polar", polarCreator_default);
|
|
63067
63496
|
registers.registerComponentModel(PolarModel_default);
|
|
@@ -63524,8 +63953,8 @@ var SingleView2 = class extends Component_default2 {
|
|
|
63524
63953
|
};
|
|
63525
63954
|
var SingleView = SingleView2;
|
|
63526
63955
|
SingleView.type = "single";
|
|
63527
|
-
function
|
|
63528
|
-
use(
|
|
63956
|
+
function install39(registers) {
|
|
63957
|
+
use(install36);
|
|
63529
63958
|
AxisView_default.registerAxisPointerClass("SingleAxisPointer", SingleAxisPointer_default);
|
|
63530
63959
|
registers.registerComponentView(SingleView);
|
|
63531
63960
|
registers.registerComponentView(SingleAxisView_default);
|
|
@@ -64215,7 +64644,7 @@ function getCoordSys5(finder) {
|
|
|
64215
64644
|
var Calendar_default = Calendar;
|
|
64216
64645
|
|
|
64217
64646
|
// src/component/calendar/install.ts
|
|
64218
|
-
function
|
|
64647
|
+
function install40(registers) {
|
|
64219
64648
|
registers.registerComponentModel(CalendarModel_default);
|
|
64220
64649
|
registers.registerComponentView(CalendarView_default);
|
|
64221
64650
|
registers.registerCoordinateSystem("calendar", Calendar_default);
|
|
@@ -64604,7 +65033,7 @@ function setEventData(el, graphicModel, elOption) {
|
|
|
64604
65033
|
}
|
|
64605
65034
|
|
|
64606
65035
|
// src/component/graphic/install.ts
|
|
64607
|
-
function
|
|
65036
|
+
function install41(registers) {
|
|
64608
65037
|
registers.registerComponentModel(GraphicComponentModel);
|
|
64609
65038
|
registers.registerComponentView(GraphicComponentView);
|
|
64610
65039
|
registers.registerPreprocessor(function(option) {
|
|
@@ -65083,7 +65512,7 @@ SelectDataZoomView.type = "dataZoom.select";
|
|
|
65083
65512
|
var SelectZoomView_default = SelectDataZoomView;
|
|
65084
65513
|
|
|
65085
65514
|
// src/component/dataZoom/AxisProxy.ts
|
|
65086
|
-
var
|
|
65515
|
+
var each11 = each;
|
|
65087
65516
|
var asc2 = asc;
|
|
65088
65517
|
var leftMinVisibleBarCount = 2;
|
|
65089
65518
|
var rightMinVisibleBarCount = 2;
|
|
@@ -65138,7 +65567,7 @@ var AxisProxy = class {
|
|
|
65138
65567
|
const percentWindow = [];
|
|
65139
65568
|
const valueWindow = [];
|
|
65140
65569
|
let hasPropModeValue;
|
|
65141
|
-
|
|
65570
|
+
each11(["start", "end"], function(prop, idx) {
|
|
65142
65571
|
let boundPercent = opt[prop];
|
|
65143
65572
|
let boundValue = opt[prop + "Value"];
|
|
65144
65573
|
if (rangePropMode[idx] === "percent") {
|
|
@@ -65236,14 +65665,15 @@ var AxisProxy = class {
|
|
|
65236
65665
|
if (filterMode === "none") {
|
|
65237
65666
|
return;
|
|
65238
65667
|
}
|
|
65239
|
-
|
|
65668
|
+
each11(seriesModels, function(seriesModel) {
|
|
65240
65669
|
let seriesData = seriesModel.getData();
|
|
65241
65670
|
const dataDims = seriesData.mapDimensionsAll(axisDim);
|
|
65242
65671
|
if (!dataDims.length || seriesModel.get("notFilterData")) {
|
|
65243
65672
|
return;
|
|
65244
65673
|
}
|
|
65245
65674
|
const filterDataDims = seriesModel.getFilterDataDims?.();
|
|
65246
|
-
|
|
65675
|
+
const xWeakFilter = seriesModel.xFilterMode === "weakFilter" && axisDim === "x";
|
|
65676
|
+
if (filterMode === "weakFilter" || xWeakFilter) {
|
|
65247
65677
|
const store = seriesData.getStore();
|
|
65248
65678
|
const dataDimIndices = map(dataDims, (dim) => seriesData.getDimensionIndex(dim), seriesData);
|
|
65249
65679
|
seriesData.filterSelf(function(dataIndex) {
|
|
@@ -65266,7 +65696,7 @@ var AxisProxy = class {
|
|
|
65266
65696
|
});
|
|
65267
65697
|
} else {
|
|
65268
65698
|
const offset = seriesModel.get("offset");
|
|
65269
|
-
|
|
65699
|
+
each11(dataDims, function(dim) {
|
|
65270
65700
|
if (filterMode === "empty") {
|
|
65271
65701
|
seriesModel.setData(seriesData = seriesData.map(dim, function(value) {
|
|
65272
65702
|
return !isInWindow(value) ? NaN : value;
|
|
@@ -65292,7 +65722,7 @@ var AxisProxy = class {
|
|
|
65292
65722
|
}
|
|
65293
65723
|
});
|
|
65294
65724
|
}
|
|
65295
|
-
|
|
65725
|
+
each11(dataDims, function(dim) {
|
|
65296
65726
|
seriesData.setApproximateExtent(valueWindow, dim);
|
|
65297
65727
|
});
|
|
65298
65728
|
});
|
|
@@ -65307,7 +65737,7 @@ var AxisProxy = class {
|
|
|
65307
65737
|
const minMaxSpan = this._minMaxSpan = {};
|
|
65308
65738
|
const dataZoomModel = this._dataZoomModel;
|
|
65309
65739
|
const dataExtent = this._dataExtent;
|
|
65310
|
-
|
|
65740
|
+
each11(["min", "max"], function(minMax) {
|
|
65311
65741
|
let percentSpan = dataZoomModel.get(minMax + "Span");
|
|
65312
65742
|
let valueSpan = dataZoomModel.get(minMax + "ValueSpan");
|
|
65313
65743
|
valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan));
|
|
@@ -65343,7 +65773,7 @@ function calculateDataExtent(axisProxy, axisDim, seriesModels) {
|
|
|
65343
65773
|
const dataExtent = [Infinity, -Infinity];
|
|
65344
65774
|
const axisModel = axisProxy.getAxisModel();
|
|
65345
65775
|
const dataFromSeriesName = axisModel.axis.model.get("dataFromSeriesName");
|
|
65346
|
-
|
|
65776
|
+
each11(seriesModels, function(seriesModel) {
|
|
65347
65777
|
if (dataFromSeriesName && seriesModel.name !== dataFromSeriesName) {
|
|
65348
65778
|
return;
|
|
65349
65779
|
}
|
|
@@ -65476,7 +65906,7 @@ function installCommon(registers) {
|
|
|
65476
65906
|
}
|
|
65477
65907
|
|
|
65478
65908
|
// src/component/dataZoom/installDataZoomSelect.ts
|
|
65479
|
-
function
|
|
65909
|
+
function install42(registers) {
|
|
65480
65910
|
registers.registerComponentModel(SelectZoomModel_default);
|
|
65481
65911
|
registers.registerComponentView(SelectZoomView_default);
|
|
65482
65912
|
installCommon(registers);
|
|
@@ -66363,11 +66793,11 @@ registerAction({
|
|
|
66363
66793
|
var DataView_default = DataView;
|
|
66364
66794
|
|
|
66365
66795
|
// src/component/dataZoom/history.ts
|
|
66366
|
-
var
|
|
66796
|
+
var each12 = each;
|
|
66367
66797
|
var inner16 = makeInner();
|
|
66368
66798
|
function push(ecModel, newSnapshot) {
|
|
66369
66799
|
const storedSnapshots = getStoreSnapshots(ecModel);
|
|
66370
|
-
|
|
66800
|
+
each12(newSnapshot, function(batchItem, dataZoomId) {
|
|
66371
66801
|
let i = storedSnapshots.length - 1;
|
|
66372
66802
|
for (; i >= 0; i--) {
|
|
66373
66803
|
const snapshot = storedSnapshots[i];
|
|
@@ -66394,7 +66824,7 @@ function pop(ecModel) {
|
|
|
66394
66824
|
const head = storedSnapshots[storedSnapshots.length - 1];
|
|
66395
66825
|
storedSnapshots.length > 1 && storedSnapshots.pop();
|
|
66396
66826
|
const snapshot = {};
|
|
66397
|
-
|
|
66827
|
+
each12(head, function(batchItem, dataZoomId) {
|
|
66398
66828
|
for (let i = storedSnapshots.length - 1; i >= 0; i--) {
|
|
66399
66829
|
batchItem = storedSnapshots[i][dataZoomId];
|
|
66400
66830
|
if (batchItem) {
|
|
@@ -66707,7 +67137,7 @@ function getSize2(xyMinMax) {
|
|
|
66707
67137
|
var BrushTargetManager_default = BrushTargetManager;
|
|
66708
67138
|
|
|
66709
67139
|
// src/component/toolbox/feature/DataZoom.ts
|
|
66710
|
-
var
|
|
67140
|
+
var each13 = each;
|
|
66711
67141
|
var DATA_ZOOM_ID_BASE = makeInternalComponentId("toolbox-dataZoom_");
|
|
66712
67142
|
var DataZoomFeature = class extends ToolboxFeature {
|
|
66713
67143
|
render(featureModel, ecModel, api2, payload) {
|
|
@@ -66775,7 +67205,7 @@ var DataZoomFeature = class extends ToolboxFeature {
|
|
|
66775
67205
|
}
|
|
66776
67206
|
_dispatchZoomAction(snapshot) {
|
|
66777
67207
|
const batch = [];
|
|
66778
|
-
|
|
67208
|
+
each13(snapshot, function(batchItem, dataZoomId) {
|
|
66779
67209
|
batch.push(clone(batchItem));
|
|
66780
67210
|
});
|
|
66781
67211
|
batch.length && this.api.dispatchAction({
|
|
@@ -66858,8 +67288,8 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
66858
67288
|
const dzOptions = [];
|
|
66859
67289
|
const finder = makeAxisFinder(dzFeatureModel);
|
|
66860
67290
|
const finderResult = parseFinder(ecModel, finder);
|
|
66861
|
-
|
|
66862
|
-
|
|
67291
|
+
each13(finderResult.xAxisModels, (axisModel) => buildInternalOptions(axisModel, "xAxis", "xAxisIndex"));
|
|
67292
|
+
each13(finderResult.yAxisModels, (axisModel) => buildInternalOptions(axisModel, "yAxis", "yAxisIndex"));
|
|
66863
67293
|
function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) {
|
|
66864
67294
|
const axisIndex = axisModel.componentIndex;
|
|
66865
67295
|
const newOpt = {
|
|
@@ -66876,7 +67306,7 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
66876
67306
|
var DataZoom_default = DataZoomFeature;
|
|
66877
67307
|
|
|
66878
67308
|
// src/component/toolbox/install.ts
|
|
66879
|
-
function
|
|
67309
|
+
function install43(registers) {
|
|
66880
67310
|
registers.registerComponentModel(ToolboxModel_default);
|
|
66881
67311
|
registers.registerComponentView(ToolboxView_default);
|
|
66882
67312
|
registerFeature("saveAsImage", SaveAsImage_default);
|
|
@@ -66884,7 +67314,7 @@ function install42(registers) {
|
|
|
66884
67314
|
registerFeature("dataView", DataView_default);
|
|
66885
67315
|
registerFeature("dataZoom", DataZoom_default);
|
|
66886
67316
|
registerFeature("restore", Restore_default);
|
|
66887
|
-
use(
|
|
67317
|
+
use(install42);
|
|
66888
67318
|
}
|
|
66889
67319
|
|
|
66890
67320
|
// src/component/tooltip/TooltipModel.ts
|
|
@@ -68052,8 +68482,8 @@ function findComponentReference(payload, ecModel, api2) {
|
|
|
68052
68482
|
var TooltipView_default = TooltipView;
|
|
68053
68483
|
|
|
68054
68484
|
// src/component/tooltip/install.ts
|
|
68055
|
-
function
|
|
68056
|
-
use(
|
|
68485
|
+
function install44(registers) {
|
|
68486
|
+
use(install36);
|
|
68057
68487
|
registers.registerComponentModel(TooltipModel_default);
|
|
68058
68488
|
registers.registerComponentView(TooltipView_default);
|
|
68059
68489
|
registers.registerAction({
|
|
@@ -68100,18 +68530,18 @@ function brushPreprocessor(option, isNew) {
|
|
|
68100
68530
|
}
|
|
68101
68531
|
}
|
|
68102
68532
|
function removeDuplicate(arr) {
|
|
68103
|
-
const
|
|
68533
|
+
const map6 = {};
|
|
68104
68534
|
each(arr, function(val) {
|
|
68105
|
-
|
|
68535
|
+
map6[val] = 1;
|
|
68106
68536
|
});
|
|
68107
68537
|
arr.length = 0;
|
|
68108
|
-
each(
|
|
68538
|
+
each(map6, function(flag, val) {
|
|
68109
68539
|
arr.push(val);
|
|
68110
68540
|
});
|
|
68111
68541
|
}
|
|
68112
68542
|
|
|
68113
68543
|
// src/visual/visualSolution.ts
|
|
68114
|
-
var
|
|
68544
|
+
var each14 = each;
|
|
68115
68545
|
function hasKeys(obj) {
|
|
68116
68546
|
if (obj) {
|
|
68117
68547
|
for (const name in obj) {
|
|
@@ -68123,9 +68553,9 @@ function hasKeys(obj) {
|
|
|
68123
68553
|
}
|
|
68124
68554
|
function createVisualMappings(option, stateList, supplementVisualOption) {
|
|
68125
68555
|
const visualMappings = {};
|
|
68126
|
-
|
|
68556
|
+
each14(stateList, function(state) {
|
|
68127
68557
|
const mappings = visualMappings[state] = createMappings();
|
|
68128
|
-
|
|
68558
|
+
each14(option[state], function(visualData, visualType) {
|
|
68129
68559
|
if (!VisualMapping_default.isValidType(visualType)) {
|
|
68130
68560
|
return;
|
|
68131
68561
|
}
|
|
@@ -68669,7 +69099,7 @@ var BrushFeature = class extends ToolboxFeature {
|
|
|
68669
69099
|
var Brush_default = BrushFeature;
|
|
68670
69100
|
|
|
68671
69101
|
// src/component/brush/install.ts
|
|
68672
|
-
function
|
|
69102
|
+
function install45(registers) {
|
|
68673
69103
|
registers.registerComponentView(BrushView_default);
|
|
68674
69104
|
registers.registerComponentModel(BrushModel_default);
|
|
68675
69105
|
registers.registerPreprocessor(brushPreprocessor);
|
|
@@ -68816,7 +69246,7 @@ var TitleView2 = class extends Component_default2 {
|
|
|
68816
69246
|
};
|
|
68817
69247
|
var TitleView = TitleView2;
|
|
68818
69248
|
TitleView.type = "title";
|
|
68819
|
-
function
|
|
69249
|
+
function install46(registers) {
|
|
68820
69250
|
registers.registerComponentModel(TitleModel);
|
|
68821
69251
|
registers.registerComponentView(TitleView);
|
|
68822
69252
|
}
|
|
@@ -68828,6 +69258,15 @@ var TableModel2 = class extends Component_default {
|
|
|
68828
69258
|
this.type = TableModel2.type;
|
|
68829
69259
|
this.ableDataZoomUpdate = false;
|
|
68830
69260
|
}
|
|
69261
|
+
mergeTables(tables) {
|
|
69262
|
+
const newTableById = {};
|
|
69263
|
+
each(tables, function(table) {
|
|
69264
|
+
newTableById[table.id] = table;
|
|
69265
|
+
});
|
|
69266
|
+
this.option.tables = map(this.option.tables, function(table) {
|
|
69267
|
+
return newTableById[table.id] || table;
|
|
69268
|
+
});
|
|
69269
|
+
}
|
|
68831
69270
|
setAbleDataZoomUpdate(ableDataZoomUpdate) {
|
|
68832
69271
|
this.ableDataZoomUpdate = ableDataZoomUpdate;
|
|
68833
69272
|
}
|
|
@@ -68931,12 +69370,23 @@ var TableView2 = class extends Component_default2 {
|
|
|
68931
69370
|
return;
|
|
68932
69371
|
}
|
|
68933
69372
|
const tables = tableModel.get("tables");
|
|
69373
|
+
const tableByPosition = {};
|
|
69374
|
+
each(tables, function(table) {
|
|
69375
|
+
if (tableByPosition[table.position] && tableByPosition[table.position].line > table.line) {
|
|
69376
|
+
return;
|
|
69377
|
+
}
|
|
69378
|
+
tableByPosition[table.position] = table;
|
|
69379
|
+
});
|
|
69380
|
+
const visibleTables = [];
|
|
69381
|
+
each(tableByPosition, function(table) {
|
|
69382
|
+
visibleTables.push(table);
|
|
69383
|
+
});
|
|
68934
69384
|
const grid = ecModel.getComponent("grid", 0);
|
|
68935
69385
|
const z = tableModel.get("z");
|
|
68936
69386
|
const rect = grid.coordinateSystem.getRect();
|
|
68937
69387
|
const paddings = tableModel.get("paddings");
|
|
68938
69388
|
const tableAttrByIndex = {};
|
|
68939
|
-
each(
|
|
69389
|
+
each(visibleTables, function(item, index) {
|
|
68940
69390
|
const columnWidthByIndex = [];
|
|
68941
69391
|
const rowHeightByIndex = [];
|
|
68942
69392
|
const margeCellByKey = {};
|
|
@@ -69006,7 +69456,7 @@ var TableView2 = class extends Component_default2 {
|
|
|
69006
69456
|
};
|
|
69007
69457
|
});
|
|
69008
69458
|
const group = this.group;
|
|
69009
|
-
each(
|
|
69459
|
+
each(visibleTables, function(item, index) {
|
|
69010
69460
|
const {x, y, columnObjByIndex, rowObjByIndex, width, height} = tableAttrByIndex[index];
|
|
69011
69461
|
const {bgcolor, frame_color, frame_width = 0, border_width = 0, border_color, columns} = item;
|
|
69012
69462
|
const tableGroup = new Group_default({x, y});
|
|
@@ -69161,7 +69611,7 @@ TableView.type = "table";
|
|
|
69161
69611
|
var TableView_default = TableView;
|
|
69162
69612
|
|
|
69163
69613
|
// src/component/table/install.ts
|
|
69164
|
-
function
|
|
69614
|
+
function install47(registers) {
|
|
69165
69615
|
registers.registerComponentModel(TableModel_default);
|
|
69166
69616
|
registers.registerComponentView(TableView_default);
|
|
69167
69617
|
}
|
|
@@ -70015,7 +70465,7 @@ function has(obj, attr) {
|
|
|
70015
70465
|
}
|
|
70016
70466
|
|
|
70017
70467
|
// src/component/timeline/install.ts
|
|
70018
|
-
function
|
|
70468
|
+
function install48(registers) {
|
|
70019
70469
|
registers.registerComponentModel(SliderTimelineModel_default);
|
|
70020
70470
|
registers.registerComponentView(SliderTimelineView_default);
|
|
70021
70471
|
registers.registerSubTypeDefaulter("timeline", function() {
|
|
@@ -70456,7 +70906,7 @@ function createData(coordSys, seriesModel, mpModel) {
|
|
|
70456
70906
|
var MarkPointView_default = MarkPointView;
|
|
70457
70907
|
|
|
70458
70908
|
// src/component/marker/installMarkPoint.ts
|
|
70459
|
-
function
|
|
70909
|
+
function install49(registers) {
|
|
70460
70910
|
registers.registerComponentModel(MarkPointModel_default);
|
|
70461
70911
|
registers.registerComponentView(MarkPointView_default);
|
|
70462
70912
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -70774,7 +71224,7 @@ function createList2(coordSys, seriesModel, mlModel) {
|
|
|
70774
71224
|
var MarkLineView_default = MarkLineView;
|
|
70775
71225
|
|
|
70776
71226
|
// src/component/marker/installMarkLine.ts
|
|
70777
|
-
function
|
|
71227
|
+
function install50(registers) {
|
|
70778
71228
|
registers.registerComponentModel(MarkLineModel_default);
|
|
70779
71229
|
registers.registerComponentView(MarkLineView_default);
|
|
70780
71230
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -71088,7 +71538,7 @@ function createList3(coordSys, seriesModel, maModel) {
|
|
|
71088
71538
|
var MarkAreaView_default = MarkAreaView;
|
|
71089
71539
|
|
|
71090
71540
|
// src/component/marker/installMarkArea.ts
|
|
71091
|
-
function
|
|
71541
|
+
function install51(registers) {
|
|
71092
71542
|
registers.registerComponentModel(MarkAreaModel_default);
|
|
71093
71543
|
registers.registerComponentView(MarkAreaView_default);
|
|
71094
71544
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -71731,7 +72181,7 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
71731
72181
|
var MarkLabelView_default = MarkLabelView;
|
|
71732
72182
|
|
|
71733
72183
|
// src/component/marker/installMarkLabel.ts
|
|
71734
|
-
function
|
|
72184
|
+
function install52(registers) {
|
|
71735
72185
|
registers.registerComponentModel(MarkLabelModal_default);
|
|
71736
72186
|
registers.registerComponentView(MarkLabelView_default);
|
|
71737
72187
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -71974,7 +72424,7 @@ var LegendModel_default = LegendModel;
|
|
|
71974
72424
|
|
|
71975
72425
|
// src/component/legend/LegendView.ts
|
|
71976
72426
|
var curry2 = curry;
|
|
71977
|
-
var
|
|
72427
|
+
var each15 = each;
|
|
71978
72428
|
var Group3 = Group_default;
|
|
71979
72429
|
var LegendView2 = class extends Component_default2 {
|
|
71980
72430
|
constructor() {
|
|
@@ -72038,7 +72488,7 @@ var LegendView2 = class extends Component_default2 {
|
|
|
72038
72488
|
ecModel.eachRawSeries(function(seriesModel) {
|
|
72039
72489
|
!seriesModel.get("legendHoverLink") && excludeSeriesId.push(seriesModel.id);
|
|
72040
72490
|
});
|
|
72041
|
-
|
|
72491
|
+
each15(legendModel.getData(), function(legendItemModel, dataIndex) {
|
|
72042
72492
|
const name = legendItemModel.get("name");
|
|
72043
72493
|
if (!this.newlineDisabled && (name === "" || name === "\n")) {
|
|
72044
72494
|
const g = new Group3();
|
|
@@ -72110,7 +72560,7 @@ var LegendView2 = class extends Component_default2 {
|
|
|
72110
72560
|
}
|
|
72111
72561
|
_createSelector(selector2, legendModel, api2, orient, selectorPosition) {
|
|
72112
72562
|
const selectorGroup = this.getSelectorGroup();
|
|
72113
|
-
|
|
72563
|
+
each15(selector2, function createSelectorButton(selectorItem) {
|
|
72114
72564
|
const type = selectorItem.type;
|
|
72115
72565
|
const labelText = new Text_default({
|
|
72116
72566
|
style: {
|
|
@@ -72263,7 +72713,7 @@ function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualSt
|
|
|
72263
72713
|
if (style.lineWidth === "auto") {
|
|
72264
72714
|
style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;
|
|
72265
72715
|
}
|
|
72266
|
-
|
|
72716
|
+
each15(style, (propVal, propName) => {
|
|
72267
72717
|
style[propName] === "inherit" && (style[propName] = visualStyle[propName]);
|
|
72268
72718
|
});
|
|
72269
72719
|
}
|
|
@@ -72413,7 +72863,7 @@ function installLegendAction(registers) {
|
|
|
72413
72863
|
}
|
|
72414
72864
|
|
|
72415
72865
|
// src/component/legend/installLegendPlain.ts
|
|
72416
|
-
function
|
|
72866
|
+
function install53(registers) {
|
|
72417
72867
|
registers.registerComponentModel(LegendModel_default);
|
|
72418
72868
|
registers.registerComponentView(LegendView_default);
|
|
72419
72869
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);
|
|
@@ -72743,17 +73193,17 @@ function installScrollableLegendAction(registers) {
|
|
|
72743
73193
|
}
|
|
72744
73194
|
|
|
72745
73195
|
// src/component/legend/installLegendScroll.ts
|
|
72746
|
-
function
|
|
72747
|
-
use(
|
|
73196
|
+
function install54(registers) {
|
|
73197
|
+
use(install53);
|
|
72748
73198
|
registers.registerComponentModel(ScrollableLegendModel_default);
|
|
72749
73199
|
registers.registerComponentView(ScrollableLegendView_default);
|
|
72750
73200
|
installScrollableLegendAction(registers);
|
|
72751
73201
|
}
|
|
72752
73202
|
|
|
72753
73203
|
// src/component/legend/install.ts
|
|
72754
|
-
function
|
|
72755
|
-
use(install52);
|
|
73204
|
+
function install55(registers) {
|
|
72756
73205
|
use(install53);
|
|
73206
|
+
use(install54);
|
|
72757
73207
|
}
|
|
72758
73208
|
|
|
72759
73209
|
// src/component/dataZoom/InsideZoomModel.ts
|
|
@@ -73170,7 +73620,7 @@ var getDirectionInfo = {
|
|
|
73170
73620
|
var InsideZoomView_default = InsideZoomView;
|
|
73171
73621
|
|
|
73172
73622
|
// src/component/dataZoom/installDataZoomInside.ts
|
|
73173
|
-
function
|
|
73623
|
+
function install56(registers) {
|
|
73174
73624
|
installCommon(registers);
|
|
73175
73625
|
registers.registerComponentModel(InsideZoomModel_default);
|
|
73176
73626
|
registers.registerComponentView(InsideZoomView_default);
|
|
@@ -73917,8 +74367,8 @@ var SliderZoomView2 = class extends DataZoomView_default {
|
|
|
73917
74367
|
var SliderZoomView = SliderZoomView2;
|
|
73918
74368
|
SliderZoomView.type = "dataZoom.slider";
|
|
73919
74369
|
function getOtherDim(thisDim) {
|
|
73920
|
-
const
|
|
73921
|
-
return
|
|
74370
|
+
const map6 = {x: "y", y: "x", radius: "angle", angle: "radius"};
|
|
74371
|
+
return map6[thisDim];
|
|
73922
74372
|
}
|
|
73923
74373
|
function getCursor(orient) {
|
|
73924
74374
|
return orient === "vertical" ? "ns-resize" : "ew-resize";
|
|
@@ -73926,16 +74376,16 @@ function getCursor(orient) {
|
|
|
73926
74376
|
var SliderZoomView_default = SliderZoomView;
|
|
73927
74377
|
|
|
73928
74378
|
// src/component/dataZoom/installDataZoomSlider.ts
|
|
73929
|
-
function
|
|
74379
|
+
function install57(registers) {
|
|
73930
74380
|
registers.registerComponentModel(SliderZoomModel_default);
|
|
73931
74381
|
registers.registerComponentView(SliderZoomView_default);
|
|
73932
74382
|
installCommon(registers);
|
|
73933
74383
|
}
|
|
73934
74384
|
|
|
73935
74385
|
// src/component/dataZoom/install.ts
|
|
73936
|
-
function
|
|
73937
|
-
use(install55);
|
|
74386
|
+
function install58(registers) {
|
|
73938
74387
|
use(install56);
|
|
74388
|
+
use(install57);
|
|
73939
74389
|
}
|
|
73940
74390
|
|
|
73941
74391
|
// src/visual/visualDefault.ts
|
|
@@ -73985,7 +74435,7 @@ var visualDefault_default = visualDefault;
|
|
|
73985
74435
|
var mapVisual2 = VisualMapping_default.mapVisual;
|
|
73986
74436
|
var eachVisual = VisualMapping_default.eachVisual;
|
|
73987
74437
|
var isArray2 = isArray;
|
|
73988
|
-
var
|
|
74438
|
+
var each16 = each;
|
|
73989
74439
|
var asc3 = asc;
|
|
73990
74440
|
var linearMap2 = linearMap;
|
|
73991
74441
|
var VisualMapModel2 = class extends Component_default {
|
|
@@ -74135,7 +74585,7 @@ var VisualMapModel2 = class extends Component_default {
|
|
|
74135
74585
|
let optAbsent = base3[stateAbsent];
|
|
74136
74586
|
if (optExist && !optAbsent) {
|
|
74137
74587
|
optAbsent = base3[stateAbsent] = {};
|
|
74138
|
-
|
|
74588
|
+
each16(optExist, function(visualData, visualType) {
|
|
74139
74589
|
if (!VisualMapping_default.isValidType(visualType)) {
|
|
74140
74590
|
return;
|
|
74141
74591
|
}
|
|
@@ -74155,7 +74605,7 @@ var VisualMapModel2 = class extends Component_default {
|
|
|
74155
74605
|
const inactiveColor = this.get("inactiveColor");
|
|
74156
74606
|
const itemSymbol = this.getItemSymbol();
|
|
74157
74607
|
const defaultSymbol = itemSymbol || "roundRect";
|
|
74158
|
-
|
|
74608
|
+
each16(this.stateList, function(state) {
|
|
74159
74609
|
const itemSize = this.itemSize;
|
|
74160
74610
|
let visuals = controller2[state];
|
|
74161
74611
|
if (!visuals) {
|
|
@@ -74515,7 +74965,7 @@ function makeHighDownBatch(batch, visualMapModel) {
|
|
|
74515
74965
|
|
|
74516
74966
|
// src/component/visualMap/ContinuousView.ts
|
|
74517
74967
|
var linearMap3 = linearMap;
|
|
74518
|
-
var
|
|
74968
|
+
var each17 = each;
|
|
74519
74969
|
var mathMin11 = Math.min;
|
|
74520
74970
|
var mathMax11 = Math.max;
|
|
74521
74971
|
var HOVER_LINK_SIZE = 12;
|
|
@@ -74843,7 +75293,7 @@ var ContinuousView2 = class extends VisualMapView_default {
|
|
|
74843
75293
|
const handleLabels = shapes.handleLabels;
|
|
74844
75294
|
const itemSize = visualMapModel.itemSize;
|
|
74845
75295
|
const dataExtent = visualMapModel.getExtent();
|
|
74846
|
-
|
|
75296
|
+
each17([0, 1], function(handleIndex) {
|
|
74847
75297
|
const handleThumb = handleThumbs[handleIndex];
|
|
74848
75298
|
handleThumb.setStyle("fill", visualInRange.handlesColor[handleIndex]);
|
|
74849
75299
|
handleThumb.y = handleEnds[handleIndex];
|
|
@@ -75149,13 +75599,13 @@ function getColorVisual(seriesModel, visualMapModel, value, valueState) {
|
|
|
75149
75599
|
}
|
|
75150
75600
|
|
|
75151
75601
|
// src/component/visualMap/preprocessor.ts
|
|
75152
|
-
var
|
|
75602
|
+
var each18 = each;
|
|
75153
75603
|
function visualMapPreprocessor(option) {
|
|
75154
75604
|
let visualMap = option && option.visualMap;
|
|
75155
75605
|
if (!isArray(visualMap)) {
|
|
75156
75606
|
visualMap = visualMap ? [visualMap] : [];
|
|
75157
75607
|
}
|
|
75158
|
-
|
|
75608
|
+
each18(visualMap, function(opt) {
|
|
75159
75609
|
if (!opt) {
|
|
75160
75610
|
return;
|
|
75161
75611
|
}
|
|
@@ -75165,7 +75615,7 @@ function visualMapPreprocessor(option) {
|
|
|
75165
75615
|
}
|
|
75166
75616
|
const pieces = opt.pieces;
|
|
75167
75617
|
if (pieces && isArray(pieces)) {
|
|
75168
|
-
|
|
75618
|
+
each18(pieces, function(piece) {
|
|
75169
75619
|
if (isObject(piece)) {
|
|
75170
75620
|
if (has2(piece, "start") && !has2(piece, "min")) {
|
|
75171
75621
|
piece.min = piece.start;
|
|
@@ -75200,7 +75650,7 @@ function installCommon2(registers) {
|
|
|
75200
75650
|
}
|
|
75201
75651
|
|
|
75202
75652
|
// src/component/visualMap/installVisualMapContinuous.ts
|
|
75203
|
-
function
|
|
75653
|
+
function install59(registers) {
|
|
75204
75654
|
registers.registerComponentModel(ContinuousModel_default);
|
|
75205
75655
|
registers.registerComponentView(ContinuousView_default);
|
|
75206
75656
|
installCommon2(registers);
|
|
@@ -75640,16 +76090,16 @@ PiecewiseVisualMapView.type = "visualMap.piecewise";
|
|
|
75640
76090
|
var PiecewiseView_default = PiecewiseVisualMapView;
|
|
75641
76091
|
|
|
75642
76092
|
// src/component/visualMap/installVisualMapPiecewise.ts
|
|
75643
|
-
function
|
|
76093
|
+
function install60(registers) {
|
|
75644
76094
|
registers.registerComponentModel(PiecewiseModel_default);
|
|
75645
76095
|
registers.registerComponentView(PiecewiseView_default);
|
|
75646
76096
|
installCommon2(registers);
|
|
75647
76097
|
}
|
|
75648
76098
|
|
|
75649
76099
|
// src/component/visualMap/install.ts
|
|
75650
|
-
function
|
|
75651
|
-
use(install58);
|
|
76100
|
+
function install61(registers) {
|
|
75652
76101
|
use(install59);
|
|
76102
|
+
use(install60);
|
|
75653
76103
|
}
|
|
75654
76104
|
|
|
75655
76105
|
// src/visual/aria.ts
|
|
@@ -75845,7 +76295,7 @@ function ariaPreprocessor(option) {
|
|
|
75845
76295
|
}
|
|
75846
76296
|
|
|
75847
76297
|
// src/component/aria/install.ts
|
|
75848
|
-
function
|
|
76298
|
+
function install62(registers) {
|
|
75849
76299
|
registers.registerPreprocessor(ariaPreprocessor);
|
|
75850
76300
|
registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);
|
|
75851
76301
|
}
|
|
@@ -76183,7 +76633,7 @@ var sortTransform = {
|
|
|
76183
76633
|
};
|
|
76184
76634
|
|
|
76185
76635
|
// src/component/transform/install.ts
|
|
76186
|
-
function
|
|
76636
|
+
function install63(registers) {
|
|
76187
76637
|
registers.registerTransform(filterTransform);
|
|
76188
76638
|
registers.registerTransform(sortTransform);
|
|
76189
76639
|
}
|
|
@@ -76221,7 +76671,7 @@ var DatasetView = class extends Component_default2 {
|
|
|
76221
76671
|
}
|
|
76222
76672
|
};
|
|
76223
76673
|
DatasetView.type = "dataset";
|
|
76224
|
-
function
|
|
76674
|
+
function install64(registers) {
|
|
76225
76675
|
registers.registerComponentModel(DatasetModel);
|
|
76226
76676
|
registers.registerComponentView(DatasetView);
|
|
76227
76677
|
}
|
|
@@ -77946,25 +78396,25 @@ use([
|
|
|
77946
78396
|
install25,
|
|
77947
78397
|
install26,
|
|
77948
78398
|
install27,
|
|
77949
|
-
install29,
|
|
77950
78399
|
install28,
|
|
77951
78400
|
install30,
|
|
78401
|
+
install29,
|
|
77952
78402
|
install31,
|
|
77953
78403
|
install32,
|
|
77954
78404
|
install33,
|
|
77955
|
-
install34
|
|
78405
|
+
install34,
|
|
78406
|
+
install35
|
|
77956
78407
|
]);
|
|
77957
|
-
use(install36);
|
|
77958
78408
|
use(install37);
|
|
77959
|
-
use(install10);
|
|
77960
78409
|
use(install38);
|
|
77961
|
-
use(
|
|
78410
|
+
use(install10);
|
|
77962
78411
|
use(install39);
|
|
78412
|
+
use(install17);
|
|
77963
78413
|
use(install40);
|
|
77964
|
-
use(
|
|
78414
|
+
use(install41);
|
|
77965
78415
|
use(install43);
|
|
77966
|
-
use(install35);
|
|
77967
78416
|
use(install44);
|
|
78417
|
+
use(install36);
|
|
77968
78418
|
use(install45);
|
|
77969
78419
|
use(install46);
|
|
77970
78420
|
use(install47);
|
|
@@ -77972,16 +78422,17 @@ use(install48);
|
|
|
77972
78422
|
use(install49);
|
|
77973
78423
|
use(install50);
|
|
77974
78424
|
use(install51);
|
|
77975
|
-
use(
|
|
77976
|
-
use(install57);
|
|
78425
|
+
use(install52);
|
|
77977
78426
|
use(install55);
|
|
77978
|
-
use(install56);
|
|
77979
|
-
use(install60);
|
|
77980
78427
|
use(install58);
|
|
77981
|
-
use(
|
|
78428
|
+
use(install56);
|
|
78429
|
+
use(install57);
|
|
77982
78430
|
use(install61);
|
|
78431
|
+
use(install59);
|
|
78432
|
+
use(install60);
|
|
77983
78433
|
use(install62);
|
|
77984
78434
|
use(install63);
|
|
78435
|
+
use(install64);
|
|
77985
78436
|
use(installUniversalTransition);
|
|
77986
78437
|
use(installLabelLayout);
|
|
77987
78438
|
|