tvcharts 0.8.65 → 0.8.67
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 +2109 -418
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -2
- package/lib/chart/playbackOrder/PlaybackHtmlContent.js +179 -0
- package/lib/chart/playbackOrder/PlaybackOrderLayout.js +108 -0
- package/lib/chart/playbackOrder/PlaybackOrderSeries.js +103 -0
- package/lib/chart/playbackOrder/PlaybackOrderView.js +303 -0
- package/lib/chart/playbackOrder/SymbolPath.js +87 -0
- package/lib/chart/playbackOrder/constants.js +33 -0
- package/lib/chart/playbackOrder/install.js +52 -0
- package/lib/component/axisPointer/AxisPointerView.js +1 -1
- package/lib/component/marker/MarkLabelView.js +17 -3
- package/lib/component/playback/PlaybackOrderModel.js +6 -8
- package/lib/component/playback/PlaybackOrderView.js +1163 -63
- package/lib/component/playback/PlaybackSelectModel.js +2 -2
- package/lib/component/playback/PlaybackSelectView.js +51 -8
- package/lib/core/ExtensionAPI.js +1 -1
- package/lib/core/echarts.js +51 -3
- package/lib/export/charts.js +1 -0
- package/lib/model/Global.js +7 -1
- package/lib/util/color.js +85 -1
- package/lib/util/symbol.js +145 -0
- package/package.json +1 -1
- package/types/dist/charts.d.ts +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/core.d.ts +1 -1
- package/types/dist/echarts.d.ts +7 -1
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +12 -4
- package/types/src/chart/playbackOrder/PlaybackHtmlContent.d.ts +24 -0
- package/types/src/chart/playbackOrder/PlaybackOrderLayout.d.ts +3 -0
- package/types/src/chart/playbackOrder/PlaybackOrderSeries.d.ts +51 -0
- package/types/src/chart/playbackOrder/PlaybackOrderView.d.ts +26 -0
- package/types/src/chart/playbackOrder/SymbolPath.d.ts +20 -0
- package/types/src/chart/playbackOrder/constants.d.ts +8 -0
- package/types/src/chart/playbackOrder/install.d.ts +2 -0
- package/types/src/component/marker/MarkLabelView.d.ts +2 -2
- package/types/src/component/playback/PlaybackOrderModel.d.ts +6 -1
- package/types/src/component/playback/PlaybackOrderView.d.ts +55 -2
- package/types/src/component/playback/PlaybackSelectView.d.ts +2 -0
- package/types/src/core/echarts.d.ts +5 -0
- package/types/src/export/charts.d.ts +1 -0
- package/types/src/model/Global.d.ts +1 -0
- package/types/src/util/color.d.ts +9 -1
- package/types/src/util/types.d.ts +1 -0
package/dist/echarts.js
CHANGED
|
@@ -32,11 +32,13 @@ __export(exports, {
|
|
|
32
32
|
color: () => color_exports,
|
|
33
33
|
colorToRgba: () => colorToRgba,
|
|
34
34
|
connect: () => connect,
|
|
35
|
+
connectLayoutAction: () => connectLayoutAction,
|
|
35
36
|
connectLayouts: () => connectLayouts,
|
|
36
37
|
dataTool: () => dataTool,
|
|
37
38
|
dependencies: () => dependencies,
|
|
38
39
|
disConnect: () => disConnect,
|
|
39
40
|
disconnect: () => disconnect,
|
|
41
|
+
disconnectLayoutAction: () => disconnectLayoutAction,
|
|
40
42
|
disconnectLayouts: () => disconnectLayouts,
|
|
41
43
|
dispose: () => dispose2,
|
|
42
44
|
env: () => env_default,
|
|
@@ -230,16 +232,16 @@ var OFFSET = 20;
|
|
|
230
232
|
var SCALE = 100;
|
|
231
233
|
var defaultWidthMapStr = `007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;
|
|
232
234
|
function getTextWidthMap(mapStr) {
|
|
233
|
-
const
|
|
235
|
+
const map9 = {};
|
|
234
236
|
if (typeof JSON === "undefined") {
|
|
235
|
-
return
|
|
237
|
+
return map9;
|
|
236
238
|
}
|
|
237
239
|
for (let i = 0; i < mapStr.length; i++) {
|
|
238
240
|
const char = String.fromCharCode(i + 32);
|
|
239
241
|
const size = (mapStr.charCodeAt(i) - OFFSET) / SCALE;
|
|
240
|
-
|
|
242
|
+
map9[char] = size;
|
|
241
243
|
}
|
|
242
|
-
return
|
|
244
|
+
return map9;
|
|
243
245
|
}
|
|
244
246
|
var DEFAULT_TEXT_WIDTH_MAP = getTextWidthMap(defaultWidthMapStr);
|
|
245
247
|
var platformApi = {
|
|
@@ -3591,15 +3593,15 @@ var LRU = class {
|
|
|
3591
3593
|
}
|
|
3592
3594
|
put(key, value) {
|
|
3593
3595
|
const list = this._list;
|
|
3594
|
-
const
|
|
3596
|
+
const map9 = this._map;
|
|
3595
3597
|
let removed = null;
|
|
3596
|
-
if (
|
|
3598
|
+
if (map9[key] == null) {
|
|
3597
3599
|
const len2 = list.len();
|
|
3598
3600
|
let entry = this._lastRemovedEntry;
|
|
3599
3601
|
if (len2 >= this._maxSize && len2 > 0) {
|
|
3600
3602
|
const leastUsedEntry = list.head;
|
|
3601
3603
|
list.remove(leastUsedEntry);
|
|
3602
|
-
delete
|
|
3604
|
+
delete map9[leastUsedEntry.key];
|
|
3603
3605
|
removed = leastUsedEntry.value;
|
|
3604
3606
|
this._lastRemovedEntry = leastUsedEntry;
|
|
3605
3607
|
}
|
|
@@ -3610,7 +3612,7 @@ var LRU = class {
|
|
|
3610
3612
|
}
|
|
3611
3613
|
entry.key = key;
|
|
3612
3614
|
list.insertEntry(entry);
|
|
3613
|
-
|
|
3615
|
+
map9[key] = entry;
|
|
3614
3616
|
}
|
|
3615
3617
|
return removed;
|
|
3616
3618
|
}
|
|
@@ -7878,7 +7880,7 @@ function compressBatches(batchA, batchB) {
|
|
|
7878
7880
|
makeMap(batchA || [], mapA);
|
|
7879
7881
|
makeMap(batchB || [], mapB, mapA);
|
|
7880
7882
|
return [mapToArray(mapA), mapToArray(mapB)];
|
|
7881
|
-
function makeMap(sourceBatch,
|
|
7883
|
+
function makeMap(sourceBatch, map9, otherMap) {
|
|
7882
7884
|
for (let i = 0, len2 = sourceBatch.length; i < len2; i++) {
|
|
7883
7885
|
const seriesId = convertOptionIdName(sourceBatch[i].seriesId, null);
|
|
7884
7886
|
if (seriesId == null) {
|
|
@@ -7891,19 +7893,19 @@ function compressBatches(batchA, batchB) {
|
|
|
7891
7893
|
if (otherDataIndices && otherDataIndices[dataIndex]) {
|
|
7892
7894
|
otherDataIndices[dataIndex] = null;
|
|
7893
7895
|
} else {
|
|
7894
|
-
(
|
|
7896
|
+
(map9[seriesId] || (map9[seriesId] = {}))[dataIndex] = 1;
|
|
7895
7897
|
}
|
|
7896
7898
|
}
|
|
7897
7899
|
}
|
|
7898
7900
|
}
|
|
7899
|
-
function mapToArray(
|
|
7901
|
+
function mapToArray(map9, isData) {
|
|
7900
7902
|
const result = [];
|
|
7901
|
-
for (const i in
|
|
7902
|
-
if (
|
|
7903
|
+
for (const i in map9) {
|
|
7904
|
+
if (map9.hasOwnProperty(i) && map9[i] != null) {
|
|
7903
7905
|
if (isData) {
|
|
7904
7906
|
result.push(+i);
|
|
7905
7907
|
} else {
|
|
7906
|
-
const dataIndices = mapToArray(
|
|
7908
|
+
const dataIndices = mapToArray(map9[i], true);
|
|
7907
7909
|
dataIndices.length && result.push({seriesId: i, dataIndex: dataIndices});
|
|
7908
7910
|
}
|
|
7909
7911
|
}
|
|
@@ -11504,9 +11506,9 @@ function isPlot(type) {
|
|
|
11504
11506
|
|
|
11505
11507
|
// src/chart/helper/createRenderPlanner.ts
|
|
11506
11508
|
function createRenderPlanner() {
|
|
11507
|
-
const
|
|
11509
|
+
const inner25 = makeInner();
|
|
11508
11510
|
return function(seriesModel) {
|
|
11509
|
-
const fields =
|
|
11511
|
+
const fields = inner25(seriesModel);
|
|
11510
11512
|
const pipelineContext = seriesModel.pipelineContext;
|
|
11511
11513
|
const originalLarge = !!fields.large;
|
|
11512
11514
|
const originalProgressive = !!fields.progressiveRender;
|
|
@@ -14325,9 +14327,9 @@ function setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttac
|
|
|
14325
14327
|
if (overflow) {
|
|
14326
14328
|
textStyle.overflow = overflow;
|
|
14327
14329
|
}
|
|
14328
|
-
const
|
|
14329
|
-
if (
|
|
14330
|
-
textStyle.margin =
|
|
14330
|
+
const margin3 = textStyleModel.get("minMargin");
|
|
14331
|
+
if (margin3 != null) {
|
|
14332
|
+
textStyle.margin = margin3;
|
|
14331
14333
|
}
|
|
14332
14334
|
setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, true, false);
|
|
14333
14335
|
}
|
|
@@ -15644,7 +15646,7 @@ function boxLayout(orient, group, gap, maxWidth, maxHeight) {
|
|
|
15644
15646
|
var box = boxLayout;
|
|
15645
15647
|
var vbox = curry(boxLayout, "vertical");
|
|
15646
15648
|
var hbox = curry(boxLayout, "horizontal");
|
|
15647
|
-
function getAvailableSize(positionInfo, containerRect,
|
|
15649
|
+
function getAvailableSize(positionInfo, containerRect, margin3) {
|
|
15648
15650
|
const containerWidth = containerRect.width;
|
|
15649
15651
|
const containerHeight = containerRect.height;
|
|
15650
15652
|
let x = parsePercent2(positionInfo.left, containerWidth);
|
|
@@ -15655,14 +15657,14 @@ function getAvailableSize(positionInfo, containerRect, margin2) {
|
|
|
15655
15657
|
(isNaN(x2) || isNaN(parseFloat(positionInfo.right))) && (x2 = containerWidth);
|
|
15656
15658
|
(isNaN(y) || isNaN(parseFloat(positionInfo.top))) && (y = 0);
|
|
15657
15659
|
(isNaN(y2) || isNaN(parseFloat(positionInfo.bottom))) && (y2 = containerHeight);
|
|
15658
|
-
|
|
15660
|
+
margin3 = normalizeCssArray2(margin3 || 0);
|
|
15659
15661
|
return {
|
|
15660
|
-
width: Math.max(x2 - x -
|
|
15661
|
-
height: Math.max(y2 - y -
|
|
15662
|
+
width: Math.max(x2 - x - margin3[1] - margin3[3], 0),
|
|
15663
|
+
height: Math.max(y2 - y - margin3[0] - margin3[2], 0)
|
|
15662
15664
|
};
|
|
15663
15665
|
}
|
|
15664
|
-
function getLayoutRect(positionInfo, containerRect,
|
|
15665
|
-
|
|
15666
|
+
function getLayoutRect(positionInfo, containerRect, margin3) {
|
|
15667
|
+
margin3 = normalizeCssArray2(margin3 || 0);
|
|
15666
15668
|
const containerWidth = containerRect.width;
|
|
15667
15669
|
const containerHeight = containerRect.height;
|
|
15668
15670
|
let left = parsePercent2(positionInfo.left, containerWidth);
|
|
@@ -15671,8 +15673,8 @@ function getLayoutRect(positionInfo, containerRect, margin2) {
|
|
|
15671
15673
|
const bottom = parsePercent2(positionInfo.bottom, containerHeight);
|
|
15672
15674
|
let width = parsePercent2(positionInfo.width, containerWidth);
|
|
15673
15675
|
let height = parsePercent2(positionInfo.height, containerHeight);
|
|
15674
|
-
const verticalMargin =
|
|
15675
|
-
const horizontalMargin =
|
|
15676
|
+
const verticalMargin = margin3[2] + margin3[0];
|
|
15677
|
+
const horizontalMargin = margin3[1] + margin3[3];
|
|
15676
15678
|
const aspect = positionInfo.aspect;
|
|
15677
15679
|
if (isNaN(width)) {
|
|
15678
15680
|
width = containerWidth - right - horizontalMargin - left;
|
|
@@ -15703,7 +15705,7 @@ function getLayoutRect(positionInfo, containerRect, margin2) {
|
|
|
15703
15705
|
}
|
|
15704
15706
|
switch (positionInfo.left || positionInfo.right) {
|
|
15705
15707
|
case "center":
|
|
15706
|
-
left = containerWidth / 2 - width / 2 -
|
|
15708
|
+
left = containerWidth / 2 - width / 2 - margin3[3];
|
|
15707
15709
|
break;
|
|
15708
15710
|
case "right":
|
|
15709
15711
|
left = containerWidth - width - horizontalMargin;
|
|
@@ -15712,7 +15714,7 @@ function getLayoutRect(positionInfo, containerRect, margin2) {
|
|
|
15712
15714
|
switch (positionInfo.top || positionInfo.bottom) {
|
|
15713
15715
|
case "middle":
|
|
15714
15716
|
case "center":
|
|
15715
|
-
top = containerHeight / 2 - height / 2 -
|
|
15717
|
+
top = containerHeight / 2 - height / 2 - margin3[0];
|
|
15716
15718
|
break;
|
|
15717
15719
|
case "bottom":
|
|
15718
15720
|
top = containerHeight - height - verticalMargin;
|
|
@@ -15726,11 +15728,11 @@ function getLayoutRect(positionInfo, containerRect, margin2) {
|
|
|
15726
15728
|
if (isNaN(height)) {
|
|
15727
15729
|
height = containerHeight - verticalMargin - top - (bottom || 0);
|
|
15728
15730
|
}
|
|
15729
|
-
const rect = new BoundingRect_default(left +
|
|
15730
|
-
rect.margin =
|
|
15731
|
+
const rect = new BoundingRect_default(left + margin3[3], top + margin3[0], width, height);
|
|
15732
|
+
rect.margin = margin3;
|
|
15731
15733
|
return rect;
|
|
15732
15734
|
}
|
|
15733
|
-
function positionElement(el, positionInfo, containerRect,
|
|
15735
|
+
function positionElement(el, positionInfo, containerRect, margin3, opt, out2) {
|
|
15734
15736
|
const h = !opt || !opt.hv || opt.hv[0];
|
|
15735
15737
|
const v = !opt || !opt.hv || opt.hv[1];
|
|
15736
15738
|
const boundingMode = opt && opt.boundingMode || "all";
|
|
@@ -15751,7 +15753,7 @@ function positionElement(el, positionInfo, containerRect, margin2, opt, out2) {
|
|
|
15751
15753
|
rect.applyTransform(transform2);
|
|
15752
15754
|
}
|
|
15753
15755
|
}
|
|
15754
|
-
const layoutRect = getLayoutRect(defaults({width: rect.width, height: rect.height}, positionInfo), containerRect,
|
|
15756
|
+
const layoutRect = getLayoutRect(defaults({width: rect.width, height: rect.height}, positionInfo), containerRect, margin3);
|
|
15755
15757
|
const dx = h ? layoutRect.x - rect.x : 0;
|
|
15756
15758
|
const dy = v ? layoutRect.y - rect.y : 0;
|
|
15757
15759
|
if (boundingMode === "raw") {
|
|
@@ -16323,9 +16325,9 @@ function getNearestPalette(palettes, requestColorNum) {
|
|
|
16323
16325
|
}
|
|
16324
16326
|
return palettes[paletteNum - 1];
|
|
16325
16327
|
}
|
|
16326
|
-
function getFromPalette(that,
|
|
16328
|
+
function getFromPalette(that, inner25, defaultPalette, layeredPalette, name, scope, requestNum) {
|
|
16327
16329
|
scope = scope || that;
|
|
16328
|
-
const scopeFields =
|
|
16330
|
+
const scopeFields = inner25(scope);
|
|
16329
16331
|
const paletteIdx = scopeFields.paletteIdx || 0;
|
|
16330
16332
|
const paletteNameMap = scopeFields.paletteNameMap = scopeFields.paletteNameMap || {};
|
|
16331
16333
|
if (paletteNameMap.hasOwnProperty(name)) {
|
|
@@ -16343,9 +16345,9 @@ function getFromPalette(that, inner24, defaultPalette, layeredPalette, name, sco
|
|
|
16343
16345
|
scopeFields.paletteIdx = (paletteIdx + 1) % palette.length;
|
|
16344
16346
|
return pickedPaletteItem;
|
|
16345
16347
|
}
|
|
16346
|
-
function clearPalette(that,
|
|
16347
|
-
|
|
16348
|
-
|
|
16348
|
+
function clearPalette(that, inner25) {
|
|
16349
|
+
inner25(that).paletteIdx = 0;
|
|
16350
|
+
inner25(that).paletteNameMap = {};
|
|
16349
16351
|
}
|
|
16350
16352
|
|
|
16351
16353
|
// src/model/Global.ts
|
|
@@ -16408,6 +16410,7 @@ var BUILTIN_CHARTS_MAP = {
|
|
|
16408
16410
|
lines: "LinesChart",
|
|
16409
16411
|
linesPlot: "LinesPlotChart",
|
|
16410
16412
|
strategy: "StrategyChart",
|
|
16413
|
+
playbackOrder: "PlaybackOrderChart",
|
|
16411
16414
|
mineLines: "MineLinesChart",
|
|
16412
16415
|
minePolyLines: "MinePolyLinesChart",
|
|
16413
16416
|
lineFills: "LineFillsChart",
|
|
@@ -16755,6 +16758,9 @@ echarts.use([${seriesImportName}]);`);
|
|
|
16755
16758
|
const nameStr = convertOptionIdName(name, null);
|
|
16756
16759
|
return filter(this._componentsMap.get("series"), (oneSeries) => !!oneSeries && nameStr != null && oneSeries.name === nameStr);
|
|
16757
16760
|
}
|
|
16761
|
+
getMainSeries() {
|
|
16762
|
+
return find(this._componentsMap.get("series"), (oneSeries) => !!oneSeries && oneSeries.option.isMain);
|
|
16763
|
+
}
|
|
16758
16764
|
getSeriesByIndex(seriesIndex) {
|
|
16759
16765
|
return this._componentsMap.get("series")[seriesIndex];
|
|
16760
16766
|
}
|
|
@@ -16930,7 +16936,8 @@ var availableMethods = [
|
|
|
16930
16936
|
"getOption",
|
|
16931
16937
|
"getId",
|
|
16932
16938
|
"updateLabelLayout",
|
|
16933
|
-
"trigger"
|
|
16939
|
+
"trigger",
|
|
16940
|
+
"getComponentView"
|
|
16934
16941
|
];
|
|
16935
16942
|
var ExtensionAPI = class {
|
|
16936
16943
|
constructor(ecInstance) {
|
|
@@ -22531,6 +22538,29 @@ var TriangleLeft = Path_default.extend({
|
|
|
22531
22538
|
path.closePath();
|
|
22532
22539
|
}
|
|
22533
22540
|
});
|
|
22541
|
+
var LineTriangleLeft = Path_default.extend({
|
|
22542
|
+
type: "lineTriangleLeft",
|
|
22543
|
+
shape: {
|
|
22544
|
+
cx: 0,
|
|
22545
|
+
cy: 0,
|
|
22546
|
+
width: 0,
|
|
22547
|
+
height: 0
|
|
22548
|
+
},
|
|
22549
|
+
buildPath: function(path, shape) {
|
|
22550
|
+
const cx = shape.cx;
|
|
22551
|
+
const cy = shape.cy;
|
|
22552
|
+
const width = shape.width / 2;
|
|
22553
|
+
const height = shape.height / 2;
|
|
22554
|
+
const lineWidth = 2;
|
|
22555
|
+
path.moveTo(cx + width, cy + height);
|
|
22556
|
+
path.lineTo(cx - width, cy);
|
|
22557
|
+
path.lineTo(cx + width, cy - height);
|
|
22558
|
+
path.lineTo(cx + width + lineWidth, cy - height + lineWidth);
|
|
22559
|
+
path.lineTo(cx - width + lineWidth + 2, cy);
|
|
22560
|
+
path.lineTo(cx + width + lineWidth, cy + height - lineWidth);
|
|
22561
|
+
path.lineTo(cx + width, cy + height);
|
|
22562
|
+
}
|
|
22563
|
+
});
|
|
22534
22564
|
var TriangleRight = Path_default.extend({
|
|
22535
22565
|
type: "triangleRight",
|
|
22536
22566
|
shape: {
|
|
@@ -22550,6 +22580,29 @@ var TriangleRight = Path_default.extend({
|
|
|
22550
22580
|
path.closePath();
|
|
22551
22581
|
}
|
|
22552
22582
|
});
|
|
22583
|
+
var LineTriangleRight = Path_default.extend({
|
|
22584
|
+
type: "lineTriangleRight",
|
|
22585
|
+
shape: {
|
|
22586
|
+
cx: 0,
|
|
22587
|
+
cy: 0,
|
|
22588
|
+
width: 0,
|
|
22589
|
+
height: 0
|
|
22590
|
+
},
|
|
22591
|
+
buildPath: function(path, shape) {
|
|
22592
|
+
const cx = shape.cx;
|
|
22593
|
+
const cy = shape.cy;
|
|
22594
|
+
const width = shape.width / 2;
|
|
22595
|
+
const height = shape.height / 2;
|
|
22596
|
+
const lineWidth = 2;
|
|
22597
|
+
path.moveTo(cx - width, cy + height);
|
|
22598
|
+
path.lineTo(cx + width, cy);
|
|
22599
|
+
path.lineTo(cx - width, cy - height);
|
|
22600
|
+
path.lineTo(cx - width - lineWidth, cy - height + lineWidth);
|
|
22601
|
+
path.lineTo(cx + width - lineWidth - 2, cy);
|
|
22602
|
+
path.lineTo(cx - width - lineWidth, cy + height - lineWidth);
|
|
22603
|
+
path.lineTo(cx - width, cy + height);
|
|
22604
|
+
}
|
|
22605
|
+
});
|
|
22553
22606
|
var ArrowUp = Path_default.extend({
|
|
22554
22607
|
type: "arrowUp",
|
|
22555
22608
|
shape: {
|
|
@@ -22575,6 +22628,33 @@ var ArrowUp = Path_default.extend({
|
|
|
22575
22628
|
ctx2.lineTo(cx, cy - height);
|
|
22576
22629
|
}
|
|
22577
22630
|
});
|
|
22631
|
+
var marginArrow = 4;
|
|
22632
|
+
var LineArrowUp = Path_default.extend({
|
|
22633
|
+
type: "lineArrowUp",
|
|
22634
|
+
shape: {
|
|
22635
|
+
cx: 0,
|
|
22636
|
+
cy: 0,
|
|
22637
|
+
width: 0,
|
|
22638
|
+
height: 0,
|
|
22639
|
+
triangleHeight: 0,
|
|
22640
|
+
count: 1
|
|
22641
|
+
},
|
|
22642
|
+
buildPath: function(ctx2, shape) {
|
|
22643
|
+
const {cx, cy, triangleHeight, count: count2} = shape;
|
|
22644
|
+
const width = shape.width / 2;
|
|
22645
|
+
const height = shape.height / 2;
|
|
22646
|
+
let baseY = cy;
|
|
22647
|
+
for (let index = 0; index < count2; index++) {
|
|
22648
|
+
const triangleY = baseY - height + triangleHeight;
|
|
22649
|
+
ctx2.moveTo(cx + width, triangleY);
|
|
22650
|
+
ctx2.lineTo(cx, baseY - height);
|
|
22651
|
+
ctx2.lineTo(cx - width, triangleY);
|
|
22652
|
+
baseY = baseY + marginArrow;
|
|
22653
|
+
}
|
|
22654
|
+
ctx2.moveTo(cx, baseY - height - marginArrow);
|
|
22655
|
+
ctx2.lineTo(cx, baseY + height - marginArrow);
|
|
22656
|
+
}
|
|
22657
|
+
});
|
|
22578
22658
|
var ArrowUpClose = Path_default.extend({
|
|
22579
22659
|
type: "arrowUpClose",
|
|
22580
22660
|
shape: {
|
|
@@ -22627,6 +22707,32 @@ var ArrowDown = Path_default.extend({
|
|
|
22627
22707
|
ctx2.lineTo(cx, cy + height);
|
|
22628
22708
|
}
|
|
22629
22709
|
});
|
|
22710
|
+
var LineArrowDown = Path_default.extend({
|
|
22711
|
+
type: "lineArrowDown",
|
|
22712
|
+
shape: {
|
|
22713
|
+
cx: 0,
|
|
22714
|
+
cy: 0,
|
|
22715
|
+
width: 0,
|
|
22716
|
+
height: 0,
|
|
22717
|
+
triangleHeight: 0,
|
|
22718
|
+
count: 1
|
|
22719
|
+
},
|
|
22720
|
+
buildPath: function(ctx2, shape) {
|
|
22721
|
+
const {cx, cy, triangleHeight, count: count2} = shape;
|
|
22722
|
+
const width = shape.width / 2;
|
|
22723
|
+
const height = shape.height / 2;
|
|
22724
|
+
let baseY = cy;
|
|
22725
|
+
for (let index = 0; index < count2; index++) {
|
|
22726
|
+
const triangleY = baseY + height - triangleHeight;
|
|
22727
|
+
ctx2.moveTo(cx + width, triangleY);
|
|
22728
|
+
ctx2.lineTo(cx, baseY + height);
|
|
22729
|
+
ctx2.lineTo(cx - width, triangleY);
|
|
22730
|
+
baseY = baseY - marginArrow;
|
|
22731
|
+
}
|
|
22732
|
+
ctx2.moveTo(cx, baseY + height + marginArrow);
|
|
22733
|
+
ctx2.lineTo(cx, baseY - height + marginArrow);
|
|
22734
|
+
}
|
|
22735
|
+
});
|
|
22630
22736
|
var ArrowDownClose = Path_default.extend({
|
|
22631
22737
|
type: "arrowDownClose",
|
|
22632
22738
|
shape: {
|
|
@@ -22677,11 +22783,15 @@ var symbolCtors = {
|
|
|
22677
22783
|
xCross: XCross,
|
|
22678
22784
|
lCross: LCross,
|
|
22679
22785
|
arrowUp: ArrowUp,
|
|
22786
|
+
lineArrowUp: LineArrowUp,
|
|
22680
22787
|
flag: Flag,
|
|
22681
22788
|
triangleDown: TriangleDown,
|
|
22682
22789
|
triangleLeft: TriangleLeft,
|
|
22683
22790
|
triangleRight: TriangleRight,
|
|
22791
|
+
lineTriangleLeft: LineTriangleLeft,
|
|
22792
|
+
lineTriangleRight: LineTriangleRight,
|
|
22684
22793
|
arrowDown: ArrowDown,
|
|
22794
|
+
lineArrowDown: LineArrowDown,
|
|
22685
22795
|
arrowUpClose: ArrowUpClose,
|
|
22686
22796
|
arrowDownClose: ArrowDownClose
|
|
22687
22797
|
};
|
|
@@ -22885,6 +22995,18 @@ var symbolShapeMakers = {
|
|
|
22885
22995
|
shape.width = w;
|
|
22886
22996
|
shape.height = h;
|
|
22887
22997
|
},
|
|
22998
|
+
lineTriangleLeft: function(x, y, w, h, shape) {
|
|
22999
|
+
shape.cx = x + w / 2;
|
|
23000
|
+
shape.cy = y;
|
|
23001
|
+
shape.width = w;
|
|
23002
|
+
shape.height = h;
|
|
23003
|
+
},
|
|
23004
|
+
lineTriangleRight: function(x, y, w, h, shape) {
|
|
23005
|
+
shape.cx = x - w / 2;
|
|
23006
|
+
shape.cy = y;
|
|
23007
|
+
shape.width = w;
|
|
23008
|
+
shape.height = h;
|
|
23009
|
+
},
|
|
22888
23010
|
arrowUp: function(x, y, w, h, shape, parentShape) {
|
|
22889
23011
|
shape.rectWidth = parentShape.triangleWidth;
|
|
22890
23012
|
shape.triangleHeight = parentShape.triangleHeight;
|
|
@@ -22893,6 +23015,14 @@ var symbolShapeMakers = {
|
|
|
22893
23015
|
shape.width = w;
|
|
22894
23016
|
shape.height = h;
|
|
22895
23017
|
},
|
|
23018
|
+
lineArrowUp: function(x, y, w, h, shape, parentShape) {
|
|
23019
|
+
shape.triangleHeight = parentShape.triangleHeight;
|
|
23020
|
+
shape.count = parentShape.count;
|
|
23021
|
+
shape.cx = x;
|
|
23022
|
+
shape.cy = y;
|
|
23023
|
+
shape.width = w;
|
|
23024
|
+
shape.height = h;
|
|
23025
|
+
},
|
|
22896
23026
|
arrowDown: function(x, y, w, h, shape, parentShape) {
|
|
22897
23027
|
shape.rectWidth = parentShape.triangleWidth;
|
|
22898
23028
|
shape.triangleHeight = parentShape.triangleHeight;
|
|
@@ -22901,6 +23031,14 @@ var symbolShapeMakers = {
|
|
|
22901
23031
|
shape.width = w;
|
|
22902
23032
|
shape.height = h;
|
|
22903
23033
|
},
|
|
23034
|
+
lineArrowDown: function(x, y, w, h, shape, parentShape) {
|
|
23035
|
+
shape.triangleHeight = parentShape.triangleHeight;
|
|
23036
|
+
shape.count = parentShape.count;
|
|
23037
|
+
shape.cx = x;
|
|
23038
|
+
shape.cy = y;
|
|
23039
|
+
shape.width = w;
|
|
23040
|
+
shape.height = h;
|
|
23041
|
+
},
|
|
22904
23042
|
arrowUpClose: function(x, y, w, h, shape, parentShape) {
|
|
22905
23043
|
shape.rectWidth = parentShape.triangleWidth;
|
|
22906
23044
|
shape.triangleHeight = parentShape.triangleHeight;
|
|
@@ -24171,6 +24309,9 @@ var ECharts = class extends Eventful_default {
|
|
|
24171
24309
|
getDom() {
|
|
24172
24310
|
return this._dom;
|
|
24173
24311
|
}
|
|
24312
|
+
getComponentView(viewId) {
|
|
24313
|
+
return this._componentsMap[viewId];
|
|
24314
|
+
}
|
|
24174
24315
|
getId() {
|
|
24175
24316
|
return this.id;
|
|
24176
24317
|
}
|
|
@@ -24658,6 +24799,20 @@ var ECharts = class extends Eventful_default {
|
|
|
24658
24799
|
const axis = seriesModel.getBaseAxis();
|
|
24659
24800
|
return axis.scale.getLabel({value: dataIndex});
|
|
24660
24801
|
}
|
|
24802
|
+
getPlaybackLastBarRightSideDiffBarCount(time) {
|
|
24803
|
+
const xAxisModal = this._model.getComponent("xAxis", 0);
|
|
24804
|
+
const scale4 = xAxisModal.axis.scale;
|
|
24805
|
+
const startIndex = scale4.getOrdinalMeta().getClosestTime(String(time));
|
|
24806
|
+
const extend2 = scale4.getExtent();
|
|
24807
|
+
const axis = xAxisModal.axis;
|
|
24808
|
+
const lastIndex = extend2[1];
|
|
24809
|
+
const minLength = extend2[0] - extend2[1];
|
|
24810
|
+
const axisWidth = axis.getExtent()[1];
|
|
24811
|
+
const startX = Math.max(axis.dataToCoord(startIndex), 0);
|
|
24812
|
+
const endX = Math.min(axis.dataToCoord(lastIndex), axisWidth);
|
|
24813
|
+
console.log("%c [ minLength ]-1359", "font-size:13px; background:pink; color:#bf2c9f;", xAxisModal, minLength, startIndex, extend2[1]);
|
|
24814
|
+
return (endX - startX) / scale4.barSpace + 0.5;
|
|
24815
|
+
}
|
|
24661
24816
|
getViewOfComponentModel(componentModel) {
|
|
24662
24817
|
return this._componentsMap[componentModel.__viewId];
|
|
24663
24818
|
}
|
|
@@ -24731,7 +24886,8 @@ var ECharts = class extends Eventful_default {
|
|
|
24731
24886
|
"alarmdelete",
|
|
24732
24887
|
"selectidchanged",
|
|
24733
24888
|
"playbackselected",
|
|
24734
|
-
"snapshotzoom"
|
|
24889
|
+
"snapshotzoom",
|
|
24890
|
+
"playbackorder"
|
|
24735
24891
|
], (eventType) => {
|
|
24736
24892
|
this._messageCenter.on(eventType, function(event) {
|
|
24737
24893
|
this.trigger(eventType, event);
|
|
@@ -24902,6 +25058,13 @@ var ECharts = class extends Eventful_default {
|
|
|
24902
25058
|
});
|
|
24903
25059
|
}
|
|
24904
25060
|
break;
|
|
25061
|
+
case "playbackselect":
|
|
25062
|
+
if (payload.playbackSelect.time) {
|
|
25063
|
+
const xAxisModal2 = this._model.getComponent("xAxis", 0);
|
|
25064
|
+
const scale5 = xAxisModal2.axis.scale;
|
|
25065
|
+
payload.playbackSelect.startIndex = scale5.getOrdinalMeta().getClosestTime(payload.playbackSelect.time);
|
|
25066
|
+
}
|
|
25067
|
+
break;
|
|
24905
25068
|
}
|
|
24906
25069
|
return payload;
|
|
24907
25070
|
}
|
|
@@ -25086,6 +25249,7 @@ var ECharts = class extends Eventful_default {
|
|
|
25086
25249
|
}
|
|
25087
25250
|
}
|
|
25088
25251
|
scrollByDistance(distance2, animationDuration) {
|
|
25252
|
+
console.log("%c [ distance ]-2002", "font-size:13px; background:pink; color:#bf2c9f;", distance2);
|
|
25089
25253
|
const xAxisModal = this._model.getComponent("xAxis", 0);
|
|
25090
25254
|
const scale4 = xAxisModal.axis.scale;
|
|
25091
25255
|
const duration = isNumber(animationDuration) && animationDuration > 0 ? animationDuration : 0;
|
|
@@ -25125,7 +25289,7 @@ var ECharts = class extends Eventful_default {
|
|
|
25125
25289
|
}
|
|
25126
25290
|
const xAxisModal = this._model.getComponent("xAxis", 0);
|
|
25127
25291
|
const scale4 = xAxisModal.axis.scale;
|
|
25128
|
-
const initDistance =
|
|
25292
|
+
const initDistance = defaultLastBarRightSideDiffBarCount ? defaultLastBarRightSideDiffBarCount * scale4.barSpace : 50;
|
|
25129
25293
|
const distance2 = scale4.lastBarRightSideDiffBarCount * scale4.barSpace - initDistance;
|
|
25130
25294
|
this.scrollByDistance(distance2, animationDuration);
|
|
25131
25295
|
}
|
|
@@ -26095,7 +26259,8 @@ var actions = {};
|
|
|
26095
26259
|
var eventActionMap = {};
|
|
26096
26260
|
var layoutEventActionMap = {
|
|
26097
26261
|
updateaxispointer: "updateAxisPointer",
|
|
26098
|
-
visiblechanged: "visiblechanged"
|
|
26262
|
+
visiblechanged: "visiblechanged",
|
|
26263
|
+
playbackselect: "playbackSelect"
|
|
26099
26264
|
};
|
|
26100
26265
|
var layoutEventAbleMap = {};
|
|
26101
26266
|
var dataProcessorFuncs = [];
|
|
@@ -26164,6 +26329,19 @@ function connectLayouts(layoutId, actionAuth) {
|
|
|
26164
26329
|
layoutEventAbleMap[layoutId] = actionAuth;
|
|
26165
26330
|
return layoutId;
|
|
26166
26331
|
}
|
|
26332
|
+
function connectLayoutAction(layoutId, action) {
|
|
26333
|
+
connectedLayouts[layoutId] = true;
|
|
26334
|
+
const auths = layoutEventAbleMap[layoutId] || [];
|
|
26335
|
+
if (!auths.includes(action)) {
|
|
26336
|
+
auths.push(action);
|
|
26337
|
+
}
|
|
26338
|
+
layoutEventAbleMap[layoutId] = auths;
|
|
26339
|
+
return layoutId;
|
|
26340
|
+
}
|
|
26341
|
+
function disconnectLayoutAction(layoutId, action) {
|
|
26342
|
+
layoutEventAbleMap[layoutId] = layoutEventAbleMap[layoutId].filter((item) => item !== action);
|
|
26343
|
+
return layoutId;
|
|
26344
|
+
}
|
|
26167
26345
|
function disconnectLayouts(layoutId) {
|
|
26168
26346
|
connectedLayouts[layoutId] = false;
|
|
26169
26347
|
}
|
|
@@ -26500,25 +26678,25 @@ var DataDiffer = class {
|
|
|
26500
26678
|
newDataIndexMap[newKey] = null;
|
|
26501
26679
|
}
|
|
26502
26680
|
}
|
|
26503
|
-
_initIndexMap(arr,
|
|
26681
|
+
_initIndexMap(arr, map9, keyArr, keyGetterName) {
|
|
26504
26682
|
const cbModeMultiple = this._diffModeMultiple;
|
|
26505
26683
|
for (let i = 0; i < arr.length; i++) {
|
|
26506
26684
|
const key = "_ec_" + this[keyGetterName](arr[i], i);
|
|
26507
26685
|
if (!cbModeMultiple) {
|
|
26508
26686
|
keyArr[i] = key;
|
|
26509
26687
|
}
|
|
26510
|
-
if (!
|
|
26688
|
+
if (!map9) {
|
|
26511
26689
|
continue;
|
|
26512
26690
|
}
|
|
26513
|
-
const idxMapVal =
|
|
26691
|
+
const idxMapVal = map9[key];
|
|
26514
26692
|
const idxMapValLen = dataIndexMapValueLength(idxMapVal);
|
|
26515
26693
|
if (idxMapValLen === 0) {
|
|
26516
|
-
|
|
26694
|
+
map9[key] = i;
|
|
26517
26695
|
if (cbModeMultiple) {
|
|
26518
26696
|
keyArr.push(key);
|
|
26519
26697
|
}
|
|
26520
26698
|
} else if (idxMapValLen === 1) {
|
|
26521
|
-
|
|
26699
|
+
map9[key] = [idxMapVal, i];
|
|
26522
26700
|
} else {
|
|
26523
26701
|
idxMapVal.push(i);
|
|
26524
26702
|
}
|
|
@@ -27655,15 +27833,15 @@ function getDimCount(source, sysDims, dimsDef, optDimCount) {
|
|
|
27655
27833
|
});
|
|
27656
27834
|
return dimCount;
|
|
27657
27835
|
}
|
|
27658
|
-
function genCoordDimName(name,
|
|
27659
|
-
if (fromZero ||
|
|
27836
|
+
function genCoordDimName(name, map9, fromZero) {
|
|
27837
|
+
if (fromZero || map9.hasKey(name)) {
|
|
27660
27838
|
let i = 0;
|
|
27661
|
-
while (
|
|
27839
|
+
while (map9.hasKey(name + i)) {
|
|
27662
27840
|
i++;
|
|
27663
27841
|
}
|
|
27664
27842
|
name += i;
|
|
27665
27843
|
}
|
|
27666
|
-
|
|
27844
|
+
map9.set(name, true);
|
|
27667
27845
|
return name;
|
|
27668
27846
|
}
|
|
27669
27847
|
|
|
@@ -28306,13 +28484,13 @@ var OrdinalMeta = class {
|
|
|
28306
28484
|
this.categories[index] = category;
|
|
28307
28485
|
return index;
|
|
28308
28486
|
}
|
|
28309
|
-
const
|
|
28310
|
-
index =
|
|
28487
|
+
const map9 = this._getOrCreateMap();
|
|
28488
|
+
index = map9.get(category);
|
|
28311
28489
|
if (index == null) {
|
|
28312
28490
|
if (needCollect) {
|
|
28313
28491
|
index = this.categories.length;
|
|
28314
28492
|
this.categories[index] = category;
|
|
28315
|
-
|
|
28493
|
+
map9.set(category, index);
|
|
28316
28494
|
} else {
|
|
28317
28495
|
index = NaN;
|
|
28318
28496
|
}
|
|
@@ -30518,6 +30696,11 @@ function contrastColor2(color2) {
|
|
|
30518
30696
|
const brightness = (r * 299 + g * 587 + b * 114) / 1e3;
|
|
30519
30697
|
return brightness >= 130 ? "#000000" : "#ffffff";
|
|
30520
30698
|
}
|
|
30699
|
+
function getIsLightColor(color2) {
|
|
30700
|
+
const [r, g, b] = parseColor(color2);
|
|
30701
|
+
const brightness = (r * 299 + g * 587 + b * 114) / 1e3;
|
|
30702
|
+
return brightness >= 130;
|
|
30703
|
+
}
|
|
30521
30704
|
function removeTransparency(color2) {
|
|
30522
30705
|
const [r, g, b] = parseColor(color2);
|
|
30523
30706
|
return `rgb(${r}, ${g}, ${b})`;
|
|
@@ -30527,6 +30710,49 @@ function isColorSimilarManhattan(rgbas1, rgbas2, threshold01 = 0.1, weightAlpha
|
|
|
30527
30710
|
const sum2 = Math.abs(rgbas1[0] - rgbas2[0]) + Math.abs(rgbas1[1] - rgbas2[1]) + Math.abs(rgbas1[2] - rgbas2[2]) + Math.abs((rgbas1[3] - rgbas2[3]) * weightAlpha);
|
|
30528
30711
|
return sum2 <= maxSum;
|
|
30529
30712
|
}
|
|
30713
|
+
function blendColors(foreground, background) {
|
|
30714
|
+
const fg = parseColorToRgba(foreground);
|
|
30715
|
+
const bg = parseColorToRgba(background);
|
|
30716
|
+
const fgAlpha = fg.a !== void 0 ? fg.a : 1;
|
|
30717
|
+
const bgAlpha = bg.a !== void 0 ? bg.a : 1;
|
|
30718
|
+
const alpha = fgAlpha + bgAlpha * (1 - fgAlpha);
|
|
30719
|
+
const r = Math.round((fg.r * fgAlpha + bg.r * bgAlpha * (1 - fgAlpha)) / alpha);
|
|
30720
|
+
const g = Math.round((fg.g * fgAlpha + bg.g * bgAlpha * (1 - fgAlpha)) / alpha);
|
|
30721
|
+
const b = Math.round((fg.b * fgAlpha + bg.b * bgAlpha * (1 - fgAlpha)) / alpha);
|
|
30722
|
+
return rgbToHex(r, g, b);
|
|
30723
|
+
}
|
|
30724
|
+
function parseColorToRgba(color2) {
|
|
30725
|
+
color2 = color2.trim().toLowerCase();
|
|
30726
|
+
if (color2.startsWith("rgba")) {
|
|
30727
|
+
const match = color2.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);
|
|
30728
|
+
if (match) {
|
|
30729
|
+
return {
|
|
30730
|
+
r: parseInt(match[1]),
|
|
30731
|
+
g: parseInt(match[2]),
|
|
30732
|
+
b: parseInt(match[3]),
|
|
30733
|
+
a: match[4] ? parseFloat(match[4]) : void 0
|
|
30734
|
+
};
|
|
30735
|
+
}
|
|
30736
|
+
}
|
|
30737
|
+
if (color2.startsWith("#")) {
|
|
30738
|
+
color2 = color2.substring(1);
|
|
30739
|
+
if (color2.length === 3) {
|
|
30740
|
+
color2 = color2[0] + color2[0] + color2[1] + color2[1] + color2[2] + color2[2];
|
|
30741
|
+
}
|
|
30742
|
+
const r = parseInt(color2.substring(0, 2), 16);
|
|
30743
|
+
const g = parseInt(color2.substring(2, 4), 16);
|
|
30744
|
+
const b = parseInt(color2.substring(4, 6), 16);
|
|
30745
|
+
const result = {r, g, b};
|
|
30746
|
+
if (color2.length === 8) {
|
|
30747
|
+
result.a = parseInt(color2.substring(6, 8), 16) / 255;
|
|
30748
|
+
}
|
|
30749
|
+
return result;
|
|
30750
|
+
}
|
|
30751
|
+
throw new Error(`\u65E0\u6CD5\u89E3\u6790\u7684\u989C\u8272\u683C\u5F0F: ${color2}`);
|
|
30752
|
+
}
|
|
30753
|
+
function rgbToHex(r, g, b) {
|
|
30754
|
+
return `#${Math.round(r).toString(16).padStart(2, "0")}${Math.round(g).toString(16).padStart(2, "0")}${Math.round(b).toString(16).padStart(2, "0")}`;
|
|
30755
|
+
}
|
|
30530
30756
|
|
|
30531
30757
|
// src/data/scale-time/default-tick-mark-formatter.ts
|
|
30532
30758
|
function weightToTickMarkType(weight, timeVisible, secondsVisible) {
|
|
@@ -31006,9 +31232,9 @@ var Axis = class {
|
|
|
31006
31232
|
function fixExtentWithBands(extent3, nTick) {
|
|
31007
31233
|
const size = extent3[1] - extent3[0];
|
|
31008
31234
|
const len2 = nTick;
|
|
31009
|
-
const
|
|
31010
|
-
extent3[0] +=
|
|
31011
|
-
extent3[1] -=
|
|
31235
|
+
const margin3 = size / len2 / 2;
|
|
31236
|
+
extent3[0] += margin3;
|
|
31237
|
+
extent3[1] -= margin3;
|
|
31012
31238
|
}
|
|
31013
31239
|
function fixOnBandTicksCoords(axis, ticksCoords, alignWithLabel, clamp2) {
|
|
31014
31240
|
const ticksLen = ticksCoords.length;
|
|
@@ -33126,19 +33352,19 @@ function isDef(s) {
|
|
|
33126
33352
|
return s !== void 0;
|
|
33127
33353
|
}
|
|
33128
33354
|
function createKeyToOldIdx(children, beginIdx, endIdx) {
|
|
33129
|
-
const
|
|
33355
|
+
const map9 = {};
|
|
33130
33356
|
for (let i = beginIdx; i <= endIdx; ++i) {
|
|
33131
33357
|
const key = children[i].key;
|
|
33132
33358
|
if (key !== void 0) {
|
|
33133
33359
|
if (true) {
|
|
33134
|
-
if (
|
|
33360
|
+
if (map9[key] != null) {
|
|
33135
33361
|
console.error(`Duplicate key ${key}`);
|
|
33136
33362
|
}
|
|
33137
33363
|
}
|
|
33138
|
-
|
|
33364
|
+
map9[key] = i;
|
|
33139
33365
|
}
|
|
33140
33366
|
}
|
|
33141
|
-
return
|
|
33367
|
+
return map9;
|
|
33142
33368
|
}
|
|
33143
33369
|
function sameVnode(vnode1, vnode2) {
|
|
33144
33370
|
const isSameKey = vnode1.key === vnode2.key;
|
|
@@ -36428,9 +36654,9 @@ var LineView = class extends Chart_default {
|
|
|
36428
36654
|
});
|
|
36429
36655
|
}
|
|
36430
36656
|
if (valueAnimation) {
|
|
36431
|
-
const
|
|
36432
|
-
if (typeof
|
|
36433
|
-
|
|
36657
|
+
const inner25 = labelInner(endLabel);
|
|
36658
|
+
if (typeof inner25.setLabelText === "function") {
|
|
36659
|
+
inner25.setLabelText(value);
|
|
36434
36660
|
}
|
|
36435
36661
|
}
|
|
36436
36662
|
}
|
|
@@ -38180,8 +38406,8 @@ function constrainTextWidth(layout18, availableWidth, forceRecalculate = false)
|
|
|
38180
38406
|
}
|
|
38181
38407
|
const newRect = label.getBoundingRect();
|
|
38182
38408
|
textRect.width = newRect.width;
|
|
38183
|
-
const
|
|
38184
|
-
textRect.height = newRect.height +
|
|
38409
|
+
const margin3 = (label.style.margin || 0) + 2.1;
|
|
38410
|
+
textRect.height = newRect.height + margin3;
|
|
38185
38411
|
textRect.y -= (textRect.height - oldHeight) / 2;
|
|
38186
38412
|
}
|
|
38187
38413
|
}
|
|
@@ -38309,9 +38535,9 @@ function pieLabelLayout(seriesModel) {
|
|
|
38309
38535
|
if (!isLabelInside) {
|
|
38310
38536
|
const textRect = label.getBoundingRect().clone();
|
|
38311
38537
|
textRect.applyTransform(label.getComputedTransform());
|
|
38312
|
-
const
|
|
38313
|
-
textRect.y -=
|
|
38314
|
-
textRect.height +=
|
|
38538
|
+
const margin3 = (label.style.margin || 0) + 2.1;
|
|
38539
|
+
textRect.y -= margin3 / 2;
|
|
38540
|
+
textRect.height += margin3;
|
|
38315
38541
|
labelLayoutList.push({
|
|
38316
38542
|
label,
|
|
38317
38543
|
labelLine,
|
|
@@ -39731,12 +39957,12 @@ var Grid2 = class {
|
|
|
39731
39957
|
const labelUnionRect = estimateLabelUnionRect(axis);
|
|
39732
39958
|
if (labelUnionRect) {
|
|
39733
39959
|
const dim = axis.isHorizontal() ? "height" : "width";
|
|
39734
|
-
const
|
|
39735
|
-
gridRect[dim] -= labelUnionRect[dim] +
|
|
39960
|
+
const margin3 = axis.model.get(["axisLabel", "margin"]);
|
|
39961
|
+
gridRect[dim] -= labelUnionRect[dim] + margin3;
|
|
39736
39962
|
if (axis.position === "top") {
|
|
39737
|
-
gridRect.y += labelUnionRect.height +
|
|
39963
|
+
gridRect.y += labelUnionRect.height + margin3;
|
|
39738
39964
|
} else if (axis.position === "left") {
|
|
39739
|
-
gridRect.x += labelUnionRect.width +
|
|
39965
|
+
gridRect.x += labelUnionRect.width + margin3;
|
|
39740
39966
|
}
|
|
39741
39967
|
}
|
|
39742
39968
|
}
|
|
@@ -44119,15 +44345,15 @@ var GEO_DEFAULT_PARAMS = {
|
|
|
44119
44345
|
};
|
|
44120
44346
|
var geo2DDimensions = ["lng", "lat"];
|
|
44121
44347
|
var Geo = class extends View_default {
|
|
44122
|
-
constructor(name,
|
|
44348
|
+
constructor(name, map9, opt) {
|
|
44123
44349
|
super(name);
|
|
44124
44350
|
this.dimensions = geo2DDimensions;
|
|
44125
44351
|
this.type = "geo";
|
|
44126
44352
|
this._nameCoordMap = createHashMap();
|
|
44127
|
-
this.map =
|
|
44353
|
+
this.map = map9;
|
|
44128
44354
|
let projection = opt.projection;
|
|
44129
|
-
const source = geoSourceManager_default.load(
|
|
44130
|
-
const resource = geoSourceManager_default.getGeoResource(
|
|
44355
|
+
const source = geoSourceManager_default.load(map9, opt.nameMap, opt.nameProperty);
|
|
44356
|
+
const resource = geoSourceManager_default.getGeoResource(map9);
|
|
44131
44357
|
const resourceType = this.resourceType = resource ? resource.type : null;
|
|
44132
44358
|
const regions = this.regions = source.regions;
|
|
44133
44359
|
const defaultParams = GEO_DEFAULT_PARAMS[resource.type];
|
|
@@ -44136,7 +44362,7 @@ var Geo = class extends View_default {
|
|
|
44136
44362
|
if (projection) {
|
|
44137
44363
|
if (resourceType === "geoSVG") {
|
|
44138
44364
|
if (true) {
|
|
44139
|
-
warn(`Map ${
|
|
44365
|
+
warn(`Map ${map9} with SVG source can't use projection. Only GeoJSON source supports projection.`);
|
|
44140
44366
|
}
|
|
44141
44367
|
projection = null;
|
|
44142
44368
|
}
|
|
@@ -52417,9 +52643,9 @@ function getTransform2(controller) {
|
|
|
52417
52643
|
return getTransform(controller.group);
|
|
52418
52644
|
}
|
|
52419
52645
|
function getGlobalDirection1(controller, localDirName) {
|
|
52420
|
-
const
|
|
52646
|
+
const map9 = {w: "left", e: "right", n: "top", s: "bottom"};
|
|
52421
52647
|
const inverseMap = {left: "w", right: "e", top: "n", bottom: "s"};
|
|
52422
|
-
const dir3 = transformDirection(
|
|
52648
|
+
const dir3 = transformDirection(map9[localDirName], getTransform2(controller));
|
|
52423
52649
|
return inverseMap[dir3];
|
|
52424
52650
|
}
|
|
52425
52651
|
function getGlobalDirection2(controller, localDirNameSeq) {
|
|
@@ -57335,6 +57561,480 @@ function install25(registers) {
|
|
|
57335
57561
|
registers.registerLayout(StrategyLayout_default);
|
|
57336
57562
|
}
|
|
57337
57563
|
|
|
57564
|
+
// src/chart/playbackOrder/constants.ts
|
|
57565
|
+
var LongColor2 = "rgb(41, 98, 255)";
|
|
57566
|
+
var ShortColor2 = "rgb(255, 23, 68)";
|
|
57567
|
+
var LongBg = "rgba(41, 98, 255, 0.2)";
|
|
57568
|
+
var ShortBG = "rgba(255, 23, 68, 0.2)";
|
|
57569
|
+
var ArrowSize2 = [10, 16];
|
|
57570
|
+
var TriangleSize2 = [6, 10];
|
|
57571
|
+
|
|
57572
|
+
// src/chart/playbackOrder/PlaybackHtmlContent.ts
|
|
57573
|
+
function formatAmount(amount, decimalPlaces = 2) {
|
|
57574
|
+
if (amount === 0)
|
|
57575
|
+
return "0";
|
|
57576
|
+
const units = [
|
|
57577
|
+
{value: 1, symbol: ""},
|
|
57578
|
+
{value: 1e3, symbol: "K"},
|
|
57579
|
+
{value: 1e6, symbol: "M"}
|
|
57580
|
+
];
|
|
57581
|
+
let selectedUnit = units[0];
|
|
57582
|
+
for (let i = units.length - 1; i >= 0; i--) {
|
|
57583
|
+
if (amount >= units[i].value) {
|
|
57584
|
+
selectedUnit = units[i];
|
|
57585
|
+
break;
|
|
57586
|
+
}
|
|
57587
|
+
}
|
|
57588
|
+
const formattedValue = (amount / selectedUnit.value).toFixed(decimalPlaces);
|
|
57589
|
+
const cleanValue = formattedValue.replace(/\.0+$|(\.[0-9]*[1-9])0+$/, "$1");
|
|
57590
|
+
return `${cleanValue}${selectedUnit.symbol}`;
|
|
57591
|
+
}
|
|
57592
|
+
function formatTimestamp(timestamp) {
|
|
57593
|
+
const date = new Date(timestamp);
|
|
57594
|
+
const months = [
|
|
57595
|
+
"1\u6708",
|
|
57596
|
+
"2\u6708",
|
|
57597
|
+
"3\u6708",
|
|
57598
|
+
"4\u6708",
|
|
57599
|
+
"5\u6708",
|
|
57600
|
+
"6\u6708",
|
|
57601
|
+
"7\u6708",
|
|
57602
|
+
"8\u6708",
|
|
57603
|
+
"9\u6708",
|
|
57604
|
+
"10\u6708",
|
|
57605
|
+
"11\u6708",
|
|
57606
|
+
"12\u6708"
|
|
57607
|
+
];
|
|
57608
|
+
const weekdays = ["\u5468\u65E5", "\u5468\u4E00", "\u5468\u4E8C", "\u5468\u4E09", "\u5468\u56DB", "\u5468\u4E94", "\u5468\u516D"];
|
|
57609
|
+
const month = months[date.getMonth()];
|
|
57610
|
+
const day = date.getDate();
|
|
57611
|
+
const weekday = weekdays[date.getDay()];
|
|
57612
|
+
const hours2 = date.getHours().toString().padStart(2, "0");
|
|
57613
|
+
const minutes2 = date.getMinutes().toString().padStart(2, "0");
|
|
57614
|
+
const time = `${hours2}:${minutes2}`;
|
|
57615
|
+
return `${month}${day}\u65E5${weekday} ${time}`;
|
|
57616
|
+
}
|
|
57617
|
+
var margin = 10;
|
|
57618
|
+
var TooltipHTMLContent = class {
|
|
57619
|
+
constructor(api2) {
|
|
57620
|
+
this._show = false;
|
|
57621
|
+
this._enterable = true;
|
|
57622
|
+
if (env_default.wxa) {
|
|
57623
|
+
return null;
|
|
57624
|
+
}
|
|
57625
|
+
const el = document.createElement("div");
|
|
57626
|
+
el.domBelongToZr = true;
|
|
57627
|
+
this.el = el;
|
|
57628
|
+
const container = api2.getDom();
|
|
57629
|
+
(container || api2.getDom()).appendChild(el);
|
|
57630
|
+
el.onmouseenter = function() {
|
|
57631
|
+
api2.dispatchAction({
|
|
57632
|
+
type: "updateAxisPointer",
|
|
57633
|
+
currTrigger: "globalout"
|
|
57634
|
+
});
|
|
57635
|
+
};
|
|
57636
|
+
this._api = api2;
|
|
57637
|
+
this._container = container;
|
|
57638
|
+
}
|
|
57639
|
+
show({isUp, orders, time, x, y, precision}) {
|
|
57640
|
+
const el = this.el;
|
|
57641
|
+
const style = el.style;
|
|
57642
|
+
style.position = "absolute";
|
|
57643
|
+
style.left = x + margin + "px";
|
|
57644
|
+
style.top = y - margin + "px";
|
|
57645
|
+
style.visibility = "visible";
|
|
57646
|
+
style.opacity = "1";
|
|
57647
|
+
const isMuti = orders.length > 1;
|
|
57648
|
+
const formatTime2 = formatTimestamp(time * 1e3);
|
|
57649
|
+
const order = orders[0];
|
|
57650
|
+
let title = `${formatAmount(order.size)} @ ${order.price.toFixed(precision)}<span style="margin-left: 12px; color: var(--placeholder-text-color);">${formatTime2}</span>`;
|
|
57651
|
+
let ordersHtml = "";
|
|
57652
|
+
if (isMuti) {
|
|
57653
|
+
let totalPrice = 0;
|
|
57654
|
+
let totalSize = 0;
|
|
57655
|
+
ordersHtml = `<div style="margin-bottom: 12px; font-size: 12px; color: var(--placeholder-text-color);">TRADES</div>`;
|
|
57656
|
+
each(orders, (item) => {
|
|
57657
|
+
totalPrice = totalPrice + item.price;
|
|
57658
|
+
totalSize += item.size;
|
|
57659
|
+
ordersHtml = `${ordersHtml}<div style="height: 18px; margin-bottom: 2px; font-size: 12px; margin-left: 4px;">${formatAmount(item.size)} @ ${item.price.toFixed(precision)}<span style="margin-left: 12px; color: var(--placeholder-text-color);">8\u670813\u65E5\u5468\u4E09 05:00</span></div>`;
|
|
57660
|
+
});
|
|
57661
|
+
title = `${formatAmount(totalSize)} @ ${(totalPrice / orders.length).toFixed(precision)} avg price`;
|
|
57662
|
+
}
|
|
57663
|
+
const primaryColor = isUp ? "--primary-color" : "--color-kl-red";
|
|
57664
|
+
el.innerHTML = `<div style="padding-left: 4px;border-left: 4px solid var(${primaryColor});width: 290px;z-index: 10;border-radius: 6px;background: var(--container-bg);box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px 0px;color: var(--title-color);">
|
|
57665
|
+
<div style="padding: 16px 12px;"><div style="display: flex; align-items: center; margin-bottom: 12px;">
|
|
57666
|
+
<div style="height: 20px; border-radius: 50px; min-width: 20px; margin-right: 8px; text-align: center; background-color: var(${primaryColor}); font-size: 12px; color: #fff;line-height:20px;">${orders.length}</div>
|
|
57667
|
+
<div style="font-weight: 600; font-size: 18px;">\u4E70\u5165</div></div><div style="font-size: 13px; margin-bottom: 12px;">${title}</div>
|
|
57668
|
+
${ordersHtml}
|
|
57669
|
+
</div>
|
|
57670
|
+
</div>
|
|
57671
|
+
`;
|
|
57672
|
+
console.log("====", el.clientHeight, el.clientWidth);
|
|
57673
|
+
if (x + el.clientWidth > this._container.clientWidth) {
|
|
57674
|
+
style.left = x - el.clientWidth - margin + "px";
|
|
57675
|
+
}
|
|
57676
|
+
if (y + el.clientHeight > this._container.clientHeight) {
|
|
57677
|
+
style.top = y - el.clientHeight - margin + "px";
|
|
57678
|
+
}
|
|
57679
|
+
}
|
|
57680
|
+
getSize() {
|
|
57681
|
+
const el = this.el;
|
|
57682
|
+
return [el.offsetWidth, el.offsetHeight];
|
|
57683
|
+
}
|
|
57684
|
+
hide() {
|
|
57685
|
+
const style = this.el.style;
|
|
57686
|
+
style.visibility = "hidden";
|
|
57687
|
+
style.opacity = "0";
|
|
57688
|
+
env_default.transform3dSupported && (style.willChange = "");
|
|
57689
|
+
this._show = false;
|
|
57690
|
+
}
|
|
57691
|
+
isShow() {
|
|
57692
|
+
return this._show;
|
|
57693
|
+
}
|
|
57694
|
+
dispose() {
|
|
57695
|
+
const parentNode2 = this.el.parentNode;
|
|
57696
|
+
parentNode2 && parentNode2.removeChild(this.el);
|
|
57697
|
+
this.el = this._container = null;
|
|
57698
|
+
}
|
|
57699
|
+
};
|
|
57700
|
+
var PlaybackHtmlContent_default = TooltipHTMLContent;
|
|
57701
|
+
|
|
57702
|
+
// src/chart/playbackOrder/PlaybackOrderView.ts
|
|
57703
|
+
var inner11 = makeInner();
|
|
57704
|
+
var PlaybackOrderView2 = class extends Chart_default {
|
|
57705
|
+
constructor() {
|
|
57706
|
+
super(...arguments);
|
|
57707
|
+
this.type = PlaybackOrderView2.type;
|
|
57708
|
+
}
|
|
57709
|
+
render(seriesModel, ecModel, api2) {
|
|
57710
|
+
const data = seriesModel.getData();
|
|
57711
|
+
this.seriesModel = seriesModel;
|
|
57712
|
+
this._renderSymbol(data, seriesModel);
|
|
57713
|
+
this._renderHover();
|
|
57714
|
+
if (!this.htmlContent) {
|
|
57715
|
+
this.htmlContent = new PlaybackHtmlContent_default(api2);
|
|
57716
|
+
api2.getZr().on("click", this._clickGlobal, this);
|
|
57717
|
+
}
|
|
57718
|
+
const clipPath = seriesModel.get("clip", true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);
|
|
57719
|
+
if (clipPath) {
|
|
57720
|
+
this.group.setClipPath(clipPath);
|
|
57721
|
+
} else {
|
|
57722
|
+
this.group.removeClipPath();
|
|
57723
|
+
}
|
|
57724
|
+
}
|
|
57725
|
+
_renderHover() {
|
|
57726
|
+
const obj = this._hoverParams;
|
|
57727
|
+
if (!obj) {
|
|
57728
|
+
return;
|
|
57729
|
+
}
|
|
57730
|
+
const seriesModel = this.seriesModel;
|
|
57731
|
+
const data = seriesModel.getData();
|
|
57732
|
+
const isUp = obj.type === "up";
|
|
57733
|
+
const dataModal = data.getItemModel(obj.index);
|
|
57734
|
+
const orders = dataModal.get(isUp ? "upOrders" : "downOrders");
|
|
57735
|
+
if (!orders) {
|
|
57736
|
+
return;
|
|
57737
|
+
}
|
|
57738
|
+
let totalPrice = 0;
|
|
57739
|
+
each(orders, (item) => {
|
|
57740
|
+
totalPrice = item.price + totalPrice;
|
|
57741
|
+
});
|
|
57742
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
57743
|
+
const avgPrice = totalPrice / orders.length;
|
|
57744
|
+
const store = data.getStore();
|
|
57745
|
+
const x = store.get(0, obj.index);
|
|
57746
|
+
const [triangleX, triangleY] = coordSys.dataToPoint([x, avgPrice]);
|
|
57747
|
+
const z = seriesModel.get("z");
|
|
57748
|
+
this._hoverGroup.childAt(0).attr({
|
|
57749
|
+
style: {
|
|
57750
|
+
fill: isUp ? LongColor2 : ShortColor2,
|
|
57751
|
+
lineWidth: 1,
|
|
57752
|
+
stroke: "#000"
|
|
57753
|
+
},
|
|
57754
|
+
shape: {
|
|
57755
|
+
x: triangleX,
|
|
57756
|
+
y: triangleY,
|
|
57757
|
+
width: TriangleSize2[0],
|
|
57758
|
+
height: TriangleSize2[1]
|
|
57759
|
+
},
|
|
57760
|
+
z
|
|
57761
|
+
});
|
|
57762
|
+
const arrows = data.getLayout(isUp ? "upArrow" : "downArrow");
|
|
57763
|
+
const arrow = arrows[obj.orderIndex];
|
|
57764
|
+
const width = ArrowSize2[0] + 8;
|
|
57765
|
+
const height = ArrowSize2[1] + 8;
|
|
57766
|
+
this._hoverGroup.childAt(1).attr({
|
|
57767
|
+
style: {
|
|
57768
|
+
fill: isUp ? LongBg : ShortBG
|
|
57769
|
+
},
|
|
57770
|
+
shape: {
|
|
57771
|
+
r: 8,
|
|
57772
|
+
x: arrow[0] - width / 2,
|
|
57773
|
+
y: arrow[1] - height / 2,
|
|
57774
|
+
width,
|
|
57775
|
+
height
|
|
57776
|
+
},
|
|
57777
|
+
z
|
|
57778
|
+
});
|
|
57779
|
+
}
|
|
57780
|
+
_clickGlobal() {
|
|
57781
|
+
this.htmlContent.hide();
|
|
57782
|
+
if (this._hoverParams) {
|
|
57783
|
+
this._mouseout();
|
|
57784
|
+
}
|
|
57785
|
+
}
|
|
57786
|
+
_getClipShape(seriesModel) {
|
|
57787
|
+
if (!seriesModel.get("clip", true)) {
|
|
57788
|
+
return;
|
|
57789
|
+
}
|
|
57790
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
57791
|
+
return coordSys && coordSys.getArea && coordSys.getArea(0.1);
|
|
57792
|
+
}
|
|
57793
|
+
_mouseClick(e2) {
|
|
57794
|
+
const obj = inner11(e2.target);
|
|
57795
|
+
if (!obj) {
|
|
57796
|
+
return;
|
|
57797
|
+
}
|
|
57798
|
+
e2.cancelBubble = true;
|
|
57799
|
+
const seriesModel = this.seriesModel;
|
|
57800
|
+
const data = seriesModel.getData();
|
|
57801
|
+
const isUp = obj.type === "up";
|
|
57802
|
+
const dataModal = data.getItemModel(obj.index);
|
|
57803
|
+
const orders = dataModal.get(isUp ? "upOrders" : "downOrders");
|
|
57804
|
+
if (!orders) {
|
|
57805
|
+
return;
|
|
57806
|
+
}
|
|
57807
|
+
this.htmlContent.show({isUp, orders, x: e2.offsetX, y: e2.offsetY, time: dataModal.get("time"), precision: seriesModel.get("precision")});
|
|
57808
|
+
}
|
|
57809
|
+
_mouseover(e2) {
|
|
57810
|
+
const obj = inner11(e2.target);
|
|
57811
|
+
if (!obj) {
|
|
57812
|
+
return;
|
|
57813
|
+
}
|
|
57814
|
+
const seriesModel = this.seriesModel;
|
|
57815
|
+
if (!this._hoverGroup) {
|
|
57816
|
+
const z2 = seriesModel.get("z2");
|
|
57817
|
+
const z = seriesModel.get("z");
|
|
57818
|
+
this._hoverGroup = new Group_default();
|
|
57819
|
+
const downTriangleEl = createSymbol(obj.type === "up" ? "lineTriangleRight" : "lineTriangleLeft", 0, 0, 0, 0);
|
|
57820
|
+
downTriangleEl.z2 = z2 - 1;
|
|
57821
|
+
downTriangleEl.z2 = z;
|
|
57822
|
+
const rectEl = new Rect_default();
|
|
57823
|
+
rectEl.z2 = z2 - 1;
|
|
57824
|
+
rectEl.z2 = z;
|
|
57825
|
+
this._hoverGroup.add(downTriangleEl);
|
|
57826
|
+
this._hoverGroup.add(rectEl);
|
|
57827
|
+
this.group.add(this._hoverGroup);
|
|
57828
|
+
}
|
|
57829
|
+
this._hoverParams = obj;
|
|
57830
|
+
this._renderHover();
|
|
57831
|
+
}
|
|
57832
|
+
_mouseout() {
|
|
57833
|
+
this._hoverParams = null;
|
|
57834
|
+
this.group.remove(this._hoverGroup);
|
|
57835
|
+
this._hoverGroup = null;
|
|
57836
|
+
}
|
|
57837
|
+
_renderSymbol(data, seriesModel) {
|
|
57838
|
+
if (!this._symbolGroup) {
|
|
57839
|
+
this._symbolGroup = new Group_default();
|
|
57840
|
+
this.group.add(this._symbolGroup);
|
|
57841
|
+
this.group.on("mouseover", this._mouseover, this);
|
|
57842
|
+
this.group.on("mouseout", this._mouseout, this);
|
|
57843
|
+
this.group.on("click", this._mouseClick, this);
|
|
57844
|
+
} else {
|
|
57845
|
+
this._symbolGroup.removeAll();
|
|
57846
|
+
}
|
|
57847
|
+
const symbolGroup = this._symbolGroup;
|
|
57848
|
+
const z2 = seriesModel.get("z2");
|
|
57849
|
+
const emphasisState = seriesModel.get("emphasis").emphasisState;
|
|
57850
|
+
const groupId = seriesModel.get("groupId");
|
|
57851
|
+
const upArrow = data.getLayout("upArrow");
|
|
57852
|
+
if (upArrow && upArrow.length) {
|
|
57853
|
+
each(upArrow, (item, i) => {
|
|
57854
|
+
const [x, y, count2, index] = item;
|
|
57855
|
+
const symbolProxy = createSymbol("lineArrowUp", 0, 0, ArrowSize2[0], ArrowSize2[1]);
|
|
57856
|
+
symbolProxy.shape = {
|
|
57857
|
+
...symbolProxy.shape,
|
|
57858
|
+
triangleWidth: 4,
|
|
57859
|
+
triangleHeight: 6,
|
|
57860
|
+
x,
|
|
57861
|
+
y,
|
|
57862
|
+
count: count2
|
|
57863
|
+
};
|
|
57864
|
+
symbolProxy.style = {
|
|
57865
|
+
stroke: LongColor2,
|
|
57866
|
+
fill: "none",
|
|
57867
|
+
lineWidth: 2
|
|
57868
|
+
};
|
|
57869
|
+
symbolProxy.z2 = z2;
|
|
57870
|
+
symbolProxy.states.emphasis = emphasisState;
|
|
57871
|
+
inner11(symbolProxy).index = index;
|
|
57872
|
+
inner11(symbolProxy).type = "up";
|
|
57873
|
+
inner11(symbolProxy).orderIndex = i;
|
|
57874
|
+
symbolGroup.add(symbolProxy);
|
|
57875
|
+
});
|
|
57876
|
+
}
|
|
57877
|
+
const downArrow = data.getLayout("downArrow");
|
|
57878
|
+
if (downArrow && downArrow.length) {
|
|
57879
|
+
each(downArrow, (item, i) => {
|
|
57880
|
+
const [x, y, count2, index] = item;
|
|
57881
|
+
const symbolProxy = createSymbol("lineArrowDown", 0, 0, ArrowSize2[0], ArrowSize2[1]);
|
|
57882
|
+
symbolProxy.shape = {
|
|
57883
|
+
...symbolProxy.shape,
|
|
57884
|
+
triangleWidth: 4,
|
|
57885
|
+
triangleHeight: 6,
|
|
57886
|
+
x,
|
|
57887
|
+
y,
|
|
57888
|
+
count: count2
|
|
57889
|
+
};
|
|
57890
|
+
symbolProxy.style = {
|
|
57891
|
+
stroke: ShortColor2,
|
|
57892
|
+
fill: "none",
|
|
57893
|
+
lineWidth: 2
|
|
57894
|
+
};
|
|
57895
|
+
symbolProxy.z2 = z2;
|
|
57896
|
+
symbolProxy.states.emphasis = emphasisState;
|
|
57897
|
+
inner11(symbolProxy).index = index;
|
|
57898
|
+
inner11(symbolProxy).type = "down";
|
|
57899
|
+
inner11(symbolProxy).orderIndex = i;
|
|
57900
|
+
symbolGroup.add(symbolProxy);
|
|
57901
|
+
});
|
|
57902
|
+
}
|
|
57903
|
+
toggleHoverEmphasis(this.group, null, null, false);
|
|
57904
|
+
getECData(this.group).groupId = groupId;
|
|
57905
|
+
}
|
|
57906
|
+
remove(ecModel, api2) {
|
|
57907
|
+
this.seriesModel = null;
|
|
57908
|
+
this._symbolGroup && this._symbolGroup.removeAll();
|
|
57909
|
+
this._symbolGroup = null;
|
|
57910
|
+
this.group.removeAll();
|
|
57911
|
+
}
|
|
57912
|
+
dispose(ecModel, api2) {
|
|
57913
|
+
this.remove(ecModel, api2);
|
|
57914
|
+
this.htmlContent.dispose();
|
|
57915
|
+
api2.getZr().off("click", this._clickGlobal);
|
|
57916
|
+
this.htmlContent = null;
|
|
57917
|
+
}
|
|
57918
|
+
};
|
|
57919
|
+
var PlaybackOrderView = PlaybackOrderView2;
|
|
57920
|
+
PlaybackOrderView.type = "playbackOrder";
|
|
57921
|
+
var PlaybackOrderView_default = PlaybackOrderView;
|
|
57922
|
+
|
|
57923
|
+
// src/chart/playbackOrder/PlaybackOrderSeries.ts
|
|
57924
|
+
var PlaybackOrderSeriesModel2 = class extends Series_default {
|
|
57925
|
+
constructor() {
|
|
57926
|
+
super(...arguments);
|
|
57927
|
+
this.type = PlaybackOrderSeriesModel2.type;
|
|
57928
|
+
this.ignoreStyleOnData = true;
|
|
57929
|
+
}
|
|
57930
|
+
getInitialData(option) {
|
|
57931
|
+
if (true) {
|
|
57932
|
+
const coordSys = option.coordinateSystem;
|
|
57933
|
+
if (coordSys !== "polar" && coordSys !== "cartesian2d") {
|
|
57934
|
+
throw new Error("PlaybackOrder not support coordinateSystem besides cartesian and polar");
|
|
57935
|
+
}
|
|
57936
|
+
}
|
|
57937
|
+
return createSeriesData_default(null, this, {
|
|
57938
|
+
useEncodeDefaulter: true
|
|
57939
|
+
});
|
|
57940
|
+
}
|
|
57941
|
+
getZLevelKey() {
|
|
57942
|
+
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
|
|
57943
|
+
}
|
|
57944
|
+
getResetData(data) {
|
|
57945
|
+
this.option.data = data;
|
|
57946
|
+
return this.option.data;
|
|
57947
|
+
}
|
|
57948
|
+
};
|
|
57949
|
+
var PlaybackOrderSeriesModel = PlaybackOrderSeriesModel2;
|
|
57950
|
+
PlaybackOrderSeriesModel.type = "series.playbackOrder";
|
|
57951
|
+
PlaybackOrderSeriesModel.dependencies = ["grid", "polar"];
|
|
57952
|
+
PlaybackOrderSeriesModel.defaultOption = {
|
|
57953
|
+
coordinateSystem: "cartesian2d",
|
|
57954
|
+
z: 2,
|
|
57955
|
+
z2: 0,
|
|
57956
|
+
legendHoverLink: true,
|
|
57957
|
+
precision: 2,
|
|
57958
|
+
xAxisIndex: 0,
|
|
57959
|
+
yAxisIndex: 0,
|
|
57960
|
+
emphasis: {
|
|
57961
|
+
emphasisState: {
|
|
57962
|
+
zlevel: 1
|
|
57963
|
+
}
|
|
57964
|
+
},
|
|
57965
|
+
clip: true
|
|
57966
|
+
};
|
|
57967
|
+
var PlaybackOrderSeries_default = PlaybackOrderSeriesModel;
|
|
57968
|
+
|
|
57969
|
+
// src/chart/playbackOrder/PlaybackOrderLayout.ts
|
|
57970
|
+
var arrowHeight2 = ArrowSize2[1];
|
|
57971
|
+
var closeArrowHeight2 = ArrowSize2[1] + 3;
|
|
57972
|
+
var arrowMargin2 = 10;
|
|
57973
|
+
var PlaybackOrderLayout = {
|
|
57974
|
+
seriesType: "playbackOrder",
|
|
57975
|
+
plan: createRenderPlanner(),
|
|
57976
|
+
reset: function(seriesModel, ecModel) {
|
|
57977
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
57978
|
+
if (!coordSys) {
|
|
57979
|
+
if (true) {
|
|
57980
|
+
error("The lines series must have a coordinate system.");
|
|
57981
|
+
}
|
|
57982
|
+
return;
|
|
57983
|
+
}
|
|
57984
|
+
const mainSeriesModal = ecModel.getMainSeries();
|
|
57985
|
+
if (!mainSeriesModal) {
|
|
57986
|
+
return;
|
|
57987
|
+
}
|
|
57988
|
+
const mainData = mainSeriesModal.getData();
|
|
57989
|
+
const dimLow = Math.max(mainData.getDimensionIndex("lowest"), 1);
|
|
57990
|
+
const dimHigh = Math.max(mainData.getDimensionIndex("highest"), 1);
|
|
57991
|
+
const mainStore = mainData.getStore();
|
|
57992
|
+
const data = seriesModel.getData();
|
|
57993
|
+
const dims = map(coordSys.dimensions, function(dim) {
|
|
57994
|
+
return data.mapDimension(dim);
|
|
57995
|
+
}).slice(0, 2);
|
|
57996
|
+
const store = data.getStore();
|
|
57997
|
+
const dimIdx0 = data.getDimensionIndex(dims[0]);
|
|
57998
|
+
return {
|
|
57999
|
+
progress(params, playbackorderData) {
|
|
58000
|
+
const upArrow = [];
|
|
58001
|
+
const downArrow = [];
|
|
58002
|
+
for (let i = params.start; i < params.end; i++) {
|
|
58003
|
+
const x = store.get(dimIdx0, i);
|
|
58004
|
+
const baseUp = mainStore.getByRawIndex(dimLow, x);
|
|
58005
|
+
const baseDown = mainStore.getByRawIndex(dimHigh, x);
|
|
58006
|
+
const dataModal = playbackorderData.getItemModel(i);
|
|
58007
|
+
const upOrders = dataModal.get("upOrders");
|
|
58008
|
+
const downOrders = dataModal.get("downOrders");
|
|
58009
|
+
const baseUpPoint = coordSys.dataToPoint([x, baseUp]);
|
|
58010
|
+
const baseDownPoint = coordSys.dataToPoint([x, baseDown]);
|
|
58011
|
+
const optimizeX = baseUpPoint[0] + 0.5;
|
|
58012
|
+
if (upOrders && upOrders.length) {
|
|
58013
|
+
const arrowY = baseUpPoint[1] + arrowMargin2 + arrowHeight2 / 2;
|
|
58014
|
+
upArrow.push([optimizeX, arrowY, upOrders.length, i]);
|
|
58015
|
+
}
|
|
58016
|
+
if (downOrders && downOrders.length) {
|
|
58017
|
+
const arrowY = baseDownPoint[1] - arrowMargin2 - arrowHeight2 / 2;
|
|
58018
|
+
downArrow.push([optimizeX, arrowY, downOrders.length, i]);
|
|
58019
|
+
}
|
|
58020
|
+
}
|
|
58021
|
+
data.setLayout({
|
|
58022
|
+
upArrow,
|
|
58023
|
+
downArrow
|
|
58024
|
+
});
|
|
58025
|
+
}
|
|
58026
|
+
};
|
|
58027
|
+
}
|
|
58028
|
+
};
|
|
58029
|
+
var PlaybackOrderLayout_default = PlaybackOrderLayout;
|
|
58030
|
+
|
|
58031
|
+
// src/chart/playbackOrder/install.ts
|
|
58032
|
+
function install26(registers) {
|
|
58033
|
+
registers.registerChartView(PlaybackOrderView_default);
|
|
58034
|
+
registers.registerSeriesModel(PlaybackOrderSeries_default);
|
|
58035
|
+
registers.registerLayout(PlaybackOrderLayout_default);
|
|
58036
|
+
}
|
|
58037
|
+
|
|
57338
58038
|
// src/chart/mineLines/util.ts
|
|
57339
58039
|
function findIntersectionPoint(A, B, rectangle, bias = "start") {
|
|
57340
58040
|
const [xA, yA] = A;
|
|
@@ -57710,7 +58410,7 @@ var MineLinesLayout = {
|
|
|
57710
58410
|
var MineLinesLayout_default = MineLinesLayout;
|
|
57711
58411
|
|
|
57712
58412
|
// src/chart/mineLines/install.ts
|
|
57713
|
-
function
|
|
58413
|
+
function install27(registers) {
|
|
57714
58414
|
registers.registerChartView(MineLinesView_default);
|
|
57715
58415
|
registers.registerSeriesModel(MineLinesSeries_default);
|
|
57716
58416
|
registers.registerLayout(MineLinesLayout_default);
|
|
@@ -58001,7 +58701,7 @@ var MinePolyLinesLayout = {
|
|
|
58001
58701
|
var MinePolyLinesLayout_default = MinePolyLinesLayout;
|
|
58002
58702
|
|
|
58003
58703
|
// src/chart/minePolyLines/install.ts
|
|
58004
|
-
function
|
|
58704
|
+
function install28(registers) {
|
|
58005
58705
|
registers.registerChartView(MinePolyLinesView_default);
|
|
58006
58706
|
registers.registerSeriesModel(MinePolyLinesSeries_default);
|
|
58007
58707
|
registers.registerLayout(MinePolyLinesLayout_default);
|
|
@@ -58243,7 +58943,7 @@ var LineFillsLayout = {
|
|
|
58243
58943
|
var LineFillsLayout_default = LineFillsLayout;
|
|
58244
58944
|
|
|
58245
58945
|
// src/chart/lineFills/install.ts
|
|
58246
|
-
function
|
|
58946
|
+
function install29(registers) {
|
|
58247
58947
|
registers.registerChartView(LineFillsView_default);
|
|
58248
58948
|
registers.registerSeriesModel(LineFillsSeries_default);
|
|
58249
58949
|
registers.registerLayout(LineFillsLayout_default);
|
|
@@ -58637,7 +59337,7 @@ var BoxesLayout = {
|
|
|
58637
59337
|
var BoxesLayout_default = BoxesLayout;
|
|
58638
59338
|
|
|
58639
59339
|
// src/chart/boxes/install.ts
|
|
58640
|
-
function
|
|
59340
|
+
function install30(registers) {
|
|
58641
59341
|
registers.registerChartView(BoxesView_default);
|
|
58642
59342
|
registers.registerSeriesModel(BoxesSeries_default);
|
|
58643
59343
|
registers.registerLayout(BoxesLayout_default);
|
|
@@ -58885,7 +59585,7 @@ var CharPlotLayout = {
|
|
|
58885
59585
|
var CharPlotLayout_default = CharPlotLayout;
|
|
58886
59586
|
|
|
58887
59587
|
// src/chart/charPlot/install.ts
|
|
58888
|
-
function
|
|
59588
|
+
function install31(registers) {
|
|
58889
59589
|
registers.registerSeriesModel(CharPlotSeries_default);
|
|
58890
59590
|
registers.registerChartView(CharPlotView_default);
|
|
58891
59591
|
registers.registerLayout(CharPlotLayout_default);
|
|
@@ -59230,7 +59930,7 @@ function calculateCandleWidth2(seriesModel, data) {
|
|
|
59230
59930
|
var candlePlotLayout_default = candlePlotLayout;
|
|
59231
59931
|
|
|
59232
59932
|
// src/chart/candlePlot/install.ts
|
|
59233
|
-
function
|
|
59933
|
+
function install32(registers) {
|
|
59234
59934
|
registers.registerChartView(CandlePlotView_default);
|
|
59235
59935
|
registers.registerSeriesModel(CandlePlotSeries_default);
|
|
59236
59936
|
registers.registerLayout(candlePlotLayout_default);
|
|
@@ -59478,7 +60178,7 @@ function calculateCandleWidth3(seriesModel, data) {
|
|
|
59478
60178
|
var barPlotLayout_default = barPlotLayout;
|
|
59479
60179
|
|
|
59480
60180
|
// src/chart/barPlot/install.ts
|
|
59481
|
-
function
|
|
60181
|
+
function install33(registers) {
|
|
59482
60182
|
registers.registerChartView(BarPlotView_default);
|
|
59483
60183
|
registers.registerSeriesModel(BarPlotSeries_default);
|
|
59484
60184
|
registers.registerLayout(barPlotLayout_default);
|
|
@@ -59700,7 +60400,7 @@ var ArrowsPlotLayout = {
|
|
|
59700
60400
|
var ArrowsPlotLayout_default = ArrowsPlotLayout;
|
|
59701
60401
|
|
|
59702
60402
|
// src/chart/arrowsPlot/install.ts
|
|
59703
|
-
function
|
|
60403
|
+
function install34(registers) {
|
|
59704
60404
|
registers.registerSeriesModel(ArrowsPlotSeries_default);
|
|
59705
60405
|
registers.registerChartView(ArrowPlotView_default);
|
|
59706
60406
|
registers.registerLayout(ArrowsPlotLayout_default);
|
|
@@ -60390,7 +61090,7 @@ var labelsLayout = {
|
|
|
60390
61090
|
var labelsLayout_default = labelsLayout;
|
|
60391
61091
|
|
|
60392
61092
|
// src/chart/labels/install.ts
|
|
60393
|
-
function
|
|
61093
|
+
function install35(registers) {
|
|
60394
61094
|
registers.registerSeriesModel(LabelsSeries_default);
|
|
60395
61095
|
registers.registerChartView(LabelsView_default);
|
|
60396
61096
|
registers.registerLayout(labelsLayout_default);
|
|
@@ -60534,7 +61234,7 @@ var hLinesLayout = {
|
|
|
60534
61234
|
var hLinesLayout_default = hLinesLayout;
|
|
60535
61235
|
|
|
60536
61236
|
// src/chart/hlines/install.ts
|
|
60537
|
-
function
|
|
61237
|
+
function install36(registers) {
|
|
60538
61238
|
registers.registerChartView(HLinesView_default);
|
|
60539
61239
|
registers.registerSeriesModel(HLinesSeries_default);
|
|
60540
61240
|
registers.registerLayout(hLinesLayout_default);
|
|
@@ -60826,7 +61526,7 @@ var fillsLayout = {
|
|
|
60826
61526
|
var fillsLayout_default = fillsLayout;
|
|
60827
61527
|
|
|
60828
61528
|
// src/chart/fills/install.ts
|
|
60829
|
-
function
|
|
61529
|
+
function install37(registers) {
|
|
60830
61530
|
registers.registerChartView(FillsView_default);
|
|
60831
61531
|
registers.registerSeriesModel(FillsSeries_default);
|
|
60832
61532
|
registers.registerLayout(fillsLayout_default);
|
|
@@ -61056,7 +61756,7 @@ var bgColorLayout = {
|
|
|
61056
61756
|
var BgColorLayout_default = bgColorLayout;
|
|
61057
61757
|
|
|
61058
61758
|
// src/chart/bgColor/install.ts
|
|
61059
|
-
function
|
|
61759
|
+
function install38(registers) {
|
|
61060
61760
|
registers.registerChartView(BgColorView_default);
|
|
61061
61761
|
registers.registerSeriesModel(BgColorSeries_default);
|
|
61062
61762
|
registers.registerLayout(BgColorLayout_default);
|
|
@@ -61454,7 +62154,7 @@ HeatmapSeriesModel.defaultOption = {
|
|
|
61454
62154
|
var HeatmapSeries_default = HeatmapSeriesModel;
|
|
61455
62155
|
|
|
61456
62156
|
// src/chart/heatmap/install.ts
|
|
61457
|
-
function
|
|
62157
|
+
function install39(registers) {
|
|
61458
62158
|
registers.registerChartView(HeatmapView_default);
|
|
61459
62159
|
registers.registerSeriesModel(HeatmapSeries_default);
|
|
61460
62160
|
}
|
|
@@ -62017,7 +62717,7 @@ PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries_defau
|
|
|
62017
62717
|
var PictorialBarSeries_default = PictorialBarSeriesModel;
|
|
62018
62718
|
|
|
62019
62719
|
// src/chart/bar/installPictorialBar.ts
|
|
62020
|
-
function
|
|
62720
|
+
function install40(registers) {
|
|
62021
62721
|
registers.registerChartView(PictorialBarView_default);
|
|
62022
62722
|
registers.registerSeriesModel(PictorialBarSeries_default);
|
|
62023
62723
|
registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout2, "pictorialBar"));
|
|
@@ -62070,7 +62770,7 @@ var ThemeRiverView2 = class extends Chart_default {
|
|
|
62070
62770
|
let polygon;
|
|
62071
62771
|
const textLayout = data.getItemLayout(indices[0]);
|
|
62072
62772
|
const labelModel = seriesModel.getModel("label");
|
|
62073
|
-
const
|
|
62773
|
+
const margin3 = labelModel.get("margin");
|
|
62074
62774
|
const emphasisModel = seriesModel.getModel("emphasis");
|
|
62075
62775
|
if (status === "add") {
|
|
62076
62776
|
const layerGroup = newLayersGroups[idx] = new Group_default();
|
|
@@ -62119,7 +62819,7 @@ var ThemeRiverView2 = class extends Chart_default {
|
|
|
62119
62819
|
});
|
|
62120
62820
|
const labelEl = polygon.getTextContent();
|
|
62121
62821
|
if (labelEl) {
|
|
62122
|
-
labelEl.x = textLayout.x -
|
|
62822
|
+
labelEl.x = textLayout.x - margin3;
|
|
62123
62823
|
labelEl.y = textLayout.y0 + textLayout.y / 2;
|
|
62124
62824
|
}
|
|
62125
62825
|
polygon.useStyle(style);
|
|
@@ -62418,7 +63118,7 @@ function computeBaseline(data) {
|
|
|
62418
63118
|
}
|
|
62419
63119
|
|
|
62420
63120
|
// src/chart/themeRiver/install.ts
|
|
62421
|
-
function
|
|
63121
|
+
function install41(registers) {
|
|
62422
63122
|
registers.registerChartView(ThemeRiverView_default);
|
|
62423
63123
|
registers.registerSeriesModel(ThemeRiverSeries_default);
|
|
62424
63124
|
registers.registerLayout(themeRiverLayout);
|
|
@@ -63056,7 +63756,7 @@ function sunburstVisual(ecModel) {
|
|
|
63056
63756
|
}
|
|
63057
63757
|
|
|
63058
63758
|
// src/chart/sunburst/install.ts
|
|
63059
|
-
function
|
|
63759
|
+
function install42(registers) {
|
|
63060
63760
|
registers.registerChartView(SunburstView_default);
|
|
63061
63761
|
registers.registerSeriesModel(SunburstSeries_default);
|
|
63062
63762
|
registers.registerLayout(curry(sunburstLayout, "sunburst"));
|
|
@@ -64504,7 +65204,7 @@ function hasOwnPathData(shape) {
|
|
|
64504
65204
|
}
|
|
64505
65205
|
|
|
64506
65206
|
// src/chart/custom/install.ts
|
|
64507
|
-
function
|
|
65207
|
+
function install43(registers) {
|
|
64508
65208
|
registers.registerChartView(CustomView_default);
|
|
64509
65209
|
registers.registerSeriesModel(CustomSeries_default);
|
|
64510
65210
|
}
|
|
@@ -64676,10 +65376,10 @@ GraphicComponentModel.defaultOption = {
|
|
|
64676
65376
|
};
|
|
64677
65377
|
|
|
64678
65378
|
// src/component/axisPointer/BaseAxisPointer.ts
|
|
64679
|
-
var
|
|
65379
|
+
var inner12 = makeInner();
|
|
64680
65380
|
var elInner = makeInner();
|
|
64681
65381
|
var clone4 = clone;
|
|
64682
|
-
var
|
|
65382
|
+
var bind3 = bind;
|
|
64683
65383
|
var BaseAxisPointer = class {
|
|
64684
65384
|
constructor() {
|
|
64685
65385
|
this._dragging = false;
|
|
@@ -64762,26 +65462,26 @@ var BaseAxisPointer = class {
|
|
|
64762
65462
|
createPointerEl(group, elOption, axisModel, axisPointerModel) {
|
|
64763
65463
|
const pointerOption = elOption.pointer;
|
|
64764
65464
|
if (pointerOption) {
|
|
64765
|
-
const pointerEl =
|
|
65465
|
+
const pointerEl = inner12(group).pointerEl = new graphic_exports[pointerOption.type](clone4(elOption.pointer));
|
|
64766
65466
|
group.add(pointerEl);
|
|
64767
65467
|
}
|
|
64768
65468
|
}
|
|
64769
65469
|
createLabelEl(group, elOption, axisModel, axisPointerModel) {
|
|
64770
65470
|
if (elOption.label) {
|
|
64771
|
-
const labelEl =
|
|
65471
|
+
const labelEl = inner12(group).labelEl = new Text_default(clone4(elOption.label));
|
|
64772
65472
|
group.add(labelEl);
|
|
64773
65473
|
updateLabelShowHide(labelEl, axisPointerModel);
|
|
64774
65474
|
}
|
|
64775
65475
|
}
|
|
64776
65476
|
updatePointerEl(group, elOption, updateProps3) {
|
|
64777
|
-
const pointerEl =
|
|
65477
|
+
const pointerEl = inner12(group).pointerEl;
|
|
64778
65478
|
if (pointerEl && elOption.pointer) {
|
|
64779
65479
|
pointerEl.setStyle(elOption.pointer.style);
|
|
64780
65480
|
updateProps3(pointerEl, {shape: elOption.pointer.shape});
|
|
64781
65481
|
}
|
|
64782
65482
|
}
|
|
64783
65483
|
updateLabelEl(group, elOption, updateProps3, axisPointerModel) {
|
|
64784
|
-
const labelEl =
|
|
65484
|
+
const labelEl = inner12(group).labelEl;
|
|
64785
65485
|
if (labelEl) {
|
|
64786
65486
|
labelEl.setStyle(elOption.label.style);
|
|
64787
65487
|
updateProps3(labelEl, {
|
|
@@ -64903,9 +65603,9 @@ var BaseAxisPointer = class {
|
|
|
64903
65603
|
onmousemove(e2) {
|
|
64904
65604
|
stop(e2.event);
|
|
64905
65605
|
},
|
|
64906
|
-
onmousedown:
|
|
64907
|
-
drift:
|
|
64908
|
-
ondragend:
|
|
65606
|
+
onmousedown: bind3(this._onHandleDragMove, this, 0, 0),
|
|
65607
|
+
drift: bind3(this._onHandleDragMove, this),
|
|
65608
|
+
ondragend: bind3(this._onHandleDragEnd, this)
|
|
64909
65609
|
});
|
|
64910
65610
|
zr.add(handle);
|
|
64911
65611
|
}
|
|
@@ -64942,7 +65642,7 @@ var BaseAxisPointer = class {
|
|
|
64942
65642
|
this._payloadInfo = trans;
|
|
64943
65643
|
handle.stopAnimation();
|
|
64944
65644
|
handle.attr(getHandleTransProps(trans));
|
|
64945
|
-
|
|
65645
|
+
inner12(handle).lastProp = null;
|
|
64946
65646
|
this._doDispatchAxisPointer();
|
|
64947
65647
|
}
|
|
64948
65648
|
_doDispatchAxisPointer() {
|
|
@@ -65007,8 +65707,8 @@ var BaseAxisPointer = class {
|
|
|
65007
65707
|
}
|
|
65008
65708
|
};
|
|
65009
65709
|
function updateProps2(animationModel, moveAnimation, el, props) {
|
|
65010
|
-
if (!propsEqual(
|
|
65011
|
-
|
|
65710
|
+
if (!propsEqual(inner12(el).lastProp, props)) {
|
|
65711
|
+
inner12(el).lastProp = props;
|
|
65012
65712
|
moveAnimation ? updateProps(el, props, animationModel) : (el.stopAnimation(), el.attr(props));
|
|
65013
65713
|
}
|
|
65014
65714
|
}
|
|
@@ -65333,23 +66033,23 @@ AxisPointerModel.defaultOption = {
|
|
|
65333
66033
|
var AxisPointerModel_default = AxisPointerModel;
|
|
65334
66034
|
|
|
65335
66035
|
// src/component/axisPointer/globalListener.ts
|
|
65336
|
-
var
|
|
65337
|
-
var
|
|
66036
|
+
var inner13 = makeInner();
|
|
66037
|
+
var each14 = each;
|
|
65338
66038
|
function register(key, api2, handler) {
|
|
65339
66039
|
if (env_default.node) {
|
|
65340
66040
|
return;
|
|
65341
66041
|
}
|
|
65342
66042
|
const zr = api2.getZr();
|
|
65343
|
-
|
|
66043
|
+
inner13(zr).records || (inner13(zr).records = {});
|
|
65344
66044
|
initGlobalListeners(zr, api2);
|
|
65345
|
-
const record =
|
|
66045
|
+
const record = inner13(zr).records[key] || (inner13(zr).records[key] = {});
|
|
65346
66046
|
record.handler = handler;
|
|
65347
66047
|
}
|
|
65348
66048
|
function initGlobalListeners(zr, api2) {
|
|
65349
|
-
if (
|
|
66049
|
+
if (inner13(zr).initialized) {
|
|
65350
66050
|
return;
|
|
65351
66051
|
}
|
|
65352
|
-
|
|
66052
|
+
inner13(zr).initialized = true;
|
|
65353
66053
|
useHandler("click", curry(doEnter, "click"));
|
|
65354
66054
|
useHandler("mousemove", curry(doEnter, "mousemove"));
|
|
65355
66055
|
useHandler("mouseup", curry(doEnter, "mouseup"));
|
|
@@ -65358,7 +66058,7 @@ function initGlobalListeners(zr, api2) {
|
|
|
65358
66058
|
function useHandler(eventType, cb) {
|
|
65359
66059
|
zr.on(eventType, function(e2) {
|
|
65360
66060
|
const dis = makeDispatchAction(api2);
|
|
65361
|
-
|
|
66061
|
+
each14(inner13(zr).records, function(record) {
|
|
65362
66062
|
record && cb(record, e2, dis.dispatchAction);
|
|
65363
66063
|
});
|
|
65364
66064
|
dispatchTooltipFinally(dis.pendings, api2);
|
|
@@ -65409,9 +66109,9 @@ function unregister(key, api2) {
|
|
|
65409
66109
|
return;
|
|
65410
66110
|
}
|
|
65411
66111
|
const zr = api2.getZr();
|
|
65412
|
-
const record = (
|
|
66112
|
+
const record = (inner13(zr).records || {})[key];
|
|
65413
66113
|
if (record) {
|
|
65414
|
-
|
|
66114
|
+
inner13(zr).records[key] = null;
|
|
65415
66115
|
}
|
|
65416
66116
|
}
|
|
65417
66117
|
|
|
@@ -65439,7 +66139,7 @@ var AxisPointerView2 = class extends Component_default2 {
|
|
|
65439
66139
|
this.xLock = false;
|
|
65440
66140
|
}
|
|
65441
66141
|
const updatePointDisable = globalTooltipModel && globalTooltipModel.option.updatePointDisable;
|
|
65442
|
-
if (updatePointDisable || playbackSelectModel.option.
|
|
66142
|
+
if (updatePointDisable || playbackSelectModel?.option.show || globalAxisPointerModel.option.updatePointDisable) {
|
|
65443
66143
|
return;
|
|
65444
66144
|
}
|
|
65445
66145
|
if (triggerOn !== "none" && (currTrigger === "leave" || triggerOn.indexOf(currTrigger) >= 0)) {
|
|
@@ -65529,7 +66229,7 @@ function findPointFromSeries(finder, ecModel) {
|
|
|
65529
66229
|
}
|
|
65530
66230
|
|
|
65531
66231
|
// src/component/axisPointer/axisTrigger.ts
|
|
65532
|
-
var
|
|
66232
|
+
var inner14 = makeInner();
|
|
65533
66233
|
function axisTrigger(payload, ecModel, api2) {
|
|
65534
66234
|
const currTrigger = payload.currTrigger;
|
|
65535
66235
|
let point = [payload.x, payload.y];
|
|
@@ -65793,8 +66493,8 @@ function dispatchPointer(ecModel, shouldHide, point, dispatchAction3) {
|
|
|
65793
66493
|
function dispatchHighDownActually(axesInfo, dispatchAction3, api2) {
|
|
65794
66494
|
const zr = api2.getZr();
|
|
65795
66495
|
const highDownKey = "axisPointerLastHighlights";
|
|
65796
|
-
const lastHighlights =
|
|
65797
|
-
const newHighlights =
|
|
66496
|
+
const lastHighlights = inner14(zr)[highDownKey] || {};
|
|
66497
|
+
const newHighlights = inner14(zr)[highDownKey] = {};
|
|
65798
66498
|
each(axesInfo, function(axisInfo, key) {
|
|
65799
66499
|
const option = axisInfo.axisPointerModel.option;
|
|
65800
66500
|
option.status === "show" && axisInfo.triggerEmphasis && each(option.seriesDataIndices, function(batchItem) {
|
|
@@ -65845,7 +66545,7 @@ function illegalPoint(point) {
|
|
|
65845
66545
|
}
|
|
65846
66546
|
|
|
65847
66547
|
// src/component/axisPointer/install.ts
|
|
65848
|
-
function
|
|
66548
|
+
function install44(registers) {
|
|
65849
66549
|
AxisView_default.registerAxisPointerClass("CartesianAxisPointer", CartesianAxisPointer_default);
|
|
65850
66550
|
registers.registerComponentModel(AxisPointerModel_default);
|
|
65851
66551
|
registers.registerComponentView(AxisPointerView_default);
|
|
@@ -65874,9 +66574,9 @@ function install43(registers) {
|
|
|
65874
66574
|
}
|
|
65875
66575
|
|
|
65876
66576
|
// src/component/grid/install.ts
|
|
65877
|
-
function
|
|
66577
|
+
function install45(registers) {
|
|
65878
66578
|
use(install6);
|
|
65879
|
-
use(
|
|
66579
|
+
use(install44);
|
|
65880
66580
|
}
|
|
65881
66581
|
|
|
65882
66582
|
// src/component/axisPointer/PolarAxisPointer.ts
|
|
@@ -66029,7 +66729,7 @@ RadiusAxis.prototype.radiusToData = Axis_default.prototype.coordToData;
|
|
|
66029
66729
|
var RadiusAxis_default = RadiusAxis;
|
|
66030
66730
|
|
|
66031
66731
|
// src/coord/polar/AngleAxis.ts
|
|
66032
|
-
var
|
|
66732
|
+
var inner15 = makeInner();
|
|
66033
66733
|
var AngleAxis = class extends Axis_default {
|
|
66034
66734
|
constructor(scale4, angleExtent) {
|
|
66035
66735
|
super("angle", scale4, angleExtent || [0, 360]);
|
|
@@ -66054,7 +66754,7 @@ var AngleAxis = class extends Axis_default {
|
|
|
66054
66754
|
let dh = maxH / unitH;
|
|
66055
66755
|
isNaN(dh) && (dh = Infinity);
|
|
66056
66756
|
let interval = Math.max(0, Math.floor(dh));
|
|
66057
|
-
const cache =
|
|
66757
|
+
const cache = inner15(axis.model);
|
|
66058
66758
|
const lastAutoInterval = cache.lastAutoInterval;
|
|
66059
66759
|
const lastTickCount = cache.lastTickCount;
|
|
66060
66760
|
if (lastAutoInterval != null && lastTickCount != null && Math.abs(lastAutoInterval - interval) <= 1 && Math.abs(lastTickCount - tickCount) <= 1 && lastAutoInterval > interval) {
|
|
@@ -66930,8 +67630,8 @@ var PolarView2 = class extends Component_default2 {
|
|
|
66930
67630
|
};
|
|
66931
67631
|
var PolarView = PolarView2;
|
|
66932
67632
|
PolarView.type = "polar";
|
|
66933
|
-
function
|
|
66934
|
-
use(
|
|
67633
|
+
function install46(registers) {
|
|
67634
|
+
use(install44);
|
|
66935
67635
|
AxisView_default.registerAxisPointerClass("PolarAxisPointer", PolarAxisPointer_default);
|
|
66936
67636
|
registers.registerCoordinateSystem("polar", polarCreator_default);
|
|
66937
67637
|
registers.registerComponentModel(PolarModel_default);
|
|
@@ -67394,8 +68094,8 @@ var SingleView2 = class extends Component_default2 {
|
|
|
67394
68094
|
};
|
|
67395
68095
|
var SingleView = SingleView2;
|
|
67396
68096
|
SingleView.type = "single";
|
|
67397
|
-
function
|
|
67398
|
-
use(
|
|
68097
|
+
function install47(registers) {
|
|
68098
|
+
use(install44);
|
|
67399
68099
|
AxisView_default.registerAxisPointerClass("SingleAxisPointer", SingleAxisPointer_default);
|
|
67400
68100
|
registers.registerComponentView(SingleView);
|
|
67401
68101
|
registers.registerComponentView(SingleAxisView_default);
|
|
@@ -67603,20 +68303,20 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67603
68303
|
}
|
|
67604
68304
|
return params.nameMap;
|
|
67605
68305
|
}
|
|
67606
|
-
_yearTextPositionControl(textEl, point, orient, position2,
|
|
68306
|
+
_yearTextPositionControl(textEl, point, orient, position2, margin3) {
|
|
67607
68307
|
let x = point[0];
|
|
67608
68308
|
let y = point[1];
|
|
67609
68309
|
let aligns = ["center", "bottom"];
|
|
67610
68310
|
if (position2 === "bottom") {
|
|
67611
|
-
y +=
|
|
68311
|
+
y += margin3;
|
|
67612
68312
|
aligns = ["center", "top"];
|
|
67613
68313
|
} else if (position2 === "left") {
|
|
67614
|
-
x -=
|
|
68314
|
+
x -= margin3;
|
|
67615
68315
|
} else if (position2 === "right") {
|
|
67616
|
-
x +=
|
|
68316
|
+
x += margin3;
|
|
67617
68317
|
aligns = ["center", "top"];
|
|
67618
68318
|
} else {
|
|
67619
|
-
y -=
|
|
68319
|
+
y -= margin3;
|
|
67620
68320
|
}
|
|
67621
68321
|
let rotate2 = 0;
|
|
67622
68322
|
if (position2 === "left" || position2 === "right") {
|
|
@@ -67637,7 +68337,7 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67637
68337
|
if (!yearLabel.get("show")) {
|
|
67638
68338
|
return;
|
|
67639
68339
|
}
|
|
67640
|
-
const
|
|
68340
|
+
const margin3 = yearLabel.get("margin");
|
|
67641
68341
|
let pos = yearLabel.get("position");
|
|
67642
68342
|
if (!pos) {
|
|
67643
68343
|
pos = orient !== "horizontal" ? "top" : "left";
|
|
@@ -67669,16 +68369,16 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67669
68369
|
text: content
|
|
67670
68370
|
})
|
|
67671
68371
|
});
|
|
67672
|
-
yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos,
|
|
68372
|
+
yearText.attr(this._yearTextPositionControl(yearText, posPoints[pos], orient, pos, margin3));
|
|
67673
68373
|
group.add(yearText);
|
|
67674
68374
|
}
|
|
67675
|
-
_monthTextPositionControl(point, isCenter, orient, position2,
|
|
68375
|
+
_monthTextPositionControl(point, isCenter, orient, position2, margin3) {
|
|
67676
68376
|
let align = "left";
|
|
67677
68377
|
let vAlign = "top";
|
|
67678
68378
|
let x = point[0];
|
|
67679
68379
|
let y = point[1];
|
|
67680
68380
|
if (orient === "horizontal") {
|
|
67681
|
-
y = y +
|
|
68381
|
+
y = y + margin3;
|
|
67682
68382
|
if (isCenter) {
|
|
67683
68383
|
align = "center";
|
|
67684
68384
|
}
|
|
@@ -67686,7 +68386,7 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67686
68386
|
vAlign = "bottom";
|
|
67687
68387
|
}
|
|
67688
68388
|
} else {
|
|
67689
|
-
x = x +
|
|
68389
|
+
x = x + margin3;
|
|
67690
68390
|
if (isCenter) {
|
|
67691
68391
|
vAlign = "middle";
|
|
67692
68392
|
}
|
|
@@ -67707,7 +68407,7 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67707
68407
|
return;
|
|
67708
68408
|
}
|
|
67709
68409
|
let nameMap = monthLabel.get("nameMap");
|
|
67710
|
-
let
|
|
68410
|
+
let margin3 = monthLabel.get("margin");
|
|
67711
68411
|
const pos = monthLabel.get("position");
|
|
67712
68412
|
const align = monthLabel.get("align");
|
|
67713
68413
|
const termPoints = [this._tlpoints, this._blpoints];
|
|
@@ -67719,7 +68419,7 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67719
68419
|
}
|
|
67720
68420
|
const idx = pos === "start" ? 0 : 1;
|
|
67721
68421
|
const axis = orient === "horizontal" ? 0 : 1;
|
|
67722
|
-
|
|
68422
|
+
margin3 = pos === "start" ? -margin3 : margin3;
|
|
67723
68423
|
const isCenter = align === "center";
|
|
67724
68424
|
for (let i = 0; i < termPoints[idx].length - 1; i++) {
|
|
67725
68425
|
const tmp = termPoints[idx][i].slice();
|
|
@@ -67740,22 +68440,22 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67740
68440
|
const content = this._formatterLabel(formatter, params);
|
|
67741
68441
|
const monthText = new Text_default({
|
|
67742
68442
|
z2: 30,
|
|
67743
|
-
style: extend(createTextStyle(monthLabel, {text: content}), this._monthTextPositionControl(tmp, isCenter, orient, pos,
|
|
68443
|
+
style: extend(createTextStyle(monthLabel, {text: content}), this._monthTextPositionControl(tmp, isCenter, orient, pos, margin3))
|
|
67744
68444
|
});
|
|
67745
68445
|
group.add(monthText);
|
|
67746
68446
|
}
|
|
67747
68447
|
}
|
|
67748
|
-
_weekTextPositionControl(point, orient, position2,
|
|
68448
|
+
_weekTextPositionControl(point, orient, position2, margin3, cellSize) {
|
|
67749
68449
|
let align = "center";
|
|
67750
68450
|
let vAlign = "middle";
|
|
67751
68451
|
let x = point[0];
|
|
67752
68452
|
let y = point[1];
|
|
67753
68453
|
const isStart = position2 === "start";
|
|
67754
68454
|
if (orient === "horizontal") {
|
|
67755
|
-
x = x +
|
|
68455
|
+
x = x + margin3 + (isStart ? 1 : -1) * cellSize[0] / 2;
|
|
67756
68456
|
align = isStart ? "right" : "left";
|
|
67757
68457
|
} else {
|
|
67758
|
-
y = y +
|
|
68458
|
+
y = y + margin3 + (isStart ? 1 : -1) * cellSize[1] / 2;
|
|
67759
68459
|
vAlign = isStart ? "bottom" : "top";
|
|
67760
68460
|
}
|
|
67761
68461
|
return {
|
|
@@ -67773,7 +68473,7 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67773
68473
|
const coordSys = calendarModel.coordinateSystem;
|
|
67774
68474
|
const pos = dayLabel.get("position");
|
|
67775
68475
|
let nameMap = dayLabel.get("nameMap");
|
|
67776
|
-
let
|
|
68476
|
+
let margin3 = dayLabel.get("margin");
|
|
67777
68477
|
const firstDayOfWeek = coordSys.getFirstDayOfWeek();
|
|
67778
68478
|
if (!nameMap || isString(nameMap)) {
|
|
67779
68479
|
if (nameMap) {
|
|
@@ -67784,10 +68484,10 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67784
68484
|
}
|
|
67785
68485
|
let start2 = coordSys.getNextNDay(rangeData.end.time, 7 - rangeData.lweek).time;
|
|
67786
68486
|
const cellSize = [coordSys.getCellWidth(), coordSys.getCellHeight()];
|
|
67787
|
-
|
|
68487
|
+
margin3 = parsePercent2(margin3, Math.min(cellSize[1], cellSize[0]));
|
|
67788
68488
|
if (pos === "start") {
|
|
67789
68489
|
start2 = coordSys.getNextNDay(rangeData.start.time, -(7 + rangeData.fweek)).time;
|
|
67790
|
-
|
|
68490
|
+
margin3 = -margin3;
|
|
67791
68491
|
}
|
|
67792
68492
|
for (let i = 0; i < 7; i++) {
|
|
67793
68493
|
const tmpD = coordSys.getNextNDay(start2, i);
|
|
@@ -67796,7 +68496,7 @@ var CalendarView2 = class extends Component_default2 {
|
|
|
67796
68496
|
day = Math.abs((i + firstDayOfWeek) % 7);
|
|
67797
68497
|
const weekText = new Text_default({
|
|
67798
68498
|
z2: 30,
|
|
67799
|
-
style: extend(createTextStyle(dayLabel, {text: nameMap[day]}), this._weekTextPositionControl(point, orient, pos,
|
|
68499
|
+
style: extend(createTextStyle(dayLabel, {text: nameMap[day]}), this._weekTextPositionControl(point, orient, pos, margin3, cellSize))
|
|
67800
68500
|
});
|
|
67801
68501
|
group.add(weekText);
|
|
67802
68502
|
}
|
|
@@ -68085,7 +68785,7 @@ function getCoordSys5(finder) {
|
|
|
68085
68785
|
var Calendar_default = Calendar;
|
|
68086
68786
|
|
|
68087
68787
|
// src/component/calendar/install.ts
|
|
68088
|
-
function
|
|
68788
|
+
function install48(registers) {
|
|
68089
68789
|
registers.registerComponentModel(CalendarModel_default);
|
|
68090
68790
|
registers.registerComponentView(CalendarView_default);
|
|
68091
68791
|
registers.registerCoordinateSystem("calendar", Calendar_default);
|
|
@@ -68099,7 +68799,7 @@ var nonShapeGraphicElements = {
|
|
|
68099
68799
|
image: Image_default,
|
|
68100
68800
|
text: Text_default
|
|
68101
68801
|
};
|
|
68102
|
-
var
|
|
68802
|
+
var inner16 = makeInner();
|
|
68103
68803
|
var GraphicComponentView2 = class extends Component_default2 {
|
|
68104
68804
|
constructor() {
|
|
68105
68805
|
super(...arguments);
|
|
@@ -68200,7 +68900,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68200
68900
|
}
|
|
68201
68901
|
el2 = createEl2(id, targetElParent, elOption.type, elMap);
|
|
68202
68902
|
} else {
|
|
68203
|
-
el2 && (
|
|
68903
|
+
el2 && (inner16(el2).isNew = false);
|
|
68204
68904
|
stopPreviousKeyframeAnimationAndRestore(el2);
|
|
68205
68905
|
}
|
|
68206
68906
|
if (el2) {
|
|
@@ -68238,7 +68938,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68238
68938
|
let isInit = false;
|
|
68239
68939
|
if (isMerge) {
|
|
68240
68940
|
const oldClipPath = el.getClipPath();
|
|
68241
|
-
isInit = !oldClipPath ||
|
|
68941
|
+
isInit = !oldClipPath || inner16(oldClipPath).type !== clipPathType;
|
|
68242
68942
|
clipPath = isInit ? newEl(clipPathType) : oldClipPath;
|
|
68243
68943
|
} else if (isReplace) {
|
|
68244
68944
|
isInit = true;
|
|
@@ -68248,7 +68948,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68248
68948
|
applyUpdateTransition(clipPath, clipPathOption, graphicModel, {isInit});
|
|
68249
68949
|
applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);
|
|
68250
68950
|
}
|
|
68251
|
-
const elInner2 =
|
|
68951
|
+
const elInner2 = inner16(el);
|
|
68252
68952
|
el.setTextConfig(textConfig);
|
|
68253
68953
|
elInner2.option = elOption;
|
|
68254
68954
|
setEventData(el, graphicModel, elOption);
|
|
@@ -68278,8 +68978,8 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68278
68978
|
}
|
|
68279
68979
|
const parentEl = el.parent;
|
|
68280
68980
|
const isParentRoot = parentEl === rootGroup;
|
|
68281
|
-
const elInner2 =
|
|
68282
|
-
const parentElInner =
|
|
68981
|
+
const elInner2 = inner16(el);
|
|
68982
|
+
const parentElInner = inner16(parentEl);
|
|
68283
68983
|
elInner2.width = parsePercent2(elInner2.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;
|
|
68284
68984
|
elInner2.height = parsePercent2(elInner2.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;
|
|
68285
68985
|
}
|
|
@@ -68291,7 +68991,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68291
68991
|
continue;
|
|
68292
68992
|
}
|
|
68293
68993
|
const parentEl = el.parent;
|
|
68294
|
-
const parentElInner =
|
|
68994
|
+
const parentElInner = inner16(parentEl);
|
|
68295
68995
|
const containerInfo = parentEl === rootGroup ? {
|
|
68296
68996
|
width: apiWidth,
|
|
68297
68997
|
height: apiHeight
|
|
@@ -68301,7 +69001,7 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68301
69001
|
};
|
|
68302
69002
|
const layoutPos = {};
|
|
68303
69003
|
const layouted = positionElement(el, elOption, containerInfo, null, {hv: elOption.hv, boundingMode: elOption.bounding}, layoutPos);
|
|
68304
|
-
if (!
|
|
69004
|
+
if (!inner16(el).isNew && layouted) {
|
|
68305
69005
|
const transition = elOption.transition;
|
|
68306
69006
|
const animatePos = {};
|
|
68307
69007
|
for (let k = 0; k < xy.length; k++) {
|
|
@@ -68332,13 +69032,13 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68332
69032
|
if (isInit) {
|
|
68333
69033
|
el = createEl2(id, targetElParent, labelOption.type, elLabelMap);
|
|
68334
69034
|
} else {
|
|
68335
|
-
el && (
|
|
69035
|
+
el && (inner16(el).isNew = false);
|
|
68336
69036
|
}
|
|
68337
69037
|
if (el) {
|
|
68338
69038
|
const elOptionCleaned = getCleanedElOption(labelOption);
|
|
68339
69039
|
updateCommonAttrs(el, labelOption, globalZ, globalZLevel);
|
|
68340
69040
|
applyUpdateTransition(el, elOptionCleaned, graphicModel, {isInit});
|
|
68341
|
-
|
|
69041
|
+
inner16(el).y = el.y;
|
|
68342
69042
|
}
|
|
68343
69043
|
if (labelOption.children) {
|
|
68344
69044
|
each(labelOption.children, (childLabelOption) => {
|
|
@@ -68365,10 +69065,10 @@ var GraphicComponentView2 = class extends Component_default2 {
|
|
|
68365
69065
|
const elMap = this._elMap;
|
|
68366
69066
|
const elLabelMap = this._elLabelMap;
|
|
68367
69067
|
elMap.each((el) => {
|
|
68368
|
-
removeEl(el,
|
|
69068
|
+
removeEl(el, inner16(el).option, elMap, this._lastGraphicModel);
|
|
68369
69069
|
});
|
|
68370
69070
|
elLabelMap.each((el) => {
|
|
68371
|
-
removeEl(el,
|
|
69071
|
+
removeEl(el, inner16(el).option, elLabelMap, this._lastGraphicModel);
|
|
68372
69072
|
});
|
|
68373
69073
|
this._clearSeriesLabels();
|
|
68374
69074
|
this._elMap = createHashMap();
|
|
@@ -68392,15 +69092,15 @@ function newEl(graphicType) {
|
|
|
68392
69092
|
assert(Clz, `graphic type ${graphicType} can not be found`);
|
|
68393
69093
|
}
|
|
68394
69094
|
const el = new Clz({});
|
|
68395
|
-
|
|
69095
|
+
inner16(el).type = graphicType;
|
|
68396
69096
|
return el;
|
|
68397
69097
|
}
|
|
68398
69098
|
function createEl2(id, targetElParent, graphicType, elMap) {
|
|
68399
69099
|
const el = newEl(graphicType);
|
|
68400
69100
|
targetElParent.add(el);
|
|
68401
69101
|
elMap.set(id, el);
|
|
68402
|
-
|
|
68403
|
-
|
|
69102
|
+
inner16(el).id = id;
|
|
69103
|
+
inner16(el).isNew = true;
|
|
68404
69104
|
return el;
|
|
68405
69105
|
}
|
|
68406
69106
|
function removeEl(elExisting, elOption, elMap, graphicModel) {
|
|
@@ -68410,7 +69110,7 @@ function removeEl(elExisting, elOption, elMap, graphicModel) {
|
|
|
68410
69110
|
removeEl(el, elOption, elMap, graphicModel);
|
|
68411
69111
|
});
|
|
68412
69112
|
applyLeaveTransition(elExisting, elOption, graphicModel);
|
|
68413
|
-
elMap.removeKey(
|
|
69113
|
+
elMap.removeKey(inner16(elExisting).id);
|
|
68414
69114
|
}
|
|
68415
69115
|
}
|
|
68416
69116
|
function removeLabelEl(elOption, elMap) {
|
|
@@ -68424,7 +69124,7 @@ function removeLabelEl(elOption, elMap) {
|
|
|
68424
69124
|
removeLabelEl(option, elMap);
|
|
68425
69125
|
});
|
|
68426
69126
|
}
|
|
68427
|
-
elMap.removeKey(
|
|
69127
|
+
elMap.removeKey(inner16(elExisting).id);
|
|
68428
69128
|
}
|
|
68429
69129
|
}
|
|
68430
69130
|
function updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {
|
|
@@ -68478,7 +69178,7 @@ function setEventData(el, graphicModel, elOption) {
|
|
|
68478
69178
|
}
|
|
68479
69179
|
|
|
68480
69180
|
// src/component/graphic/install.ts
|
|
68481
|
-
function
|
|
69181
|
+
function install49(registers) {
|
|
68482
69182
|
registers.registerComponentModel(GraphicComponentModel);
|
|
68483
69183
|
registers.registerComponentView(GraphicComponentView);
|
|
68484
69184
|
registers.registerPreprocessor(function(option) {
|
|
@@ -68994,7 +69694,7 @@ SelectDataZoomView.type = "dataZoom.select";
|
|
|
68994
69694
|
var SelectZoomView_default = SelectDataZoomView;
|
|
68995
69695
|
|
|
68996
69696
|
// src/component/dataZoom/AxisProxy.ts
|
|
68997
|
-
var
|
|
69697
|
+
var each15 = each;
|
|
68998
69698
|
var asc2 = asc;
|
|
68999
69699
|
var leftMinVisibleBarCount = 2;
|
|
69000
69700
|
var rightMinVisibleBarCount = 2;
|
|
@@ -69053,7 +69753,7 @@ var AxisProxy = class {
|
|
|
69053
69753
|
const percentWindow = [];
|
|
69054
69754
|
const valueWindow = [];
|
|
69055
69755
|
let hasPropModeValue;
|
|
69056
|
-
|
|
69756
|
+
each15(["start", "end"], function(prop, idx) {
|
|
69057
69757
|
let boundPercent = opt[prop];
|
|
69058
69758
|
let boundValue = opt[prop + "Value"];
|
|
69059
69759
|
if (rangePropMode[idx] === "percent") {
|
|
@@ -69215,7 +69915,7 @@ var AxisProxy = class {
|
|
|
69215
69915
|
if (filterMode === "none") {
|
|
69216
69916
|
return;
|
|
69217
69917
|
}
|
|
69218
|
-
|
|
69918
|
+
each15(seriesModels, function(seriesModel) {
|
|
69219
69919
|
let seriesData = seriesModel.getData();
|
|
69220
69920
|
const dataDims = seriesData.mapDimensionsAll(axisDim);
|
|
69221
69921
|
if (!dataDims.length || seriesModel.get("notFilterData")) {
|
|
@@ -69256,7 +69956,7 @@ var AxisProxy = class {
|
|
|
69256
69956
|
} else {
|
|
69257
69957
|
const offset = seriesModel.get("offset") || 0;
|
|
69258
69958
|
const offset1 = seriesModel.get("offset1") || 0;
|
|
69259
|
-
|
|
69959
|
+
each15(dataDims, function(dim) {
|
|
69260
69960
|
if (filterMode === "empty") {
|
|
69261
69961
|
seriesModel.setData(seriesData = seriesData.map(dim, function(value) {
|
|
69262
69962
|
return !isInWindow(value) ? NaN : value;
|
|
@@ -69285,7 +69985,7 @@ var AxisProxy = class {
|
|
|
69285
69985
|
}
|
|
69286
69986
|
});
|
|
69287
69987
|
}
|
|
69288
|
-
|
|
69988
|
+
each15(dataDims, function(dim) {
|
|
69289
69989
|
seriesData.setApproximateExtent(valueWindow, dim);
|
|
69290
69990
|
});
|
|
69291
69991
|
});
|
|
@@ -69300,7 +70000,7 @@ var AxisProxy = class {
|
|
|
69300
70000
|
const minMaxSpan = this._minMaxSpan = {};
|
|
69301
70001
|
const dataZoomModel = this._dataZoomModel;
|
|
69302
70002
|
const dataExtent = this._dataExtent;
|
|
69303
|
-
|
|
70003
|
+
each15(["min", "max"], function(minMax) {
|
|
69304
70004
|
let percentSpan = dataZoomModel.get(minMax + "Span");
|
|
69305
70005
|
let valueSpan = dataZoomModel.get(minMax + "ValueSpan");
|
|
69306
70006
|
valueSpan != null && (valueSpan = this.getAxisModel().axis.scale.parse(valueSpan));
|
|
@@ -69337,7 +70037,7 @@ function calculateDataExtent(axisProxy, axisDim, seriesModels) {
|
|
|
69337
70037
|
const dataExtent = [Infinity, -Infinity];
|
|
69338
70038
|
const axisModel = axisProxy.getAxisModel();
|
|
69339
70039
|
const dataFromSeriesName = axisModel.axis.model.get("dataFromSeriesName");
|
|
69340
|
-
|
|
70040
|
+
each15(seriesModels, function(seriesModel) {
|
|
69341
70041
|
const location = seriesModel.get("location");
|
|
69342
70042
|
if (seriesModel.get("invisible") || dataFromSeriesName && seriesModel.name !== dataFromSeriesName || location && ["bottom", "top"].includes(location)) {
|
|
69343
70043
|
return;
|
|
@@ -69461,7 +70161,7 @@ function installCommon(registers) {
|
|
|
69461
70161
|
}
|
|
69462
70162
|
|
|
69463
70163
|
// src/component/dataZoom/installDataZoomSelect.ts
|
|
69464
|
-
function
|
|
70164
|
+
function install50(registers) {
|
|
69465
70165
|
registers.registerComponentModel(SelectZoomModel_default);
|
|
69466
70166
|
registers.registerComponentView(SelectZoomView_default);
|
|
69467
70167
|
installCommon(registers);
|
|
@@ -70348,11 +71048,11 @@ registerAction({
|
|
|
70348
71048
|
var DataView_default = DataView;
|
|
70349
71049
|
|
|
70350
71050
|
// src/component/dataZoom/history.ts
|
|
70351
|
-
var
|
|
70352
|
-
var
|
|
71051
|
+
var each16 = each;
|
|
71052
|
+
var inner17 = makeInner();
|
|
70353
71053
|
function push(ecModel, newSnapshot) {
|
|
70354
71054
|
const storedSnapshots = getStoreSnapshots(ecModel);
|
|
70355
|
-
|
|
71055
|
+
each16(newSnapshot, function(batchItem, dataZoomId) {
|
|
70356
71056
|
let i = storedSnapshots.length - 1;
|
|
70357
71057
|
for (; i >= 0; i--) {
|
|
70358
71058
|
const snapshot = storedSnapshots[i];
|
|
@@ -70379,7 +71079,7 @@ function pop(ecModel) {
|
|
|
70379
71079
|
const head = storedSnapshots[storedSnapshots.length - 1];
|
|
70380
71080
|
storedSnapshots.length > 1 && storedSnapshots.pop();
|
|
70381
71081
|
const snapshot = {};
|
|
70382
|
-
|
|
71082
|
+
each16(head, function(batchItem, dataZoomId) {
|
|
70383
71083
|
for (let i = storedSnapshots.length - 1; i >= 0; i--) {
|
|
70384
71084
|
batchItem = storedSnapshots[i][dataZoomId];
|
|
70385
71085
|
if (batchItem) {
|
|
@@ -70391,13 +71091,13 @@ function pop(ecModel) {
|
|
|
70391
71091
|
return snapshot;
|
|
70392
71092
|
}
|
|
70393
71093
|
function clear2(ecModel) {
|
|
70394
|
-
|
|
71094
|
+
inner17(ecModel).snapshots = null;
|
|
70395
71095
|
}
|
|
70396
71096
|
function count(ecModel) {
|
|
70397
71097
|
return getStoreSnapshots(ecModel).length;
|
|
70398
71098
|
}
|
|
70399
71099
|
function getStoreSnapshots(ecModel) {
|
|
70400
|
-
const store =
|
|
71100
|
+
const store = inner17(ecModel);
|
|
70401
71101
|
if (!store.snapshots) {
|
|
70402
71102
|
store.snapshots = [{}];
|
|
70403
71103
|
}
|
|
@@ -70692,7 +71392,7 @@ function getSize2(xyMinMax) {
|
|
|
70692
71392
|
var BrushTargetManager_default = BrushTargetManager;
|
|
70693
71393
|
|
|
70694
71394
|
// src/component/toolbox/feature/DataZoom.ts
|
|
70695
|
-
var
|
|
71395
|
+
var each17 = each;
|
|
70696
71396
|
var DATA_ZOOM_ID_BASE = makeInternalComponentId("toolbox-dataZoom_");
|
|
70697
71397
|
var DataZoomFeature = class extends ToolboxFeature {
|
|
70698
71398
|
render(featureModel, ecModel, api2, payload) {
|
|
@@ -70760,7 +71460,7 @@ var DataZoomFeature = class extends ToolboxFeature {
|
|
|
70760
71460
|
}
|
|
70761
71461
|
_dispatchZoomAction(snapshot) {
|
|
70762
71462
|
const batch = [];
|
|
70763
|
-
|
|
71463
|
+
each17(snapshot, function(batchItem, dataZoomId) {
|
|
70764
71464
|
batch.push(clone(batchItem));
|
|
70765
71465
|
});
|
|
70766
71466
|
batch.length && this.api.dispatchAction({
|
|
@@ -70843,8 +71543,8 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
70843
71543
|
const dzOptions = [];
|
|
70844
71544
|
const finder = makeAxisFinder(dzFeatureModel);
|
|
70845
71545
|
const finderResult = parseFinder(ecModel, finder);
|
|
70846
|
-
|
|
70847
|
-
|
|
71546
|
+
each17(finderResult.xAxisModels, (axisModel) => buildInternalOptions(axisModel, "xAxis", "xAxisIndex"));
|
|
71547
|
+
each17(finderResult.yAxisModels, (axisModel) => buildInternalOptions(axisModel, "yAxis", "yAxisIndex"));
|
|
70848
71548
|
function buildInternalOptions(axisModel, axisMainType, axisIndexPropName) {
|
|
70849
71549
|
const axisIndex = axisModel.componentIndex;
|
|
70850
71550
|
const newOpt = {
|
|
@@ -70861,7 +71561,7 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
70861
71561
|
var DataZoom_default = DataZoomFeature;
|
|
70862
71562
|
|
|
70863
71563
|
// src/component/toolbox/install.ts
|
|
70864
|
-
function
|
|
71564
|
+
function install51(registers) {
|
|
70865
71565
|
registers.registerComponentModel(ToolboxModel_default);
|
|
70866
71566
|
registers.registerComponentView(ToolboxView_default);
|
|
70867
71567
|
registerFeature("saveAsImage", SaveAsImage_default);
|
|
@@ -70869,7 +71569,7 @@ function install50(registers) {
|
|
|
70869
71569
|
registerFeature("dataView", DataView_default);
|
|
70870
71570
|
registerFeature("dataZoom", DataZoom_default);
|
|
70871
71571
|
registerFeature("restore", Restore_default);
|
|
70872
|
-
use(
|
|
71572
|
+
use(install50);
|
|
70873
71573
|
}
|
|
70874
71574
|
|
|
70875
71575
|
// src/component/tooltip/TooltipModel.ts
|
|
@@ -71089,7 +71789,7 @@ function makeStyleCoord(out2, zr, container, zrX, zrY) {
|
|
|
71089
71789
|
out2[2] = out2[0] / zr.getWidth();
|
|
71090
71790
|
out2[3] = out2[1] / zr.getHeight();
|
|
71091
71791
|
}
|
|
71092
|
-
var
|
|
71792
|
+
var TooltipHTMLContent2 = class {
|
|
71093
71793
|
constructor(api2, opt) {
|
|
71094
71794
|
this._show = false;
|
|
71095
71795
|
this._styleCoord = [0, 0, 0, 0];
|
|
@@ -71247,7 +71947,7 @@ var TooltipHTMLContent = class {
|
|
|
71247
71947
|
this.el = this._container = null;
|
|
71248
71948
|
}
|
|
71249
71949
|
};
|
|
71250
|
-
var TooltipHTMLContent_default =
|
|
71950
|
+
var TooltipHTMLContent_default = TooltipHTMLContent2;
|
|
71251
71951
|
|
|
71252
71952
|
// src/component/tooltip/TooltipRichContent.ts
|
|
71253
71953
|
var TooltipRichContent = class {
|
|
@@ -72098,8 +72798,8 @@ function findComponentReference(payload, ecModel, api2) {
|
|
|
72098
72798
|
var TooltipView_default = TooltipView;
|
|
72099
72799
|
|
|
72100
72800
|
// src/component/tooltip/install.ts
|
|
72101
|
-
function
|
|
72102
|
-
use(
|
|
72801
|
+
function install52(registers) {
|
|
72802
|
+
use(install44);
|
|
72103
72803
|
registers.registerComponentModel(TooltipModel_default);
|
|
72104
72804
|
registers.registerComponentView(TooltipView_default);
|
|
72105
72805
|
registers.registerAction({
|
|
@@ -72156,18 +72856,18 @@ function brushPreprocessor(option, isNew) {
|
|
|
72156
72856
|
}
|
|
72157
72857
|
}
|
|
72158
72858
|
function removeDuplicate(arr) {
|
|
72159
|
-
const
|
|
72859
|
+
const map9 = {};
|
|
72160
72860
|
each(arr, function(val) {
|
|
72161
|
-
|
|
72861
|
+
map9[val] = 1;
|
|
72162
72862
|
});
|
|
72163
72863
|
arr.length = 0;
|
|
72164
|
-
each(
|
|
72864
|
+
each(map9, function(flag, val) {
|
|
72165
72865
|
arr.push(val);
|
|
72166
72866
|
});
|
|
72167
72867
|
}
|
|
72168
72868
|
|
|
72169
72869
|
// src/visual/visualSolution.ts
|
|
72170
|
-
var
|
|
72870
|
+
var each18 = each;
|
|
72171
72871
|
function hasKeys(obj) {
|
|
72172
72872
|
if (obj) {
|
|
72173
72873
|
for (const name in obj) {
|
|
@@ -72179,9 +72879,9 @@ function hasKeys(obj) {
|
|
|
72179
72879
|
}
|
|
72180
72880
|
function createVisualMappings(option, stateList, supplementVisualOption) {
|
|
72181
72881
|
const visualMappings = {};
|
|
72182
|
-
|
|
72882
|
+
each18(stateList, function(state) {
|
|
72183
72883
|
const mappings = visualMappings[state] = createMappings();
|
|
72184
|
-
|
|
72884
|
+
each18(option[state], function(visualData, visualType) {
|
|
72185
72885
|
if (!VisualMapping_default.isValidType(visualType)) {
|
|
72186
72886
|
return;
|
|
72187
72887
|
}
|
|
@@ -72725,7 +73425,7 @@ var BrushFeature = class extends ToolboxFeature {
|
|
|
72725
73425
|
var Brush_default = BrushFeature;
|
|
72726
73426
|
|
|
72727
73427
|
// src/component/brush/install.ts
|
|
72728
|
-
function
|
|
73428
|
+
function install53(registers) {
|
|
72729
73429
|
registers.registerComponentView(BrushView_default);
|
|
72730
73430
|
registers.registerComponentModel(BrushModel_default);
|
|
72731
73431
|
registers.registerPreprocessor(brushPreprocessor);
|
|
@@ -72872,7 +73572,7 @@ var TitleView2 = class extends Component_default2 {
|
|
|
72872
73572
|
};
|
|
72873
73573
|
var TitleView = TitleView2;
|
|
72874
73574
|
TitleView.type = "title";
|
|
72875
|
-
function
|
|
73575
|
+
function install54(registers) {
|
|
72876
73576
|
registers.registerComponentModel(TitleModel);
|
|
72877
73577
|
registers.registerComponentView(TitleView);
|
|
72878
73578
|
}
|
|
@@ -72948,7 +73648,7 @@ var CursorPointerView2 = class extends Component_default2 {
|
|
|
72948
73648
|
};
|
|
72949
73649
|
var CursorPointerView = CursorPointerView2;
|
|
72950
73650
|
CursorPointerView.type = "cursorPointer";
|
|
72951
|
-
function
|
|
73651
|
+
function install55(registers) {
|
|
72952
73652
|
registers.registerComponentModel(CursorPointerModel);
|
|
72953
73653
|
registers.registerComponentView(CursorPointerView);
|
|
72954
73654
|
}
|
|
@@ -73033,7 +73733,7 @@ function getTextYOffset(height, align, paddings) {
|
|
|
73033
73733
|
return paddings;
|
|
73034
73734
|
}
|
|
73035
73735
|
}
|
|
73036
|
-
var
|
|
73736
|
+
var margin2 = 6;
|
|
73037
73737
|
function getXYByPosition(rect, position2, width, height, frame_width = 0) {
|
|
73038
73738
|
let x = rect.x;
|
|
73039
73739
|
let y = rect.y;
|
|
@@ -73050,16 +73750,16 @@ function getXYByPosition(rect, position2, width, height, frame_width = 0) {
|
|
|
73050
73750
|
x = x + (rect.width - width) / 2 + frame_width;
|
|
73051
73751
|
break;
|
|
73052
73752
|
case "top":
|
|
73053
|
-
y = y + frame_width +
|
|
73753
|
+
y = y + frame_width + margin2;
|
|
73054
73754
|
break;
|
|
73055
73755
|
case "bottom":
|
|
73056
|
-
y = y + rect.height - height - frame_width -
|
|
73756
|
+
y = y + rect.height - height - frame_width - margin2;
|
|
73057
73757
|
break;
|
|
73058
73758
|
case "middle":
|
|
73059
73759
|
y = y + (rect.height - height) / 2 + frame_width;
|
|
73060
73760
|
break;
|
|
73061
73761
|
default:
|
|
73062
|
-
y = y + frame_width +
|
|
73762
|
+
y = y + frame_width + margin2;
|
|
73063
73763
|
break;
|
|
73064
73764
|
}
|
|
73065
73765
|
}
|
|
@@ -73365,7 +74065,7 @@ TableView.type = "table";
|
|
|
73365
74065
|
var TableView_default = TableView;
|
|
73366
74066
|
|
|
73367
74067
|
// src/component/table/install.ts
|
|
73368
|
-
function
|
|
74068
|
+
function install56(registers) {
|
|
73369
74069
|
registers.registerComponentModel(TableModel_default);
|
|
73370
74070
|
registers.registerComponentView(TableView_default);
|
|
73371
74071
|
}
|
|
@@ -73820,7 +74520,7 @@ AlarmModel.defaultOption = {
|
|
|
73820
74520
|
var AlarmModel_default = AlarmModel;
|
|
73821
74521
|
|
|
73822
74522
|
// src/component/alarm/install.ts
|
|
73823
|
-
function
|
|
74523
|
+
function install57(registers) {
|
|
73824
74524
|
registers.registerComponentView(AlarmView_default);
|
|
73825
74525
|
registers.registerComponentModel(AlarmModel_default);
|
|
73826
74526
|
registers.registerAction({type: "alarm", event: "alarm", update: "updateVisual"}, function(payload, ecModel) {
|
|
@@ -73898,7 +74598,7 @@ var BgRectView2 = class extends Component_default2 {
|
|
|
73898
74598
|
};
|
|
73899
74599
|
var BgRectView = BgRectView2;
|
|
73900
74600
|
BgRectView.type = "bgRect";
|
|
73901
|
-
function
|
|
74601
|
+
function install58(registers) {
|
|
73902
74602
|
registers.registerComponentModel(BgRectModel);
|
|
73903
74603
|
registers.registerComponentView(BgRectView);
|
|
73904
74604
|
}
|
|
@@ -73920,9 +74620,9 @@ PlaybackSelectModel.type = "playbackSelect";
|
|
|
73920
74620
|
PlaybackSelectModel.defaultOption = {
|
|
73921
74621
|
zlevel: 1,
|
|
73922
74622
|
z: 2,
|
|
73923
|
-
show:
|
|
74623
|
+
show: false,
|
|
73924
74624
|
color: "rgb(41,98,255)",
|
|
73925
|
-
bgColor: "rgb(255,255,255
|
|
74625
|
+
bgColor: "rgb(255,255,255)",
|
|
73926
74626
|
startIndex: 10,
|
|
73927
74627
|
icon: "image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAABYlAAAWJQFJUiTwAAAD/UlEQVRYhb1ZjXWbMBCWO0BNJ7A7QRiBDcoIjMAIZANvUHsDugHZAG/ACHiBXN+HOeU4nQQkfb337gUL6fTp/kUcEW3hgohaetKViM4b1zFnYv1ARPU8Zs1dcDBg8Pn9/f1BIZU7AHbBaqJxC8hgwOCGJdZ1TX3f79qAiCpe0DTNJENQbczfDXA6fdd15JyjPM/lBq0xX/Mg14PFIS/G/AV/cxup7/tpIv6+vr7yol/OuTIhoXHOnaaHpvGDbdvyYx6s0GShtjR4vV69BpQWYqbO5nfUtu1iLWTN1BnrPueDACQ32WDqC788n8+LtTA3u6WxbjfAkqVlWbbYCE4vSEa1R3+5XBZrnkbzVBn77QaYeWlVFWwWMfWkonEcg0OVZSkBrubTYCDCrWXmiKmr1IGE/w2RvT4F0B+7KIpgU2XqUacVZmgTWt3qf3sAmvksYuqJoNmVg2wql8FAgr3pLC1KUwOIfo9IFtq7Jvb5NECvxWEYAudnDVl+CkYuBM11fXOzEQyscOFVoBK39DM9trf+fgWgkwnYynEp02+pHP8CoBO9nZlKIlEbK4lJTr5MMDbyYWuBBDgV2XlCXpQ3dzOKRufcwEPDMAQTsixzLy8v/PMNjVAwaQvFkK+w93orpUTy3p4O/Es+6L0+lrQjCfy/+GDN9xOrEUDEatBGFO8CGQxEOJcXH4DTpQxgkcAtsytT93M+je21C2Am8x6bVTegqgmdSM9RIFmbq0CDAeVrA0uDdqx0Etk8MDX3gqxlBTRa+oKBmSt5FwYAq4RxEyColRFuzQfjoBLovJfZXQcDMkrha1bnEqmzHKV+fexQcq2oNGSBtHxuZJNavpYwr+yQJ1o7HEe5ApmnAPoaq6MUm1kawbiMDalB64CQoYErkF0MoHcmqD5mBquDEVTIlkzPE/eRyUIIGumX6qABQH/vYO2pboT0+zWAUuNK0x5kRI4vi7JZmD5DPB4P/5mjLEt3PB75/Q/n3B0PVVUtmgJFnReYf3zZqOuaH//MstzpdHJFUfg59/t9gQUUdDMCkOu6Tr6CfX468Z2GDyFo0bFI8OM48iMQXfiH7IRE9/NBwsTeBtKEukLA5JFmQH7+mPxCXgtUTaaV94Xlg/4Lgg4EODAuPQgY6VdKqMxhPhrkYfEMUJClqxL2FJRZAJ2su2s5THXMo5JzZi1ajcVKqmpiaYa1OLBgmQYS4CjSjPqskAKp0liv5Rye6WpBsNvb4XD4zpGFD44cGIg6RLEIphsCO3DuJ2H8t594u01yEDCIcMgSgfGYA2h5NTBOziayPnx7mgv8ljsuNBkm0yUhwMxGdk04HF8DhRngq3v+FYHNcRjIYrCQA2DxuwqR+wu+HnkxU9Zp7AAAAABJRU5ErkJggg=="
|
|
73928
74628
|
};
|
|
@@ -73942,8 +74642,7 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
73942
74642
|
}
|
|
73943
74643
|
render(playbackSelectModel, ecModel, api2) {
|
|
73944
74644
|
if (!playbackSelectModel.get("show")) {
|
|
73945
|
-
this.
|
|
73946
|
-
this.unmountEvent();
|
|
74645
|
+
this.clear();
|
|
73947
74646
|
return;
|
|
73948
74647
|
}
|
|
73949
74648
|
if (!this.playbackSelectModel) {
|
|
@@ -73955,16 +74654,17 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
73955
74654
|
const rect = grid.coordinateSystem.getRect();
|
|
73956
74655
|
const startIndex = playbackSelectModel.get("startIndex");
|
|
73957
74656
|
if (startIndex === null) {
|
|
73958
|
-
this.
|
|
74657
|
+
this.clear();
|
|
73959
74658
|
return;
|
|
73960
74659
|
}
|
|
74660
|
+
this._rect = rect;
|
|
73961
74661
|
const bgColor = playbackSelectModel.get("bgColor");
|
|
73962
74662
|
const color2 = playbackSelectModel.get("color");
|
|
73963
74663
|
const icon = playbackSelectModel.get("icon");
|
|
73964
74664
|
const yData = playbackSelectModel.get("yData");
|
|
73965
74665
|
const xAxis = ecModel.getComponent("xAxis", 0);
|
|
73966
74666
|
const xAxis2D = xAxis.axis;
|
|
73967
|
-
const x = Math.floor(xAxis2D.toGlobalCoord(xAxis2D.dataToCoord(startIndex)))
|
|
74667
|
+
const x = Math.floor(xAxis2D.toGlobalCoord(xAxis2D.dataToCoord(startIndex))) - 0.5;
|
|
73968
74668
|
const lineStyle = {
|
|
73969
74669
|
lineWidth: 2,
|
|
73970
74670
|
stroke: color2
|
|
@@ -73995,7 +74695,8 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
73995
74695
|
width: rect.width + rect.x - x
|
|
73996
74696
|
};
|
|
73997
74697
|
const rectStyle = {
|
|
73998
|
-
fill: bgColor
|
|
74698
|
+
fill: bgColor,
|
|
74699
|
+
opacity: 0.5
|
|
73999
74700
|
};
|
|
74000
74701
|
if (!this.rectEl) {
|
|
74001
74702
|
const rectEl = new Rect_default({
|
|
@@ -74032,6 +74733,15 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
74032
74733
|
const offsetY = e2.offsetY;
|
|
74033
74734
|
const ecModel = this.ecModel;
|
|
74034
74735
|
const xAxis = ecModel.getComponent("xAxis", 0);
|
|
74736
|
+
if (offsetX > this._rect.x + this._rect.width) {
|
|
74737
|
+
this.api.dispatchAction({
|
|
74738
|
+
type: "playbackSelect",
|
|
74739
|
+
playbackSelect: {
|
|
74740
|
+
startIndex: null
|
|
74741
|
+
}
|
|
74742
|
+
});
|
|
74743
|
+
return;
|
|
74744
|
+
}
|
|
74035
74745
|
const xAxis2D = xAxis.axis;
|
|
74036
74746
|
const index = xAxis2D.coordToData(xAxis2D.toLocalCoord(offsetX));
|
|
74037
74747
|
const list = xAxis2D.scale.getOrdinalMeta().getCategories();
|
|
@@ -74041,7 +74751,8 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
74041
74751
|
playbackSelect: {
|
|
74042
74752
|
startIndex: selectedIndex,
|
|
74043
74753
|
uid: this.playbackSelectModel.uid,
|
|
74044
|
-
yData: offsetY
|
|
74754
|
+
yData: offsetY,
|
|
74755
|
+
time: list[selectedIndex]
|
|
74045
74756
|
}
|
|
74046
74757
|
});
|
|
74047
74758
|
}
|
|
@@ -74073,6 +74784,7 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
74073
74784
|
zr.on("mousemove", this._onMouseMove, this);
|
|
74074
74785
|
zr.on("click", this._onClick, this);
|
|
74075
74786
|
zr.on("globalout", this._globalout, this);
|
|
74787
|
+
this.isMountEvent = true;
|
|
74076
74788
|
}
|
|
74077
74789
|
unmountEvent() {
|
|
74078
74790
|
if (!this.isMountEvent) {
|
|
@@ -74082,15 +74794,23 @@ var PlaybackSelectView2 = class extends Component_default2 {
|
|
|
74082
74794
|
zr.off("mousemove", this._onMouseMove);
|
|
74083
74795
|
zr.off("click", this._onClick);
|
|
74084
74796
|
zr.off("globalout", this._globalout);
|
|
74797
|
+
this.isMountEvent = false;
|
|
74085
74798
|
}
|
|
74086
|
-
|
|
74799
|
+
clear() {
|
|
74800
|
+
this.unmountEvent();
|
|
74087
74801
|
if (this.rectEl) {
|
|
74088
74802
|
this.group.removeAll();
|
|
74089
74803
|
this.lineEl = null;
|
|
74090
74804
|
this.rectEl = null;
|
|
74091
74805
|
this.imgEl = null;
|
|
74092
74806
|
}
|
|
74093
|
-
|
|
74807
|
+
}
|
|
74808
|
+
dispose(ecModel, api2) {
|
|
74809
|
+
this.clear();
|
|
74810
|
+
this.playbackSelectModel = null;
|
|
74811
|
+
this.ecModel = null;
|
|
74812
|
+
this.api = null;
|
|
74813
|
+
this._rect = null;
|
|
74094
74814
|
}
|
|
74095
74815
|
};
|
|
74096
74816
|
var PlaybackSelectView = PlaybackSelectView2;
|
|
@@ -74101,59 +74821,422 @@ var PlaybackOrderModel2 = class extends Component_default {
|
|
|
74101
74821
|
constructor() {
|
|
74102
74822
|
super(...arguments);
|
|
74103
74823
|
this.type = PlaybackOrderModel2.type;
|
|
74824
|
+
this.preventAutoZ = true;
|
|
74104
74825
|
this.layoutMode = {type: "box", ignoreSize: true};
|
|
74105
74826
|
}
|
|
74827
|
+
updateOrder(order) {
|
|
74828
|
+
this.option.order = {
|
|
74829
|
+
...this.option.order,
|
|
74830
|
+
...order
|
|
74831
|
+
};
|
|
74832
|
+
}
|
|
74106
74833
|
};
|
|
74107
74834
|
var PlaybackOrderModel = PlaybackOrderModel2;
|
|
74108
74835
|
PlaybackOrderModel.type = "playbackOrder";
|
|
74109
74836
|
PlaybackOrderModel.defaultOption = {
|
|
74110
74837
|
zlevel: 1,
|
|
74111
74838
|
z: 2,
|
|
74112
|
-
|
|
74113
|
-
price: 20,
|
|
74114
|
-
direction: "long",
|
|
74115
|
-
size: 1e4,
|
|
74116
|
-
precision: 2,
|
|
74117
|
-
profit: "201.01 USD"
|
|
74118
|
-
}
|
|
74839
|
+
seriesName: ""
|
|
74119
74840
|
};
|
|
74120
74841
|
|
|
74121
74842
|
// src/component/playback/PlaybackOrderView.ts
|
|
74122
74843
|
var labelRectWidth = 38;
|
|
74123
74844
|
var orderTpLMargin = 11;
|
|
74845
|
+
var descLMargin = 7;
|
|
74846
|
+
var descRectPadding = 10;
|
|
74847
|
+
var descProfitPadding = 12;
|
|
74848
|
+
var descClosePadding = 10;
|
|
74849
|
+
var maxCircleMargin = 28;
|
|
74850
|
+
var circleR = 4;
|
|
74124
74851
|
var longColor = "rgba(41, 107, 239, 1)";
|
|
74852
|
+
var longBg = "rgba(41, 107, 239, 0.1)";
|
|
74125
74853
|
var shortColor = "rgba(242, 54, 70, 1)";
|
|
74126
|
-
var
|
|
74127
|
-
var
|
|
74854
|
+
var shortBg = "rgba(242, 54, 70, 0.1)";
|
|
74855
|
+
var stopProfit = "rgba(4, 154, 129, 1)";
|
|
74856
|
+
var stopProfitBg = "rgba(4, 154, 129, 0.1)";
|
|
74857
|
+
var stopLoss = "rgba(255, 152, 0, 1)";
|
|
74858
|
+
var stopLossBg = "rgba(255, 152, 0, 0.1)";
|
|
74128
74859
|
var closePIcon = "path://M428.8 192c-12.8-6.4-32 0-38.4 6.4L179.2 409.6c-12.8 12.8-12.8 32 0 44.8 6.4 6.4 12.8 6.4 25.6 6.4s19.2 0 25.6-6.4L384 294.4v505.6c0 19.2 12.8 32 32 32s32-12.8 32-32v-576c0-12.8-6.4-25.6-19.2-32zM838.4 569.6c-12.8-12.8-32-12.8-44.8 0L640 723.2V224c0-19.2-12.8-32-32-32s-32 12.8-32 32v582.4c0 6.4 6.4 12.8 6.4 12.8 6.4 12.8 19.2 12.8 25.6 12.8s19.2 0 25.6-6.4l211.2-211.2c6.4-12.8 6.4-32-6.4-44.8z";
|
|
74129
|
-
var
|
|
74860
|
+
var backIcon = "path://M145.066667 486.4l247.466666-213.333333c17.066667-17.066667 42.666667-17.066667 59.733334-8.533334 8.533333 8.533333 17.066667 17.066667 17.066666 25.6v435.2c0 25.6-17.066667 42.666667-42.666666 42.666667-17.066667 0-25.6 0-34.133334-8.533333L145.066667 537.6c-25.6-17.066667-25.6-34.133333 0-51.2zM571.733333 486.4l247.466667-213.333333c17.066667-17.066667 42.666667-17.066667 59.733333 0 8.533333 8.533333 17.066667 17.066667 17.066667 25.6v435.2c0 17.066667-17.066667 34.133333-42.666667 34.133333-17.066667 0-25.6 0-34.133333-8.533333L571.733333 537.6c-25.6-17.066667-25.6-34.133333 0-51.2z";
|
|
74861
|
+
var closeIcon = "path://M844.8 247.466667l-68.266667-68.266667L512 452.266667 247.466667 179.2l-68.266667 68.266667L452.266667 512 179.2 776.533333l68.266667 68.266667L512 571.733333l264.533333 273.066667 68.266667-68.266667L571.733333 512z";
|
|
74862
|
+
var getTextWidth = (text) => {
|
|
74863
|
+
const font = `14px ${DefaultFamily}`;
|
|
74864
|
+
return getWidth(text, font);
|
|
74865
|
+
};
|
|
74866
|
+
var getProfitColor = (profit, bgColor) => {
|
|
74867
|
+
if (profit > 0) {
|
|
74868
|
+
return "#049A81";
|
|
74869
|
+
} else if (profit < 0) {
|
|
74870
|
+
return "#F23646";
|
|
74871
|
+
}
|
|
74872
|
+
return getIsLightColor(bgColor) ? "rgba(0,0,0,0.5)" : "rgba(255,255,255,0.5)";
|
|
74873
|
+
};
|
|
74874
|
+
var PlaybackOrderView4 = class extends Component_default2 {
|
|
74130
74875
|
constructor() {
|
|
74131
74876
|
super(...arguments);
|
|
74132
|
-
this.type =
|
|
74877
|
+
this.type = PlaybackOrderView4.type;
|
|
74878
|
+
this.mouseSelected = false;
|
|
74879
|
+
this.selected = false;
|
|
74880
|
+
this.dragType = "";
|
|
74881
|
+
this.dragGroupType = "";
|
|
74133
74882
|
}
|
|
74134
74883
|
init(ecModel, api2) {
|
|
74135
74884
|
this.ecModel = ecModel;
|
|
74136
74885
|
this.api = api2;
|
|
74137
74886
|
}
|
|
74138
74887
|
render(playbackOrderModel, ecModel, api2) {
|
|
74139
|
-
|
|
74888
|
+
const order = playbackOrderModel.get("order");
|
|
74889
|
+
if (!order || !order.show) {
|
|
74890
|
+
this.clear();
|
|
74140
74891
|
return;
|
|
74141
74892
|
}
|
|
74142
|
-
if (
|
|
74143
|
-
this.
|
|
74144
|
-
}
|
|
74893
|
+
if (this.lastOrderDirection && this.lastOrderDirection !== order.direction) {
|
|
74894
|
+
this.clear();
|
|
74895
|
+
}
|
|
74896
|
+
if (!this.eventMount) {
|
|
74897
|
+
this.ecModel = ecModel;
|
|
74898
|
+
this.api = api2;
|
|
74899
|
+
this.group.on("mousemove", this.orderMouseover, this);
|
|
74900
|
+
this.group.on("mouseout", this.orderMouseout, this);
|
|
74901
|
+
this.group.on("mousedown", this.orderMousedown, this);
|
|
74902
|
+
this.group.on("click", this.orderClick, this);
|
|
74903
|
+
const zr = api2.getZr();
|
|
74904
|
+
zr.on("mousedown", this.zrMouseDown, this);
|
|
74905
|
+
zr.on("mousemove", this.zrMouseMove, this);
|
|
74906
|
+
zr.on("mouseup", this.zrMouseUp, this);
|
|
74907
|
+
this.eventMount = true;
|
|
74908
|
+
}
|
|
74909
|
+
this.playbackOrderModel = playbackOrderModel;
|
|
74910
|
+
this.lastOrderDirection = order.direction;
|
|
74145
74911
|
this.renderOrder();
|
|
74146
74912
|
}
|
|
74913
|
+
sendMessage(type) {
|
|
74914
|
+
const order = this.playbackOrderModel.get("order");
|
|
74915
|
+
this.api.trigger("playbackorder", {
|
|
74916
|
+
type,
|
|
74917
|
+
order,
|
|
74918
|
+
dragPrice: this.dragPrice
|
|
74919
|
+
});
|
|
74920
|
+
if (this.dragPrice) {
|
|
74921
|
+
this.dragPrice = null;
|
|
74922
|
+
}
|
|
74923
|
+
}
|
|
74924
|
+
zrMouseMove(e2) {
|
|
74925
|
+
if (this.dragType) {
|
|
74926
|
+
this.dragPrice = this.yAxisModel.coordToData(this.yAxisModel.toLocalCoord(e2.offsetY));
|
|
74927
|
+
this.renderOrder();
|
|
74928
|
+
return;
|
|
74929
|
+
}
|
|
74930
|
+
if (this.dragGroupType) {
|
|
74931
|
+
const dragPrice = this.yAxisModel.coordToData(this.yAxisModel.toLocalCoord(e2.offsetY));
|
|
74932
|
+
this.playbackOrderModel.updateOrder({[this.dragGroupType === "profit" ? "stopProfit" : "stopLoss"]: dragPrice});
|
|
74933
|
+
this.dragPrice = dragPrice;
|
|
74934
|
+
this.renderOrder();
|
|
74935
|
+
}
|
|
74936
|
+
}
|
|
74937
|
+
zrMouseUp() {
|
|
74938
|
+
if (this.dragType) {
|
|
74939
|
+
this.dragPrice && this.sendMessage(this.dragType === "TP" ? "addTp" : "addSl");
|
|
74940
|
+
this.dragType = "";
|
|
74941
|
+
const pointer = this.ecModel.getComponent("axisPointer", 0);
|
|
74942
|
+
if (pointer) {
|
|
74943
|
+
pointer.option.updatePointDisable = false;
|
|
74944
|
+
}
|
|
74945
|
+
this.renderOrder();
|
|
74946
|
+
return;
|
|
74947
|
+
}
|
|
74948
|
+
if (this.dragGroupType) {
|
|
74949
|
+
this.dragPrice && this.sendMessage(this.dragGroupType === "profit" ? "dragStopProfit" : "dragStopLoss");
|
|
74950
|
+
this.dragGroupType = "";
|
|
74951
|
+
const pointer = this.ecModel.getComponent("axisPointer", 0);
|
|
74952
|
+
if (pointer) {
|
|
74953
|
+
pointer.option.updatePointDisable = false;
|
|
74954
|
+
}
|
|
74955
|
+
this.renderOrder();
|
|
74956
|
+
}
|
|
74957
|
+
}
|
|
74958
|
+
orderElVisible(type, invisible) {
|
|
74959
|
+
const {orderClosePositionEl, orderTpEl, orderSlEl, orderCircleEl} = this.orderGroupEls;
|
|
74960
|
+
const playbackOrderModel = this.playbackOrderModel;
|
|
74961
|
+
const order = playbackOrderModel.get("order");
|
|
74962
|
+
const color2 = order.direction === "long" ? longColor : shortColor;
|
|
74963
|
+
orderCircleEl.attr({
|
|
74964
|
+
style: {
|
|
74965
|
+
fill: this.selected ? color2 : this.backgroundColor,
|
|
74966
|
+
stroke: color2
|
|
74967
|
+
},
|
|
74968
|
+
shape: {
|
|
74969
|
+
r: this.selected ? circleR - 1 : circleR
|
|
74970
|
+
},
|
|
74971
|
+
invisible
|
|
74972
|
+
});
|
|
74973
|
+
if (this.stopProfitEls) {
|
|
74974
|
+
this.stopProfitEls.stopCircleEl.attr({
|
|
74975
|
+
style: {
|
|
74976
|
+
fill: this.selected ? stopProfit : this.backgroundColor,
|
|
74977
|
+
stroke: stopProfit
|
|
74978
|
+
},
|
|
74979
|
+
shape: {
|
|
74980
|
+
r: this.selected ? circleR - 1 : circleR
|
|
74981
|
+
},
|
|
74982
|
+
invisible
|
|
74983
|
+
});
|
|
74984
|
+
this.stopProfitEls.stopJoinLineEl.ignore = invisible;
|
|
74985
|
+
}
|
|
74986
|
+
if (this.stopLossEls) {
|
|
74987
|
+
this.stopLossEls.stopJoinLineEl.ignore = invisible;
|
|
74988
|
+
this.stopLossEls.stopCircleEl.attr({
|
|
74989
|
+
style: {
|
|
74990
|
+
fill: this.selected ? stopLoss : this.backgroundColor,
|
|
74991
|
+
stroke: stopLoss
|
|
74992
|
+
},
|
|
74993
|
+
shape: {
|
|
74994
|
+
r: this.selected ? circleR - 1 : circleR
|
|
74995
|
+
},
|
|
74996
|
+
invisible
|
|
74997
|
+
});
|
|
74998
|
+
}
|
|
74999
|
+
orderClosePositionEl.children().forEach((item) => {
|
|
75000
|
+
item.attr("invisible", invisible);
|
|
75001
|
+
});
|
|
75002
|
+
orderTpEl.children().forEach((item) => {
|
|
75003
|
+
item.attr("invisible", invisible);
|
|
75004
|
+
});
|
|
75005
|
+
orderSlEl.children().forEach((item) => {
|
|
75006
|
+
item.attr("invisible", invisible);
|
|
75007
|
+
});
|
|
75008
|
+
}
|
|
75009
|
+
orderMouseover(e2) {
|
|
75010
|
+
if (!this.dragType && !this.dragGroupType) {
|
|
75011
|
+
e2.cancelBubble = true;
|
|
75012
|
+
}
|
|
75013
|
+
if (this.mouseSelected) {
|
|
75014
|
+
return;
|
|
75015
|
+
}
|
|
75016
|
+
this.api.dispatchAction({
|
|
75017
|
+
type: "updateAxisPointer",
|
|
75018
|
+
currTrigger: "globalout"
|
|
75019
|
+
});
|
|
75020
|
+
if (!this.orderGroupEls || this.selected) {
|
|
75021
|
+
return;
|
|
75022
|
+
}
|
|
75023
|
+
this.mouseSelected = true;
|
|
75024
|
+
this.orderElVisible("mouseover", false);
|
|
75025
|
+
}
|
|
75026
|
+
orderMouseout(e2) {
|
|
75027
|
+
this.mouseSelected = false;
|
|
75028
|
+
if (!this.orderGroupEls || this.selected) {
|
|
75029
|
+
return;
|
|
75030
|
+
}
|
|
75031
|
+
this.orderElVisible("mouseout", true);
|
|
75032
|
+
}
|
|
75033
|
+
orderClick(e2) {
|
|
75034
|
+
e2.cancelBubble = true;
|
|
75035
|
+
}
|
|
75036
|
+
orderMousedown(e2) {
|
|
75037
|
+
e2.cancelBubble = true;
|
|
75038
|
+
if (this.selected) {
|
|
75039
|
+
return;
|
|
75040
|
+
}
|
|
75041
|
+
this.selected = true;
|
|
75042
|
+
this.orderElVisible("mousedown", false);
|
|
75043
|
+
}
|
|
75044
|
+
zrMouseDown(e2) {
|
|
75045
|
+
if (!this.selected) {
|
|
75046
|
+
return;
|
|
75047
|
+
}
|
|
75048
|
+
this.selected = false;
|
|
75049
|
+
this.orderElVisible("mousedown", true);
|
|
75050
|
+
}
|
|
75051
|
+
createOrderEl() {
|
|
75052
|
+
const playbackOrderModel = this.playbackOrderModel;
|
|
75053
|
+
const order = playbackOrderModel.get("order");
|
|
75054
|
+
const color2 = order.direction === "long" ? longColor : shortColor;
|
|
75055
|
+
const orderBg = order.direction === "long" ? longBg : shortBg;
|
|
75056
|
+
const zlevel = playbackOrderModel.get("zlevel");
|
|
75057
|
+
const orderGroup = this.orderGroup;
|
|
75058
|
+
const orderLineEl = new Line_default({zlevel});
|
|
75059
|
+
const orderClosePositionEl = new Group_default();
|
|
75060
|
+
const closePositionRect = new Rect_default({
|
|
75061
|
+
shape: {
|
|
75062
|
+
y: -9,
|
|
75063
|
+
width: labelRectWidth,
|
|
75064
|
+
height: 18,
|
|
75065
|
+
r: 10
|
|
75066
|
+
},
|
|
75067
|
+
style: {
|
|
75068
|
+
fill: this.backgroundColor,
|
|
75069
|
+
stroke: color2
|
|
75070
|
+
},
|
|
75071
|
+
invisible: true,
|
|
75072
|
+
zlevel
|
|
75073
|
+
});
|
|
75074
|
+
const closePositionIcon = createSymbol(closePIcon, 13, -6, 12, 12, color2);
|
|
75075
|
+
orderClosePositionEl.add(closePositionRect);
|
|
75076
|
+
orderClosePositionEl.add(closePositionIcon);
|
|
75077
|
+
orderClosePositionEl.onmouseover = () => {
|
|
75078
|
+
closePositionRect.attr("style", {fill: blendColors(orderBg, this.backgroundColor)});
|
|
75079
|
+
};
|
|
75080
|
+
orderClosePositionEl.onmouseout = () => {
|
|
75081
|
+
closePositionRect.attr("style", {fill: this.backgroundColor});
|
|
75082
|
+
};
|
|
75083
|
+
orderClosePositionEl.onclick = () => {
|
|
75084
|
+
this.sendMessage("closePosition");
|
|
75085
|
+
};
|
|
75086
|
+
closePositionIcon.invisible = true;
|
|
75087
|
+
closePositionIcon.zlevel = zlevel;
|
|
75088
|
+
const orderTpEl = new Group_default();
|
|
75089
|
+
const orderTpRect = new Rect_default({invisible: true, zlevel});
|
|
75090
|
+
const orderTpText = new Text_default({invisible: true, zlevel});
|
|
75091
|
+
const orderTpBgEl = new Rect_default({silent: true, ignore: true, zlevel});
|
|
75092
|
+
orderTpEl.add(orderTpRect);
|
|
75093
|
+
orderTpEl.add(orderTpText);
|
|
75094
|
+
orderGroup.add(orderTpBgEl);
|
|
75095
|
+
orderTpEl.onmouseover = () => {
|
|
75096
|
+
orderTpBgEl.attr({
|
|
75097
|
+
style: {
|
|
75098
|
+
fill: stopProfitBg
|
|
75099
|
+
},
|
|
75100
|
+
shape: order.direction === "long" ? {
|
|
75101
|
+
x: this.rect.x,
|
|
75102
|
+
y: -this.y,
|
|
75103
|
+
width: this.rect.width,
|
|
75104
|
+
height: this.y
|
|
75105
|
+
} : {
|
|
75106
|
+
x: this.rect.x,
|
|
75107
|
+
y: 0,
|
|
75108
|
+
width: this.rect.width,
|
|
75109
|
+
height: this.rect.height - this.y
|
|
75110
|
+
},
|
|
75111
|
+
ignore: false
|
|
75112
|
+
});
|
|
75113
|
+
orderTpRect.attr("style", {fill: blendColors(stopProfitBg, this.backgroundColor)});
|
|
75114
|
+
};
|
|
75115
|
+
orderTpEl.onmouseout = () => {
|
|
75116
|
+
orderTpRect.attr("style", {fill: this.backgroundColor});
|
|
75117
|
+
orderTpBgEl.attr("ignore", true);
|
|
75118
|
+
};
|
|
75119
|
+
orderTpEl.onmousedown = () => {
|
|
75120
|
+
this.dragType = "TP";
|
|
75121
|
+
const pointer = this.ecModel.getComponent("axisPointer", 0);
|
|
75122
|
+
if (pointer) {
|
|
75123
|
+
pointer.option.updatePointDisable = true;
|
|
75124
|
+
}
|
|
75125
|
+
};
|
|
75126
|
+
const orderSlEl = new Group_default();
|
|
75127
|
+
const orderSlRect = new Rect_default({invisible: true, zlevel});
|
|
75128
|
+
const orderSlText = new Text_default({invisible: true, zlevel});
|
|
75129
|
+
const orderSlBgEl = new Rect_default({silent: true, ignore: true, zlevel});
|
|
75130
|
+
orderSlEl.add(orderSlRect);
|
|
75131
|
+
orderSlEl.add(orderSlText);
|
|
75132
|
+
orderGroup.add(orderSlBgEl);
|
|
75133
|
+
orderSlEl.onmouseover = () => {
|
|
75134
|
+
orderSlBgEl.attr({
|
|
75135
|
+
style: {
|
|
75136
|
+
fill: stopLossBg
|
|
75137
|
+
},
|
|
75138
|
+
shape: order.direction === "short" ? {
|
|
75139
|
+
x: this.rect.x,
|
|
75140
|
+
y: -this.y,
|
|
75141
|
+
width: this.rect.width,
|
|
75142
|
+
height: this.y
|
|
75143
|
+
} : {
|
|
75144
|
+
x: this.rect.x,
|
|
75145
|
+
y: 0,
|
|
75146
|
+
width: this.rect.width,
|
|
75147
|
+
height: this.rect.height - this.y
|
|
75148
|
+
},
|
|
75149
|
+
ignore: false
|
|
75150
|
+
});
|
|
75151
|
+
orderSlRect.attr("style", {fill: blendColors(stopLossBg, this.backgroundColor)});
|
|
75152
|
+
};
|
|
75153
|
+
orderSlEl.onmouseout = () => {
|
|
75154
|
+
orderSlRect.attr("style", {fill: this.backgroundColor});
|
|
75155
|
+
orderSlBgEl.attr("ignore", true);
|
|
75156
|
+
};
|
|
75157
|
+
orderSlEl.onmousedown = () => {
|
|
75158
|
+
this.dragType = "SL";
|
|
75159
|
+
const pointer = this.ecModel.getComponent("axisPointer", 0);
|
|
75160
|
+
if (pointer) {
|
|
75161
|
+
pointer.option.updatePointDisable = true;
|
|
75162
|
+
}
|
|
75163
|
+
};
|
|
75164
|
+
const orderDescEl = new Group_default();
|
|
75165
|
+
const orderDescRect = new Rect_default({zlevel});
|
|
75166
|
+
const orderSizeRect = new Rect_default({zlevel});
|
|
75167
|
+
const orderSizText = new Text_default({zlevel});
|
|
75168
|
+
const orderPlaybackIcon = createSymbol(backIcon, 0, -4, 8, 8, "#ffffff");
|
|
75169
|
+
orderPlaybackIcon.zlevel = zlevel;
|
|
75170
|
+
const orderProfitText = new Text_default({zlevel});
|
|
75171
|
+
const orderCloseRect = new Rect_default({invisible: true, zlevel});
|
|
75172
|
+
const orderCloseLine = new Line_default({zlevel});
|
|
75173
|
+
const orderCloseIcon = createSymbol(closeIcon, 0, -4, 8, 8, color2);
|
|
75174
|
+
;
|
|
75175
|
+
orderCloseIcon.zlevel = zlevel;
|
|
75176
|
+
const orderCircleEl = new Circle_default({invisible: true, zlevel, z: 10});
|
|
75177
|
+
orderDescEl.add(orderDescRect);
|
|
75178
|
+
orderDescEl.add(orderSizeRect);
|
|
75179
|
+
orderDescEl.add(orderSizText);
|
|
75180
|
+
orderDescEl.add(orderPlaybackIcon);
|
|
75181
|
+
orderDescEl.add(orderProfitText);
|
|
75182
|
+
const orderCloseEl = new Group_default();
|
|
75183
|
+
orderCloseEl.add(orderCloseRect);
|
|
75184
|
+
orderCloseEl.add(orderCloseLine);
|
|
75185
|
+
orderCloseEl.add(orderCloseIcon);
|
|
75186
|
+
orderDescEl.add(orderCloseEl);
|
|
75187
|
+
orderCloseEl.onmouseover = () => {
|
|
75188
|
+
orderCloseRect.attr({
|
|
75189
|
+
style: {
|
|
75190
|
+
fill: orderBg
|
|
75191
|
+
},
|
|
75192
|
+
invisible: false
|
|
75193
|
+
});
|
|
75194
|
+
};
|
|
75195
|
+
orderCloseEl.onmouseout = () => {
|
|
75196
|
+
orderCloseRect.attr("invisible", true);
|
|
75197
|
+
};
|
|
75198
|
+
orderCloseEl.onclick = () => {
|
|
75199
|
+
this.sendMessage("delete");
|
|
75200
|
+
};
|
|
75201
|
+
orderGroup.add(orderLineEl);
|
|
75202
|
+
orderGroup.add(orderClosePositionEl);
|
|
75203
|
+
orderGroup.add(orderTpEl);
|
|
75204
|
+
orderGroup.add(orderSlEl);
|
|
75205
|
+
orderGroup.add(orderDescEl);
|
|
75206
|
+
orderGroup.add(orderCircleEl);
|
|
75207
|
+
this.orderGroupEls = {
|
|
75208
|
+
orderLineEl,
|
|
75209
|
+
orderClosePositionEl,
|
|
75210
|
+
orderTpEl,
|
|
75211
|
+
orderSlEl,
|
|
75212
|
+
orderDescEl,
|
|
75213
|
+
orderCircleEl,
|
|
75214
|
+
orderTpBgEl,
|
|
75215
|
+
orderSlBgEl,
|
|
75216
|
+
orderCloseEl
|
|
75217
|
+
};
|
|
75218
|
+
}
|
|
74147
75219
|
renderOrder() {
|
|
74148
75220
|
const ecModel = this.ecModel;
|
|
74149
75221
|
const playbackOrderModel = this.playbackOrderModel;
|
|
75222
|
+
if (!playbackOrderModel) {
|
|
75223
|
+
return;
|
|
75224
|
+
}
|
|
74150
75225
|
const group = this.group;
|
|
74151
75226
|
const grid = ecModel.getComponent("grid", 0);
|
|
74152
75227
|
const order = playbackOrderModel.get("order");
|
|
75228
|
+
const seriesName = playbackOrderModel.get("seriesName");
|
|
74153
75229
|
const rect = grid.coordinateSystem.getRect();
|
|
74154
|
-
const
|
|
74155
|
-
|
|
74156
|
-
|
|
75230
|
+
const seriesModel = ecModel.getSeriesByName(seriesName)[0];
|
|
75231
|
+
if (!seriesModel) {
|
|
75232
|
+
return;
|
|
75233
|
+
}
|
|
75234
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
75235
|
+
if (!coordSys || !coordSys.master) {
|
|
75236
|
+
return;
|
|
75237
|
+
}
|
|
75238
|
+
const yAxisModel = coordSys.getAxis("y");
|
|
75239
|
+
const y = Math.floor(yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(order.price)));
|
|
74157
75240
|
let backgroundColor2 = ecModel.get("backgroundColor") || "#fff";
|
|
74158
75241
|
if (backgroundColor2 && isGradientObject(backgroundColor2) && !backgroundColor2.global && backgroundColor2.type === "linear") {
|
|
74159
75242
|
backgroundColor2 = {
|
|
@@ -74168,59 +75251,28 @@ var PlaybackOrderView2 = class extends Component_default2 {
|
|
|
74168
75251
|
group.add(this.orderGroup);
|
|
74169
75252
|
}
|
|
74170
75253
|
this.orderGroup.y = y;
|
|
75254
|
+
this.y = y;
|
|
74171
75255
|
this.rect = rect;
|
|
75256
|
+
this.yAxisModel = yAxisModel;
|
|
74172
75257
|
this.renderOrderGroup();
|
|
74173
75258
|
}
|
|
74174
75259
|
renderOrderGroup() {
|
|
74175
|
-
const orderGroup = this.orderGroup;
|
|
74176
75260
|
const rect = this.rect;
|
|
74177
75261
|
const playbackOrderModel = this.playbackOrderModel;
|
|
74178
75262
|
const order = playbackOrderModel.get("order");
|
|
74179
75263
|
const color2 = order.direction === "long" ? longColor : shortColor;
|
|
74180
75264
|
if (!this.orderGroupEls) {
|
|
74181
|
-
|
|
74182
|
-
|
|
74183
|
-
|
|
74184
|
-
|
|
74185
|
-
|
|
74186
|
-
|
|
74187
|
-
|
|
74188
|
-
|
|
74189
|
-
|
|
74190
|
-
|
|
74191
|
-
|
|
74192
|
-
stroke: color2
|
|
74193
|
-
}
|
|
74194
|
-
});
|
|
74195
|
-
const closePositionIcon = createSymbol(closePIcon, 13, -6, 12, 12, color2);
|
|
74196
|
-
orderClosePositionEl2.add(closePositionRect);
|
|
74197
|
-
orderClosePositionEl2.add(closePositionIcon);
|
|
74198
|
-
const orderTpEl2 = new Group_default();
|
|
74199
|
-
const orderTpRect = new Rect_default();
|
|
74200
|
-
const orderTpText = new Text_default();
|
|
74201
|
-
orderTpEl2.add(orderTpRect);
|
|
74202
|
-
orderTpEl2.add(orderTpText);
|
|
74203
|
-
const orderSlEl2 = new Group_default();
|
|
74204
|
-
const orderSlRect = new Rect_default();
|
|
74205
|
-
const orderSlText = new Text_default();
|
|
74206
|
-
orderSlEl2.add(orderSlRect);
|
|
74207
|
-
orderSlEl2.add(orderSlText);
|
|
74208
|
-
const orderDescEl = new Group_default();
|
|
74209
|
-
const orderDescRect = new Rect_default();
|
|
74210
|
-
const orderSizeRect = new Rect_default();
|
|
74211
|
-
orderGroup.add(orderLineEl2);
|
|
74212
|
-
orderGroup.add(orderClosePositionEl2);
|
|
74213
|
-
orderGroup.add(orderTpEl2);
|
|
74214
|
-
orderGroup.add(orderSlEl2);
|
|
74215
|
-
this.orderGroupEls = {
|
|
74216
|
-
orderLineEl: orderLineEl2,
|
|
74217
|
-
orderClosePositionEl: orderClosePositionEl2,
|
|
74218
|
-
orderTpEl: orderTpEl2,
|
|
74219
|
-
orderSlEl: orderSlEl2,
|
|
74220
|
-
orderDescEl
|
|
74221
|
-
};
|
|
74222
|
-
}
|
|
74223
|
-
const {orderLineEl, orderClosePositionEl, orderTpEl, orderSlEl} = this.orderGroupEls;
|
|
75265
|
+
this.createOrderEl();
|
|
75266
|
+
}
|
|
75267
|
+
const {
|
|
75268
|
+
orderLineEl,
|
|
75269
|
+
orderClosePositionEl,
|
|
75270
|
+
orderTpEl,
|
|
75271
|
+
orderSlEl,
|
|
75272
|
+
orderDescEl,
|
|
75273
|
+
orderCircleEl,
|
|
75274
|
+
orderCloseEl
|
|
75275
|
+
} = this.orderGroupEls;
|
|
74224
75276
|
orderLineEl.attr({
|
|
74225
75277
|
shape: {
|
|
74226
75278
|
x1: rect.x,
|
|
@@ -74233,9 +75285,6 @@ var PlaybackOrderView2 = class extends Component_default2 {
|
|
|
74233
75285
|
stroke: color2
|
|
74234
75286
|
}
|
|
74235
75287
|
});
|
|
74236
|
-
orderClosePositionEl.attr("x", 300);
|
|
74237
|
-
orderTpEl.attr("x", 300 + labelRectWidth + orderTpLMargin);
|
|
74238
|
-
orderSlEl.attr("x", 300 + labelRectWidth * 2 + orderTpLMargin + 1);
|
|
74239
75288
|
orderTpEl.childAt(0).attr({
|
|
74240
75289
|
shape: {
|
|
74241
75290
|
y: -9,
|
|
@@ -74245,13 +75294,13 @@ var PlaybackOrderView2 = class extends Component_default2 {
|
|
|
74245
75294
|
},
|
|
74246
75295
|
style: {
|
|
74247
75296
|
fill: this.backgroundColor,
|
|
74248
|
-
stroke:
|
|
75297
|
+
stroke: stopProfit
|
|
74249
75298
|
}
|
|
74250
75299
|
});
|
|
74251
75300
|
orderTpEl.childAt(1).attr({
|
|
74252
75301
|
style: {
|
|
74253
75302
|
text: "TP",
|
|
74254
|
-
fill:
|
|
75303
|
+
fill: stopProfit,
|
|
74255
75304
|
fontSize: 14
|
|
74256
75305
|
},
|
|
74257
75306
|
x: 11,
|
|
@@ -74266,37 +75315,665 @@ var PlaybackOrderView2 = class extends Component_default2 {
|
|
|
74266
75315
|
},
|
|
74267
75316
|
style: {
|
|
74268
75317
|
fill: this.backgroundColor,
|
|
74269
|
-
stroke:
|
|
75318
|
+
stroke: stopLoss
|
|
74270
75319
|
}
|
|
74271
75320
|
});
|
|
74272
75321
|
orderSlEl.childAt(1).attr({
|
|
74273
75322
|
style: {
|
|
74274
75323
|
text: "SL",
|
|
74275
|
-
fill:
|
|
75324
|
+
fill: stopLoss,
|
|
74276
75325
|
fontSize: 14
|
|
74277
75326
|
},
|
|
74278
75327
|
x: 11,
|
|
74279
75328
|
y: -6
|
|
74280
75329
|
});
|
|
75330
|
+
const sizeWidth = getTextWidth(order.size + "");
|
|
75331
|
+
const sizeRectWidth = sizeWidth + descRectPadding * 3 + 10;
|
|
75332
|
+
const profitText = `${order.profit.toFixed(order.precision)} ${order.currency}`;
|
|
75333
|
+
const profitWidth = getTextWidth(profitText) + descProfitPadding * 2;
|
|
75334
|
+
const closeWidth = descClosePadding * 2 + 10;
|
|
75335
|
+
const descRectWidth = sizeRectWidth + profitWidth + closeWidth;
|
|
75336
|
+
const leftRectWidth = rect.width / 2;
|
|
75337
|
+
const buttonCount = 1 + (order.stopProfit ? 0 : 1) + (order.stopLoss ? 0 : 1);
|
|
75338
|
+
const buttonWidth = labelRectWidth * buttonCount + orderTpLMargin + 1 + descLMargin;
|
|
75339
|
+
const isOverlay = rect.width < descRectWidth + buttonWidth + circleR;
|
|
75340
|
+
let baseX = rect.width / 2;
|
|
75341
|
+
let circleMargin = Math.min(maxCircleMargin, (leftRectWidth - circleR - descRectWidth / 2) / 2);
|
|
75342
|
+
if (isOverlay) {
|
|
75343
|
+
baseX = rect.width - circleR - descRectWidth / 2;
|
|
75344
|
+
circleMargin = 0;
|
|
75345
|
+
} else if (leftRectWidth < descRectWidth / 2 + buttonWidth) {
|
|
75346
|
+
baseX = buttonWidth + descRectWidth / 2;
|
|
75347
|
+
circleMargin = Math.max(Math.min(maxCircleMargin, (rect.width - baseX - descRectWidth / 2 - circleR) / 2), 0);
|
|
75348
|
+
}
|
|
75349
|
+
const startX = rect.x + baseX - descRectWidth / 2 - buttonWidth;
|
|
75350
|
+
orderClosePositionEl.attr("x", startX);
|
|
75351
|
+
const tpX = startX + labelRectWidth + orderTpLMargin;
|
|
75352
|
+
const circleX = rect.x + baseX + descRectWidth / 2 + circleMargin;
|
|
75353
|
+
this.circleX = circleX;
|
|
75354
|
+
this.circleMargin = circleMargin;
|
|
75355
|
+
orderTpEl.attr("x", tpX);
|
|
75356
|
+
if (this.dragType === "TP" && this.dragPrice) {
|
|
75357
|
+
orderTpEl.ignore = true;
|
|
75358
|
+
this.dragStartX = tpX;
|
|
75359
|
+
this.renderTpDrag();
|
|
75360
|
+
} else {
|
|
75361
|
+
orderTpEl.ignore = false;
|
|
75362
|
+
}
|
|
75363
|
+
if (order.stopProfit !== void 0) {
|
|
75364
|
+
orderTpEl.ignore = true;
|
|
75365
|
+
this.renderStopProfit("profit");
|
|
75366
|
+
} else {
|
|
75367
|
+
this.removeStop("profit");
|
|
75368
|
+
}
|
|
75369
|
+
const slX = order.stopProfit ? startX + labelRectWidth + orderTpLMargin + 1 : startX + labelRectWidth * 2 + orderTpLMargin + 1;
|
|
75370
|
+
orderSlEl.attr("x", slX);
|
|
75371
|
+
if (this.dragType === "SL" && this.dragPrice) {
|
|
75372
|
+
orderSlEl.ignore = true;
|
|
75373
|
+
this.dragStartX = slX;
|
|
75374
|
+
this.renderTpDrag();
|
|
75375
|
+
} else {
|
|
75376
|
+
orderSlEl.ignore = false;
|
|
75377
|
+
}
|
|
75378
|
+
if (!this.dragType) {
|
|
75379
|
+
this.removeTpDrag();
|
|
75380
|
+
}
|
|
75381
|
+
if (order.stopLoss !== void 0) {
|
|
75382
|
+
orderSlEl.ignore = true;
|
|
75383
|
+
this.renderStopProfit("loss");
|
|
75384
|
+
} else {
|
|
75385
|
+
this.removeStop("loss");
|
|
75386
|
+
}
|
|
75387
|
+
orderDescEl.attr("x", startX + labelRectWidth * buttonCount + orderTpLMargin + 1 + descLMargin);
|
|
75388
|
+
orderDescEl.childAt(0).attr({
|
|
75389
|
+
shape: {
|
|
75390
|
+
y: -9,
|
|
75391
|
+
width: descRectWidth,
|
|
75392
|
+
height: 18,
|
|
75393
|
+
r: 10
|
|
75394
|
+
},
|
|
75395
|
+
style: {
|
|
75396
|
+
fill: this.backgroundColor,
|
|
75397
|
+
stroke: color2
|
|
75398
|
+
}
|
|
75399
|
+
});
|
|
75400
|
+
orderDescEl.childAt(1).attr({
|
|
75401
|
+
shape: {
|
|
75402
|
+
y: -9,
|
|
75403
|
+
width: sizeRectWidth,
|
|
75404
|
+
height: 18,
|
|
75405
|
+
r: [10, 0, 0, 10]
|
|
75406
|
+
},
|
|
75407
|
+
style: {
|
|
75408
|
+
fill: color2
|
|
75409
|
+
}
|
|
75410
|
+
});
|
|
75411
|
+
orderDescEl.childAt(2).attr({
|
|
75412
|
+
style: {
|
|
75413
|
+
text: order.size + "",
|
|
75414
|
+
fill: "#ffffff",
|
|
75415
|
+
fontSize: 14
|
|
75416
|
+
},
|
|
75417
|
+
x: descRectPadding,
|
|
75418
|
+
y: -6
|
|
75419
|
+
});
|
|
75420
|
+
orderDescEl.childAt(3).attr("x", sizeWidth + descRectPadding * 2);
|
|
75421
|
+
orderDescEl.childAt(4).attr({
|
|
75422
|
+
style: {
|
|
75423
|
+
text: profitText,
|
|
75424
|
+
fill: getProfitColor(order.profit, this.backgroundColor),
|
|
75425
|
+
fontSize: 14
|
|
75426
|
+
},
|
|
75427
|
+
x: sizeRectWidth + descProfitPadding,
|
|
75428
|
+
y: -6
|
|
75429
|
+
});
|
|
75430
|
+
orderCloseEl.childAt(0).attr({
|
|
75431
|
+
shape: {
|
|
75432
|
+
y: -9,
|
|
75433
|
+
width: closeWidth,
|
|
75434
|
+
height: 18,
|
|
75435
|
+
r: [0, 10, 10, 0]
|
|
75436
|
+
},
|
|
75437
|
+
x: sizeRectWidth + profitWidth
|
|
75438
|
+
});
|
|
75439
|
+
orderCloseEl.childAt(1).attr({
|
|
75440
|
+
style: {
|
|
75441
|
+
stroke: color2
|
|
75442
|
+
},
|
|
75443
|
+
shape: {
|
|
75444
|
+
y1: -9,
|
|
75445
|
+
y2: 9
|
|
75446
|
+
},
|
|
75447
|
+
x: Math.floor(sizeRectWidth + profitWidth) + 0.5
|
|
75448
|
+
});
|
|
75449
|
+
orderCloseEl.childAt(2).attr("x", sizeRectWidth + profitWidth + descClosePadding);
|
|
75450
|
+
orderCircleEl.attr({
|
|
75451
|
+
style: {
|
|
75452
|
+
fill: this.selected ? color2 : this.backgroundColor,
|
|
75453
|
+
stroke: color2
|
|
75454
|
+
},
|
|
75455
|
+
shape: {
|
|
75456
|
+
cx: circleX,
|
|
75457
|
+
r: this.selected ? circleR - 1 : circleR
|
|
75458
|
+
}
|
|
75459
|
+
});
|
|
75460
|
+
this.renderLabels();
|
|
75461
|
+
}
|
|
75462
|
+
renderTpDrag() {
|
|
75463
|
+
const yAxisModel = this.yAxisModel;
|
|
75464
|
+
const tpy = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(this.dragPrice));
|
|
75465
|
+
const rect = this.rect;
|
|
75466
|
+
const playbackOrderModel = this.playbackOrderModel;
|
|
75467
|
+
const zlevel = playbackOrderModel.get("zlevel");
|
|
75468
|
+
const order = playbackOrderModel.get("order");
|
|
75469
|
+
const isLong = order.direction === "long";
|
|
75470
|
+
const color2 = this.dragType === "TP" ? stopProfit : stopLoss;
|
|
75471
|
+
const bgColor = this.dragType === "TP" ? stopProfitBg : stopLossBg;
|
|
75472
|
+
if (!this.dragTpGroupEl) {
|
|
75473
|
+
this.dragTpGroupEl = new Group_default();
|
|
75474
|
+
const lineEl = new Line_default({zlevel});
|
|
75475
|
+
const rectEl = new Rect_default({zlevel});
|
|
75476
|
+
const titleEl = new Text_default({zlevel});
|
|
75477
|
+
const splitEl = new Line_default({zlevel});
|
|
75478
|
+
const profitEl = new Text_default({zlevel});
|
|
75479
|
+
const bgEl = new Rect_default({zlevel});
|
|
75480
|
+
const joinLineEl = new Line_default({zlevel});
|
|
75481
|
+
const circleEl = new Circle_default({zlevel, z: 10});
|
|
75482
|
+
const labelEl = new Text_default({zlevel: 2, z: 101});
|
|
75483
|
+
this.dragTpGroupEl.add(lineEl);
|
|
75484
|
+
this.dragTpGroupEl.add(rectEl);
|
|
75485
|
+
this.dragTpGroupEl.add(titleEl);
|
|
75486
|
+
this.dragTpGroupEl.add(splitEl);
|
|
75487
|
+
this.dragTpGroupEl.add(profitEl);
|
|
75488
|
+
this.dragTpGroupEl.add(bgEl);
|
|
75489
|
+
this.dragTpGroupEl.add(joinLineEl);
|
|
75490
|
+
this.dragTpGroupEl.add(circleEl);
|
|
75491
|
+
this.dragTpGroupEl.add(labelEl);
|
|
75492
|
+
this.group.add(this.dragTpGroupEl);
|
|
75493
|
+
}
|
|
75494
|
+
const dragTpGroupEl = this.dragTpGroupEl;
|
|
75495
|
+
const titleWidth = 32;
|
|
75496
|
+
const tp = `${((isLong ? this.dragPrice - order.price : order.price - this.dragPrice) * order.size).toFixed(order.precision)} ${order.currency}`;
|
|
75497
|
+
const tpWidth = getTextWidth(tp) + descProfitPadding * 2;
|
|
75498
|
+
dragTpGroupEl.childAt(0).attr({
|
|
75499
|
+
shape: {
|
|
75500
|
+
x1: rect.x,
|
|
75501
|
+
y1: tpy,
|
|
75502
|
+
x2: rect.x + rect.width,
|
|
75503
|
+
y2: tpy
|
|
75504
|
+
},
|
|
75505
|
+
style: {
|
|
75506
|
+
lineWidth: 1,
|
|
75507
|
+
stroke: color2,
|
|
75508
|
+
lineDash: [5, 5]
|
|
75509
|
+
}
|
|
75510
|
+
});
|
|
75511
|
+
dragTpGroupEl.childAt(1).attr({
|
|
75512
|
+
shape: {
|
|
75513
|
+
y: tpy - 9,
|
|
75514
|
+
width: tpWidth + titleWidth,
|
|
75515
|
+
height: 18,
|
|
75516
|
+
r: 10,
|
|
75517
|
+
x: this.dragStartX
|
|
75518
|
+
},
|
|
75519
|
+
style: {
|
|
75520
|
+
fill: this.backgroundColor,
|
|
75521
|
+
stroke: color2,
|
|
75522
|
+
lineDash: [5, 5]
|
|
75523
|
+
}
|
|
75524
|
+
});
|
|
75525
|
+
dragTpGroupEl.childAt(2).attr({
|
|
75526
|
+
style: {
|
|
75527
|
+
text: this.dragType,
|
|
75528
|
+
fill: color2,
|
|
75529
|
+
fontSize: 14
|
|
75530
|
+
},
|
|
75531
|
+
x: this.dragStartX + 8,
|
|
75532
|
+
y: tpy - 6
|
|
75533
|
+
});
|
|
75534
|
+
const splitX = Math.floor(this.dragStartX + titleWidth) + 0.5;
|
|
75535
|
+
dragTpGroupEl.childAt(3).attr({
|
|
75536
|
+
shape: {
|
|
75537
|
+
x1: splitX,
|
|
75538
|
+
y1: tpy - 9,
|
|
75539
|
+
x2: splitX,
|
|
75540
|
+
y2: tpy + 9
|
|
75541
|
+
},
|
|
75542
|
+
style: {
|
|
75543
|
+
lineWidth: 1,
|
|
75544
|
+
stroke: color2
|
|
75545
|
+
}
|
|
75546
|
+
});
|
|
75547
|
+
dragTpGroupEl.childAt(4).attr({
|
|
75548
|
+
style: {
|
|
75549
|
+
text: tp,
|
|
75550
|
+
fill: color2,
|
|
75551
|
+
fontSize: 14
|
|
75552
|
+
},
|
|
75553
|
+
x: splitX + descProfitPadding,
|
|
75554
|
+
y: tpy - 6
|
|
75555
|
+
});
|
|
75556
|
+
const startY = Math.min(tpy, this.y);
|
|
75557
|
+
dragTpGroupEl.childAt(5).attr({
|
|
75558
|
+
style: {
|
|
75559
|
+
fill: bgColor
|
|
75560
|
+
},
|
|
75561
|
+
shape: {
|
|
75562
|
+
x: this.rect.x,
|
|
75563
|
+
y: startY,
|
|
75564
|
+
width: this.rect.width,
|
|
75565
|
+
height: Math.abs(tpy - this.y)
|
|
75566
|
+
},
|
|
75567
|
+
silent: true
|
|
75568
|
+
});
|
|
75569
|
+
const orderColor = order.direction === "long" ? longColor : shortColor;
|
|
75570
|
+
dragTpGroupEl.childAt(6).attr({
|
|
75571
|
+
shape: {
|
|
75572
|
+
x1: this.circleX,
|
|
75573
|
+
y1: tpy,
|
|
75574
|
+
x2: this.circleX,
|
|
75575
|
+
y2: this.y
|
|
75576
|
+
},
|
|
75577
|
+
style: {
|
|
75578
|
+
lineWidth: 1,
|
|
75579
|
+
stroke: orderColor
|
|
75580
|
+
}
|
|
75581
|
+
});
|
|
75582
|
+
dragTpGroupEl.childAt(7).attr({
|
|
75583
|
+
style: {
|
|
75584
|
+
fill: orderColor
|
|
75585
|
+
},
|
|
75586
|
+
shape: {
|
|
75587
|
+
cx: this.circleX,
|
|
75588
|
+
cy: tpy,
|
|
75589
|
+
r: circleR
|
|
75590
|
+
}
|
|
75591
|
+
});
|
|
75592
|
+
const offset = this.yAxisModel.model.get("offset") || 0;
|
|
75593
|
+
const x = this.yAxisModel.position === "right" ? rect.x + rect.width + offset : rect.x - offset;
|
|
75594
|
+
dragTpGroupEl.childAt(8).attr({
|
|
75595
|
+
style: {
|
|
75596
|
+
x,
|
|
75597
|
+
y: tpy - 9,
|
|
75598
|
+
text: this.dragPrice.toFixed(order.precision),
|
|
75599
|
+
fill: "#fff",
|
|
75600
|
+
backgroundColor: "rgb(54,58,69)",
|
|
75601
|
+
padding: [4, 6, 2, 8]
|
|
75602
|
+
}
|
|
75603
|
+
});
|
|
75604
|
+
}
|
|
75605
|
+
removeTpDrag() {
|
|
75606
|
+
if (!this.dragTpGroupEl) {
|
|
75607
|
+
return;
|
|
75608
|
+
}
|
|
75609
|
+
this.group.remove(this.dragTpGroupEl);
|
|
75610
|
+
this.dragTpGroupEl = null;
|
|
75611
|
+
}
|
|
75612
|
+
renderStopProfit(type) {
|
|
75613
|
+
const yAxisModel = this.yAxisModel;
|
|
75614
|
+
const playbackOrderModel = this.playbackOrderModel;
|
|
75615
|
+
const isStopProfit = type === "profit";
|
|
75616
|
+
const order = playbackOrderModel.get("order");
|
|
75617
|
+
const stopPrice = isStopProfit ? order.stopProfit : order.stopLoss;
|
|
75618
|
+
const zlevel = playbackOrderModel.get("zlevel");
|
|
75619
|
+
const profitY = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(stopPrice));
|
|
75620
|
+
const rect = this.rect;
|
|
75621
|
+
const circleX = this.circleX;
|
|
75622
|
+
const circleMargin = this.circleMargin;
|
|
75623
|
+
const color2 = isStopProfit ? stopProfit : stopLoss;
|
|
75624
|
+
const bgColor = isStopProfit ? stopProfitBg : stopLossBg;
|
|
75625
|
+
const groupKey = isStopProfit ? "stopProfitGroup" : "stopLossGroup";
|
|
75626
|
+
const elsKey = isStopProfit ? "stopProfitEls" : "stopLossEls";
|
|
75627
|
+
if (!this[groupKey]) {
|
|
75628
|
+
const stopGroup = new Group_default();
|
|
75629
|
+
const stopJoinLineEl2 = new Line_default({ignore: true, zlevel});
|
|
75630
|
+
const stopLineEl2 = new Line_default({zlevel, cursor: "ns-resize"});
|
|
75631
|
+
const stopDescEl2 = new Group_default();
|
|
75632
|
+
const stopDescRect = new Rect_default({zlevel, cursor: "ns-resize"});
|
|
75633
|
+
const stopSizeRect = new Rect_default({zlevel, cursor: "ns-resize"});
|
|
75634
|
+
const stopSizText = new Text_default({zlevel, cursor: "ns-resize"});
|
|
75635
|
+
const stopPlaybackIcon = createSymbol(backIcon, 0, -4, 8, 8, "#ffffff");
|
|
75636
|
+
stopPlaybackIcon.zlevel = zlevel;
|
|
75637
|
+
const stopProfitText = new Text_default({zlevel, cursor: "ns-resize"});
|
|
75638
|
+
const stopCloseRect = new Rect_default({invisible: true, zlevel});
|
|
75639
|
+
const stopCloseLine = new Line_default({zlevel});
|
|
75640
|
+
const stopCloseIcon = createSymbol(closeIcon, 0, -4, 8, 8, color2);
|
|
75641
|
+
;
|
|
75642
|
+
stopCloseIcon.zlevel = zlevel;
|
|
75643
|
+
const dragBgEl2 = new Rect_default({ignore: true, zlevel});
|
|
75644
|
+
const stopCircleEl2 = new Circle_default({invisible: true, zlevel, z: 10});
|
|
75645
|
+
stopDescEl2.add(stopDescRect);
|
|
75646
|
+
stopDescEl2.add(stopSizeRect);
|
|
75647
|
+
stopDescEl2.add(stopSizText);
|
|
75648
|
+
stopDescEl2.add(stopPlaybackIcon);
|
|
75649
|
+
stopDescEl2.add(stopProfitText);
|
|
75650
|
+
const stopCloseEl2 = new Group_default();
|
|
75651
|
+
stopCloseEl2.add(stopCloseRect);
|
|
75652
|
+
stopCloseEl2.add(stopCloseLine);
|
|
75653
|
+
stopCloseEl2.add(stopCloseIcon);
|
|
75654
|
+
stopDescEl2.add(stopCloseEl2);
|
|
75655
|
+
stopCloseEl2.onmouseover = () => {
|
|
75656
|
+
stopCloseRect.attr({
|
|
75657
|
+
style: {
|
|
75658
|
+
fill: bgColor
|
|
75659
|
+
},
|
|
75660
|
+
invisible: false
|
|
75661
|
+
});
|
|
75662
|
+
};
|
|
75663
|
+
stopCloseEl2.onmouseout = () => {
|
|
75664
|
+
stopCloseRect.attr("invisible", true);
|
|
75665
|
+
};
|
|
75666
|
+
stopCloseEl2.onclick = () => {
|
|
75667
|
+
this.sendMessage(isStopProfit ? "deleteStopProfit" : "deleteStopLoss");
|
|
75668
|
+
};
|
|
75669
|
+
stopGroup.add(stopJoinLineEl2);
|
|
75670
|
+
stopGroup.add(stopLineEl2);
|
|
75671
|
+
stopGroup.add(stopDescEl2);
|
|
75672
|
+
stopGroup.add(stopCircleEl2);
|
|
75673
|
+
stopGroup.add(dragBgEl2);
|
|
75674
|
+
stopGroup.onmousedown = () => {
|
|
75675
|
+
this.dragGroupType = type;
|
|
75676
|
+
const pointer = this.ecModel.getComponent("axisPointer", 0);
|
|
75677
|
+
if (pointer) {
|
|
75678
|
+
pointer.option.updatePointDisable = true;
|
|
75679
|
+
}
|
|
75680
|
+
};
|
|
75681
|
+
this[groupKey] = stopGroup;
|
|
75682
|
+
this[elsKey] = {
|
|
75683
|
+
stopDescEl: stopDescEl2,
|
|
75684
|
+
stopCloseEl: stopCloseEl2,
|
|
75685
|
+
stopLineEl: stopLineEl2,
|
|
75686
|
+
stopCircleEl: stopCircleEl2,
|
|
75687
|
+
stopJoinLineEl: stopJoinLineEl2,
|
|
75688
|
+
dragBgEl: dragBgEl2
|
|
75689
|
+
};
|
|
75690
|
+
this.group.add(stopGroup);
|
|
75691
|
+
}
|
|
75692
|
+
const {stopDescEl, stopCloseEl, stopLineEl, stopCircleEl, stopJoinLineEl, dragBgEl} = this[elsKey];
|
|
75693
|
+
const sizeWidth = getTextWidth(order.size + "");
|
|
75694
|
+
const sizeRectWidth = sizeWidth + descRectPadding * 3 + 10;
|
|
75695
|
+
const isLong = order.direction === "long";
|
|
75696
|
+
const profit = `${((isLong ? stopPrice - order.price : order.price - stopPrice) * order.size).toFixed(order.precision)} ${order.currency}`;
|
|
75697
|
+
const profitWidth = getTextWidth(profit) + descProfitPadding * 2;
|
|
75698
|
+
const closeWidth = descClosePadding * 2 + 10;
|
|
75699
|
+
const descRectWidth = sizeRectWidth + profitWidth + closeWidth;
|
|
75700
|
+
stopDescEl.attr({
|
|
75701
|
+
x: circleX - circleMargin - descRectWidth,
|
|
75702
|
+
y: profitY
|
|
75703
|
+
});
|
|
75704
|
+
stopLineEl.attr({
|
|
75705
|
+
shape: {
|
|
75706
|
+
x1: rect.x,
|
|
75707
|
+
y1: profitY,
|
|
75708
|
+
x2: rect.x + rect.width,
|
|
75709
|
+
y2: profitY
|
|
75710
|
+
},
|
|
75711
|
+
style: {
|
|
75712
|
+
lineWidth: 1,
|
|
75713
|
+
stroke: color2
|
|
75714
|
+
}
|
|
75715
|
+
});
|
|
75716
|
+
stopDescEl.childAt(0).attr({
|
|
75717
|
+
shape: {
|
|
75718
|
+
y: -9,
|
|
75719
|
+
width: descRectWidth,
|
|
75720
|
+
height: 18,
|
|
75721
|
+
r: 10
|
|
75722
|
+
},
|
|
75723
|
+
style: {
|
|
75724
|
+
fill: this.backgroundColor,
|
|
75725
|
+
stroke: color2
|
|
75726
|
+
}
|
|
75727
|
+
});
|
|
75728
|
+
stopDescEl.childAt(1).attr({
|
|
75729
|
+
shape: {
|
|
75730
|
+
y: -9,
|
|
75731
|
+
width: sizeRectWidth,
|
|
75732
|
+
height: 18,
|
|
75733
|
+
r: [10, 0, 0, 10]
|
|
75734
|
+
},
|
|
75735
|
+
style: {
|
|
75736
|
+
fill: color2
|
|
75737
|
+
}
|
|
75738
|
+
});
|
|
75739
|
+
stopDescEl.childAt(2).attr({
|
|
75740
|
+
style: {
|
|
75741
|
+
text: order.size + "",
|
|
75742
|
+
fill: "#ffffff",
|
|
75743
|
+
fontSize: 14
|
|
75744
|
+
},
|
|
75745
|
+
x: descRectPadding,
|
|
75746
|
+
y: -6
|
|
75747
|
+
});
|
|
75748
|
+
stopDescEl.childAt(3).attr("x", sizeWidth + descRectPadding * 2);
|
|
75749
|
+
stopDescEl.childAt(4).attr({
|
|
75750
|
+
style: {
|
|
75751
|
+
text: profit,
|
|
75752
|
+
fill: color2,
|
|
75753
|
+
fontSize: 14
|
|
75754
|
+
},
|
|
75755
|
+
x: sizeRectWidth + descProfitPadding,
|
|
75756
|
+
y: -6
|
|
75757
|
+
});
|
|
75758
|
+
stopCloseEl.childAt(0).attr({
|
|
75759
|
+
shape: {
|
|
75760
|
+
y: -9,
|
|
75761
|
+
width: closeWidth,
|
|
75762
|
+
height: 18,
|
|
75763
|
+
r: [0, 10, 10, 0]
|
|
75764
|
+
},
|
|
75765
|
+
x: sizeRectWidth + profitWidth
|
|
75766
|
+
});
|
|
75767
|
+
stopCloseEl.childAt(1).attr({
|
|
75768
|
+
style: {
|
|
75769
|
+
stroke: color2
|
|
75770
|
+
},
|
|
75771
|
+
shape: {
|
|
75772
|
+
y1: -9,
|
|
75773
|
+
y2: 9
|
|
75774
|
+
},
|
|
75775
|
+
x: Math.floor(sizeRectWidth + profitWidth) + 0.5
|
|
75776
|
+
});
|
|
75777
|
+
stopCloseEl.childAt(2).attr("x", sizeRectWidth + profitWidth + descClosePadding);
|
|
75778
|
+
stopCircleEl.attr({
|
|
75779
|
+
style: {
|
|
75780
|
+
fill: this.selected ? color2 : this.backgroundColor,
|
|
75781
|
+
stroke: color2
|
|
75782
|
+
},
|
|
75783
|
+
shape: {
|
|
75784
|
+
cx: circleX,
|
|
75785
|
+
cy: profitY,
|
|
75786
|
+
r: this.selected ? circleR - 1 : circleR
|
|
75787
|
+
},
|
|
75788
|
+
invisible: !(this.selected || this.mouseSelected)
|
|
75789
|
+
});
|
|
75790
|
+
const orderColor = order.direction === "long" ? longColor : shortColor;
|
|
75791
|
+
stopJoinLineEl.attr({
|
|
75792
|
+
shape: {
|
|
75793
|
+
x1: this.circleX,
|
|
75794
|
+
y1: profitY,
|
|
75795
|
+
x2: this.circleX,
|
|
75796
|
+
y2: this.y
|
|
75797
|
+
},
|
|
75798
|
+
style: {
|
|
75799
|
+
lineWidth: 1,
|
|
75800
|
+
stroke: orderColor
|
|
75801
|
+
},
|
|
75802
|
+
ignore: !(this.selected || this.mouseSelected)
|
|
75803
|
+
});
|
|
75804
|
+
if (this.dragGroupType === type) {
|
|
75805
|
+
dragBgEl.attr({
|
|
75806
|
+
ignore: false,
|
|
75807
|
+
silent: true,
|
|
75808
|
+
style: {
|
|
75809
|
+
fill: bgColor
|
|
75810
|
+
},
|
|
75811
|
+
shape: {
|
|
75812
|
+
x: this.rect.x,
|
|
75813
|
+
y: Math.min(profitY, this.y),
|
|
75814
|
+
width: this.rect.width,
|
|
75815
|
+
height: Math.abs(profitY - this.y)
|
|
75816
|
+
}
|
|
75817
|
+
});
|
|
75818
|
+
} else {
|
|
75819
|
+
dragBgEl.ignore = true;
|
|
75820
|
+
}
|
|
75821
|
+
}
|
|
75822
|
+
removeStop(type) {
|
|
75823
|
+
if (type === "profit") {
|
|
75824
|
+
if (!this.stopProfitGroup) {
|
|
75825
|
+
return;
|
|
75826
|
+
}
|
|
75827
|
+
this.group.remove(this.stopProfitGroup);
|
|
75828
|
+
this.stopProfitLabelEl = null;
|
|
75829
|
+
this.stopProfitGroup = null;
|
|
75830
|
+
} else {
|
|
75831
|
+
if (!this.stopLossGroup) {
|
|
75832
|
+
return;
|
|
75833
|
+
}
|
|
75834
|
+
this.group.remove(this.stopLossGroup);
|
|
75835
|
+
this.stopLossLabelEl = null;
|
|
75836
|
+
this.stopLossGroup = null;
|
|
75837
|
+
}
|
|
75838
|
+
}
|
|
75839
|
+
renderLabels() {
|
|
75840
|
+
const rect = this.rect;
|
|
75841
|
+
const playbackOrderModel = this.playbackOrderModel;
|
|
75842
|
+
const order = playbackOrderModel.get("order");
|
|
75843
|
+
const offset = this.yAxisModel.model.get("offset") || 0;
|
|
75844
|
+
const x = this.yAxisModel.position === "right" ? rect.x + rect.width + offset : rect.x - offset;
|
|
75845
|
+
const zlevel = playbackOrderModel.get("zlevel");
|
|
75846
|
+
const group = this.group;
|
|
75847
|
+
if (!this.orderLabelEl) {
|
|
75848
|
+
this.orderLabelEl = new Text_default({zlevel, z: 100});
|
|
75849
|
+
group.add(this.orderLabelEl);
|
|
75850
|
+
}
|
|
75851
|
+
const precision = order.precision;
|
|
75852
|
+
const isLong = order.direction === "long";
|
|
75853
|
+
const orderColor = isLong ? longColor : shortColor;
|
|
75854
|
+
const orderPriceText = order.price.toFixed(precision);
|
|
75855
|
+
const padding = [4, 6, 2, 8];
|
|
75856
|
+
const borderPadding = [3, 5, 1, 7];
|
|
75857
|
+
const orderY = this.y - 9;
|
|
75858
|
+
this.orderLabelEl.attr({
|
|
75859
|
+
style: {
|
|
75860
|
+
x,
|
|
75861
|
+
text: orderPriceText,
|
|
75862
|
+
fill: "#fff",
|
|
75863
|
+
backgroundColor: orderColor,
|
|
75864
|
+
padding
|
|
75865
|
+
},
|
|
75866
|
+
y: orderY,
|
|
75867
|
+
z: 100,
|
|
75868
|
+
zlevel: 2
|
|
75869
|
+
});
|
|
75870
|
+
const textElList = [this.orderLabelEl];
|
|
75871
|
+
if (this.stopProfitGroup) {
|
|
75872
|
+
if (!this.stopProfitLabelEl) {
|
|
75873
|
+
this.stopProfitLabelEl = new Text_default({zlevel, z: 100});
|
|
75874
|
+
group.add(this.stopProfitLabelEl);
|
|
75875
|
+
}
|
|
75876
|
+
const profitY = this.yAxisModel.toGlobalCoord(this.yAxisModel.dataToCoord(order.stopProfit));
|
|
75877
|
+
this.stopProfitLabelEl.attr({
|
|
75878
|
+
style: {
|
|
75879
|
+
x,
|
|
75880
|
+
text: order.stopProfit.toFixed(precision),
|
|
75881
|
+
fill: orderColor,
|
|
75882
|
+
padding: borderPadding,
|
|
75883
|
+
borderColor: orderColor,
|
|
75884
|
+
borderWidth: 1,
|
|
75885
|
+
backgroundColor: this.backgroundColor
|
|
75886
|
+
},
|
|
75887
|
+
y: profitY - 9,
|
|
75888
|
+
z: 100,
|
|
75889
|
+
zlevel: 2
|
|
75890
|
+
});
|
|
75891
|
+
textElList.push(this.stopProfitLabelEl);
|
|
75892
|
+
} else if (this.stopProfitLabelEl) {
|
|
75893
|
+
group.remove(this.stopProfitLabelEl);
|
|
75894
|
+
}
|
|
75895
|
+
if (this.stopLossGroup) {
|
|
75896
|
+
if (!this.stopLossLabelEl) {
|
|
75897
|
+
this.stopLossLabelEl = new Text_default({zlevel, z: 100});
|
|
75898
|
+
group.add(this.stopLossLabelEl);
|
|
75899
|
+
}
|
|
75900
|
+
const stopLossY = this.yAxisModel.toGlobalCoord(this.yAxisModel.dataToCoord(order.stopLoss));
|
|
75901
|
+
this.stopLossLabelEl.attr({
|
|
75902
|
+
style: {
|
|
75903
|
+
x,
|
|
75904
|
+
text: order.stopLoss.toFixed(precision),
|
|
75905
|
+
fill: orderColor,
|
|
75906
|
+
padding: borderPadding,
|
|
75907
|
+
borderColor: orderColor,
|
|
75908
|
+
borderWidth: 1,
|
|
75909
|
+
backgroundColor: this.backgroundColor
|
|
75910
|
+
},
|
|
75911
|
+
y: stopLossY - 9,
|
|
75912
|
+
z: 100,
|
|
75913
|
+
zlevel: 2
|
|
75914
|
+
});
|
|
75915
|
+
textElList.push(this.stopLossLabelEl);
|
|
75916
|
+
} else if (this.stopLossLabelEl) {
|
|
75917
|
+
group.remove(this.stopLossLabelEl);
|
|
75918
|
+
}
|
|
75919
|
+
this.labels = textElList;
|
|
75920
|
+
const markLabelModal = this.ecModel.getComponent("markLabel");
|
|
75921
|
+
if (markLabelModal) {
|
|
75922
|
+
const isAvoidOverlap = markLabelModal.get("isAvoidOverlap");
|
|
75923
|
+
if (!isAvoidOverlap) {
|
|
75924
|
+
return;
|
|
75925
|
+
}
|
|
75926
|
+
const view = this.api.getComponentView(markLabelModal.__viewId);
|
|
75927
|
+
if (!view) {
|
|
75928
|
+
return;
|
|
75929
|
+
}
|
|
75930
|
+
view.avoidOverlap(true, this.ecModel, this.api);
|
|
75931
|
+
}
|
|
74281
75932
|
}
|
|
74282
75933
|
clear() {
|
|
74283
|
-
this.
|
|
75934
|
+
if (!this.orderGroup) {
|
|
75935
|
+
return;
|
|
75936
|
+
}
|
|
75937
|
+
this.orderLabelEl = null;
|
|
75938
|
+
this.stopProfitLabelEl = null;
|
|
75939
|
+
this.stopLossLabelEl = null;
|
|
74284
75940
|
this.orderGroup = null;
|
|
74285
|
-
this.
|
|
74286
|
-
this.
|
|
75941
|
+
this.stopLossGroup = null;
|
|
75942
|
+
this.stopLossEls = null;
|
|
75943
|
+
this.stopProfitGroup = null;
|
|
75944
|
+
this.stopProfitEls = null;
|
|
75945
|
+
this.dragTpGroupEl = null;
|
|
75946
|
+
this.orderGroupEls = null;
|
|
75947
|
+
this.yAxisModel = null;
|
|
75948
|
+
this.playbackOrderModel = null;
|
|
75949
|
+
this.group.off("mouseover", this.orderMouseover);
|
|
75950
|
+
this.group.off("mouseout", this.orderMouseout);
|
|
75951
|
+
this.group.off("mousedown", this.orderMousedown);
|
|
75952
|
+
this.group.off("click", this.orderClick);
|
|
75953
|
+
const zr = this.api.getZr();
|
|
75954
|
+
zr.off("mousedown", this.zrMouseDown);
|
|
75955
|
+
zr.off("mousemove", this.zrMouseMove);
|
|
75956
|
+
zr.off("mouseup", this.zrMouseUp);
|
|
75957
|
+
this.group.removeAll();
|
|
75958
|
+
zr.refresh();
|
|
75959
|
+
this.eventMount = false;
|
|
75960
|
+
this.mouseSelected = false;
|
|
75961
|
+
this.selected = false;
|
|
75962
|
+
this.labels = null;
|
|
74287
75963
|
}
|
|
74288
75964
|
dispose(ecModel, api2) {
|
|
75965
|
+
this.clear();
|
|
74289
75966
|
}
|
|
74290
75967
|
};
|
|
74291
|
-
var
|
|
74292
|
-
|
|
75968
|
+
var PlaybackOrderView3 = PlaybackOrderView4;
|
|
75969
|
+
PlaybackOrderView3.type = "playbackOrder";
|
|
74293
75970
|
|
|
74294
75971
|
// src/component/playback/install.ts
|
|
74295
|
-
function
|
|
75972
|
+
function install59(registers) {
|
|
74296
75973
|
registers.registerComponentModel(PlaybackSelectModel);
|
|
74297
75974
|
registers.registerComponentView(PlaybackSelectView);
|
|
74298
75975
|
registers.registerComponentModel(PlaybackOrderModel);
|
|
74299
|
-
registers.registerComponentView(
|
|
75976
|
+
registers.registerComponentView(PlaybackOrderView3);
|
|
74300
75977
|
registers.registerAction({type: "playbackSelect", event: "playbackSelect"}, function(payload, ecModel) {
|
|
74301
75978
|
ecModel.eachComponent({mainType: "playbackSelect", query: payload}, function(playbackSelectModal) {
|
|
74302
75979
|
playbackSelectModal.setPlaybackSelect(payload.playbackSelect);
|
|
@@ -74360,7 +76037,7 @@ var LogoView2 = class extends Component_default2 {
|
|
|
74360
76037
|
};
|
|
74361
76038
|
var LogoView = LogoView2;
|
|
74362
76039
|
LogoView.type = "logo";
|
|
74363
|
-
function
|
|
76040
|
+
function install60(registers) {
|
|
74364
76041
|
registers.registerComponentModel(LogoModel);
|
|
74365
76042
|
registers.registerComponentView(LogoView);
|
|
74366
76043
|
}
|
|
@@ -75214,7 +76891,7 @@ function has(obj, attr) {
|
|
|
75214
76891
|
}
|
|
75215
76892
|
|
|
75216
76893
|
// src/component/timeline/install.ts
|
|
75217
|
-
function
|
|
76894
|
+
function install61(registers) {
|
|
75218
76895
|
registers.registerComponentModel(SliderTimelineModel_default);
|
|
75219
76896
|
registers.registerComponentView(SliderTimelineView_default);
|
|
75220
76897
|
registers.registerSubTypeDefaulter("timeline", function() {
|
|
@@ -75242,7 +76919,7 @@ function checkMarkerInSeries(seriesOpts, markerType) {
|
|
|
75242
76919
|
function fillLabel(opt) {
|
|
75243
76920
|
defaultEmphasis(opt, "label", ["show"]);
|
|
75244
76921
|
}
|
|
75245
|
-
var
|
|
76922
|
+
var inner18 = makeInner();
|
|
75246
76923
|
var MarkerModel2 = class extends Component_default {
|
|
75247
76924
|
constructor() {
|
|
75248
76925
|
super(...arguments);
|
|
@@ -75273,9 +76950,9 @@ var MarkerModel2 = class extends Component_default {
|
|
|
75273
76950
|
if (!createdBySelf) {
|
|
75274
76951
|
ecModel.eachSeries(function(seriesModel) {
|
|
75275
76952
|
const markerOpt = seriesModel.get(this.mainType, true);
|
|
75276
|
-
let markerModel =
|
|
76953
|
+
let markerModel = inner18(seriesModel)[componentType];
|
|
75277
76954
|
if (!markerOpt || !markerOpt.data) {
|
|
75278
|
-
|
|
76955
|
+
inner18(seriesModel)[componentType] = null;
|
|
75279
76956
|
return;
|
|
75280
76957
|
}
|
|
75281
76958
|
if (!markerModel) {
|
|
@@ -75301,7 +76978,7 @@ var MarkerModel2 = class extends Component_default {
|
|
|
75301
76978
|
} else {
|
|
75302
76979
|
markerModel._mergeOption(markerOpt, ecModel, true);
|
|
75303
76980
|
}
|
|
75304
|
-
|
|
76981
|
+
inner18(seriesModel)[componentType] = markerModel;
|
|
75305
76982
|
}, this);
|
|
75306
76983
|
}
|
|
75307
76984
|
}
|
|
@@ -75326,7 +77003,7 @@ var MarkerModel2 = class extends Component_default {
|
|
|
75326
77003
|
this._data = data;
|
|
75327
77004
|
}
|
|
75328
77005
|
static getMarkerModelFromSeries(seriesModel, componentType) {
|
|
75329
|
-
return
|
|
77006
|
+
return inner18(seriesModel)[componentType];
|
|
75330
77007
|
}
|
|
75331
77008
|
};
|
|
75332
77009
|
var MarkerModel = MarkerModel2;
|
|
@@ -75485,7 +77162,7 @@ function numCalculate(data, valueDataDim, type) {
|
|
|
75485
77162
|
}
|
|
75486
77163
|
|
|
75487
77164
|
// src/component/marker/MarkerView.ts
|
|
75488
|
-
var
|
|
77165
|
+
var inner19 = makeInner();
|
|
75489
77166
|
var MarkerView2 = class extends Component_default2 {
|
|
75490
77167
|
constructor() {
|
|
75491
77168
|
super(...arguments);
|
|
@@ -75497,18 +77174,18 @@ var MarkerView2 = class extends Component_default2 {
|
|
|
75497
77174
|
render(markerModel, ecModel, api2) {
|
|
75498
77175
|
const markerGroupMap = this.markerGroupMap;
|
|
75499
77176
|
markerGroupMap.each(function(item) {
|
|
75500
|
-
|
|
77177
|
+
inner19(item).keep = false;
|
|
75501
77178
|
});
|
|
75502
77179
|
ecModel.eachSeries((seriesModel) => {
|
|
75503
77180
|
const markerModel2 = MarkerModel_default.getMarkerModelFromSeries(seriesModel, this.type);
|
|
75504
77181
|
markerModel2 && this.renderSeries(seriesModel, markerModel2, ecModel, api2);
|
|
75505
77182
|
});
|
|
75506
77183
|
markerGroupMap.each((item) => {
|
|
75507
|
-
!
|
|
77184
|
+
!inner19(item).keep && this.group.remove(item.group);
|
|
75508
77185
|
});
|
|
75509
77186
|
}
|
|
75510
77187
|
markKeep(drawGroup) {
|
|
75511
|
-
|
|
77188
|
+
inner19(drawGroup).keep = true;
|
|
75512
77189
|
}
|
|
75513
77190
|
toggleBlurSeries(seriesModelList, isBlur) {
|
|
75514
77191
|
each(seriesModelList, (seriesModel) => {
|
|
@@ -75655,7 +77332,7 @@ function createData(coordSys, seriesModel, mpModel) {
|
|
|
75655
77332
|
var MarkPointView_default = MarkPointView;
|
|
75656
77333
|
|
|
75657
77334
|
// src/component/marker/installMarkPoint.ts
|
|
75658
|
-
function
|
|
77335
|
+
function install62(registers) {
|
|
75659
77336
|
registers.registerComponentModel(MarkPointModel_default);
|
|
75660
77337
|
registers.registerComponentView(MarkPointView_default);
|
|
75661
77338
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -75707,7 +77384,7 @@ MarkLineModel.defaultOption = {
|
|
|
75707
77384
|
var MarkLineModel_default = MarkLineModel;
|
|
75708
77385
|
|
|
75709
77386
|
// src/component/marker/MarkLineView.ts
|
|
75710
|
-
var
|
|
77387
|
+
var inner20 = makeInner();
|
|
75711
77388
|
var markLineTransform = function(seriesModel, coordSys, mlModel, item) {
|
|
75712
77389
|
const data = seriesModel.getData();
|
|
75713
77390
|
let itemArray;
|
|
@@ -75828,8 +77505,8 @@ var MarkLineView2 = class extends MarkerView_default {
|
|
|
75828
77505
|
const mlModel = MarkerModel_default.getMarkerModelFromSeries(seriesModel, "markLine");
|
|
75829
77506
|
if (mlModel) {
|
|
75830
77507
|
const mlData = mlModel.getData();
|
|
75831
|
-
const fromData =
|
|
75832
|
-
const toData =
|
|
77508
|
+
const fromData = inner20(mlModel).from;
|
|
77509
|
+
const toData = inner20(mlModel).to;
|
|
75833
77510
|
fromData.each(function(idx) {
|
|
75834
77511
|
updateSingleMarkerEndLayout(fromData, idx, true, seriesModel, api2);
|
|
75835
77512
|
updateSingleMarkerEndLayout(toData, idx, false, seriesModel, api2);
|
|
@@ -75855,8 +77532,8 @@ var MarkLineView2 = class extends MarkerView_default {
|
|
|
75855
77532
|
const fromData = mlData.from;
|
|
75856
77533
|
const toData = mlData.to;
|
|
75857
77534
|
const lineData = mlData.line;
|
|
75858
|
-
|
|
75859
|
-
|
|
77535
|
+
inner20(mlModel).from = fromData;
|
|
77536
|
+
inner20(mlModel).to = toData;
|
|
75860
77537
|
mlModel.setData(lineData);
|
|
75861
77538
|
let symbolType = mlModel.get("symbol");
|
|
75862
77539
|
let symbolSize = mlModel.get("symbolSize");
|
|
@@ -75973,7 +77650,7 @@ function createList2(coordSys, seriesModel, mlModel) {
|
|
|
75973
77650
|
var MarkLineView_default = MarkLineView;
|
|
75974
77651
|
|
|
75975
77652
|
// src/component/marker/installMarkLine.ts
|
|
75976
|
-
function
|
|
77653
|
+
function install63(registers) {
|
|
75977
77654
|
registers.registerComponentModel(MarkLineModel_default);
|
|
75978
77655
|
registers.registerComponentView(MarkLineView_default);
|
|
75979
77656
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -76018,7 +77695,7 @@ MarkAreaModel.defaultOption = {
|
|
|
76018
77695
|
var MarkAreaModel_default = MarkAreaModel;
|
|
76019
77696
|
|
|
76020
77697
|
// src/component/marker/MarkAreaView.ts
|
|
76021
|
-
var
|
|
77698
|
+
var inner21 = makeInner();
|
|
76022
77699
|
var markAreaTransform = function(seriesModel, coordSys, maModel, item) {
|
|
76023
77700
|
const item0 = item[0];
|
|
76024
77701
|
const item1 = item[1];
|
|
@@ -76188,7 +77865,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
76188
77865
|
}
|
|
76189
77866
|
areaData.setItemVisual(idx, "style", style);
|
|
76190
77867
|
});
|
|
76191
|
-
areaData.diff(
|
|
77868
|
+
areaData.diff(inner21(polygonGroup).data).add(function(idx) {
|
|
76192
77869
|
const layout18 = areaData.getItemLayout(idx);
|
|
76193
77870
|
if (!layout18.allClipped) {
|
|
76194
77871
|
const polygon = new Polygon_default({
|
|
@@ -76200,7 +77877,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
76200
77877
|
polygonGroup.group.add(polygon);
|
|
76201
77878
|
}
|
|
76202
77879
|
}).update(function(newIdx, oldIdx) {
|
|
76203
|
-
let polygon =
|
|
77880
|
+
let polygon = inner21(polygonGroup).data.getItemGraphicEl(oldIdx);
|
|
76204
77881
|
const layout18 = areaData.getItemLayout(newIdx);
|
|
76205
77882
|
if (!layout18.allClipped) {
|
|
76206
77883
|
if (polygon) {
|
|
@@ -76222,7 +77899,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
76222
77899
|
polygonGroup.group.remove(polygon);
|
|
76223
77900
|
}
|
|
76224
77901
|
}).remove(function(idx) {
|
|
76225
|
-
const polygon =
|
|
77902
|
+
const polygon = inner21(polygonGroup).data.getItemGraphicEl(idx);
|
|
76226
77903
|
polygonGroup.group.remove(polygon);
|
|
76227
77904
|
}).execute();
|
|
76228
77905
|
areaData.eachItemGraphicEl(function(polygon, idx) {
|
|
@@ -76239,7 +77916,7 @@ var MarkAreaView2 = class extends MarkerView_default {
|
|
|
76239
77916
|
toggleHoverEmphasis(polygon, null, null, itemModel.get(["emphasis", "disabled"]));
|
|
76240
77917
|
getECData(polygon).dataModel = maModel;
|
|
76241
77918
|
});
|
|
76242
|
-
|
|
77919
|
+
inner21(polygonGroup).data = areaData;
|
|
76243
77920
|
polygonGroup.group.silent = maModel.get("silent") || seriesModel.get("silent");
|
|
76244
77921
|
}
|
|
76245
77922
|
};
|
|
@@ -76287,7 +77964,7 @@ function createList3(coordSys, seriesModel, maModel) {
|
|
|
76287
77964
|
var MarkAreaView_default = MarkAreaView;
|
|
76288
77965
|
|
|
76289
77966
|
// src/component/marker/installMarkArea.ts
|
|
76290
|
-
function
|
|
77967
|
+
function install64(registers) {
|
|
76291
77968
|
registers.registerComponentModel(MarkAreaModel_default);
|
|
76292
77969
|
registers.registerComponentView(MarkAreaView_default);
|
|
76293
77970
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -76476,7 +78153,7 @@ var markerTypeCalculator2 = {
|
|
|
76476
78153
|
return markerTypeCalculator2.last(item, seriesModel, backgroundColor2);
|
|
76477
78154
|
}
|
|
76478
78155
|
};
|
|
76479
|
-
var
|
|
78156
|
+
var inner22 = makeInner();
|
|
76480
78157
|
var MarkLabelView2 = class extends Component_default2 {
|
|
76481
78158
|
constructor() {
|
|
76482
78159
|
super(...arguments);
|
|
@@ -76500,7 +78177,7 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76500
78177
|
if (isUpdateGraphic) {
|
|
76501
78178
|
this.graphicLabelsResize(ecModel);
|
|
76502
78179
|
}
|
|
76503
|
-
this.avoidOverlap(isAvoidOverlap);
|
|
78180
|
+
this.avoidOverlap(isAvoidOverlap, ecModel, api2);
|
|
76504
78181
|
}
|
|
76505
78182
|
updateMarkLabels(markerModel, ecModel, api2) {
|
|
76506
78183
|
const markerGroupMapBySeries = this.markerGroupMapBySeries;
|
|
@@ -76595,8 +78272,8 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76595
78272
|
this._labelCountDown(item, countDownTextEl, key);
|
|
76596
78273
|
}
|
|
76597
78274
|
}
|
|
76598
|
-
|
|
76599
|
-
|
|
78275
|
+
inner22(el).yAxisIndex = yAxisModel.index;
|
|
78276
|
+
inner22(el).isSort = item.showName || showCountDown;
|
|
76600
78277
|
});
|
|
76601
78278
|
markerGroupMapBySeries.set(seriesName, markerGroupMap);
|
|
76602
78279
|
});
|
|
@@ -76696,11 +78373,11 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76696
78373
|
el = createText({gridRect, position: position2, option, ecModel, y, offset, fontSize});
|
|
76697
78374
|
graphLabelGroup.add(el);
|
|
76698
78375
|
graphicLabelElMap.set(option.id, el);
|
|
76699
|
-
|
|
78376
|
+
inner22(el).yAxisIndex = yAxisModel.index;
|
|
76700
78377
|
}
|
|
76701
|
-
|
|
76702
|
-
|
|
76703
|
-
|
|
78378
|
+
inner22(el).originalValue = option.y;
|
|
78379
|
+
inner22(el).isSort = true;
|
|
78380
|
+
inner22(el).style = style;
|
|
76704
78381
|
});
|
|
76705
78382
|
});
|
|
76706
78383
|
});
|
|
@@ -76709,16 +78386,16 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76709
78386
|
const graphicLabelElMap = this._graphicLabelElMap;
|
|
76710
78387
|
const yAxisModels = ecModel.queryComponents({mainType: "yAxis"});
|
|
76711
78388
|
graphicLabelElMap.each((el) => {
|
|
76712
|
-
const yAxisModel = yAxisModels[
|
|
78389
|
+
const yAxisModel = yAxisModels[inner22(el).yAxisIndex].axis;
|
|
76713
78390
|
if (!yAxisModel) {
|
|
76714
78391
|
return;
|
|
76715
78392
|
}
|
|
76716
78393
|
const gridRect = yAxisModel.grid.getRect();
|
|
76717
78394
|
const position2 = yAxisModel.position;
|
|
76718
|
-
const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(
|
|
78395
|
+
const y = yAxisModel.toGlobalCoord(yAxisModel.dataToCoord(inner22(el).originalValue));
|
|
76719
78396
|
const offset = yAxisModel.model.get("offset") || 0;
|
|
76720
78397
|
const formatter = yAxisModel.model.get(["axisLabel", "formatter"]);
|
|
76721
|
-
let style =
|
|
78398
|
+
let style = inner22(el).style;
|
|
76722
78399
|
if (yAxisModel.scale.type === "percentage") {
|
|
76723
78400
|
const formatLabel2 = yAxisModel.scale.getLabel({value: +style.text});
|
|
76724
78401
|
style = Object.assign({}, style, {text: formatLabel2});
|
|
@@ -76756,13 +78433,13 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76756
78433
|
}, 1e3);
|
|
76757
78434
|
timerMap.set(key, timer);
|
|
76758
78435
|
}
|
|
76759
|
-
avoidOverlap(isAvoidOverlap) {
|
|
78436
|
+
avoidOverlap(isAvoidOverlap, ecModel, api2) {
|
|
76760
78437
|
const labelsByYAxisId = {};
|
|
76761
78438
|
const markerGroupMapBySeries = this.markerGroupMapBySeries;
|
|
76762
78439
|
markerGroupMapBySeries.each((markerGroupMap) => {
|
|
76763
78440
|
markerGroupMap.each((item) => {
|
|
76764
|
-
const yAxisId =
|
|
76765
|
-
const isSort =
|
|
78441
|
+
const yAxisId = inner22(item).yAxisIndex;
|
|
78442
|
+
const isSort = inner22(item).isSort;
|
|
76766
78443
|
if (item.ignore || !isSort) {
|
|
76767
78444
|
return;
|
|
76768
78445
|
}
|
|
@@ -76772,8 +78449,8 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76772
78449
|
});
|
|
76773
78450
|
});
|
|
76774
78451
|
this._graphicLabelElMap.each((item) => {
|
|
76775
|
-
const yAxisId =
|
|
76776
|
-
const isSort =
|
|
78452
|
+
const yAxisId = inner22(item).yAxisIndex;
|
|
78453
|
+
const isSort = inner22(item).isSort;
|
|
76777
78454
|
if (item.ignore || !isSort) {
|
|
76778
78455
|
return;
|
|
76779
78456
|
}
|
|
@@ -76781,6 +78458,19 @@ var MarkLabelView2 = class extends Component_default2 {
|
|
|
76781
78458
|
labels.push(item);
|
|
76782
78459
|
labelsByYAxisId[yAxisId] = labels;
|
|
76783
78460
|
});
|
|
78461
|
+
const playbackModel = ecModel.getComponent("playbackOrder");
|
|
78462
|
+
if (playbackModel) {
|
|
78463
|
+
const view = api2.getComponentView(playbackModel.__viewId);
|
|
78464
|
+
if (view && view.labels) {
|
|
78465
|
+
const yAxisId = view.yAxisModel.index;
|
|
78466
|
+
const labels = labelsByYAxisId[yAxisId] || [];
|
|
78467
|
+
each(view.labels, (item) => {
|
|
78468
|
+
inner22(item).y = item.y + 9;
|
|
78469
|
+
labels.push(item);
|
|
78470
|
+
});
|
|
78471
|
+
labelsByYAxisId[yAxisId] = labels;
|
|
78472
|
+
}
|
|
78473
|
+
}
|
|
76784
78474
|
each(labelsByYAxisId, (labels) => {
|
|
76785
78475
|
labelAvoidOverlap(labels, isAvoidOverlap);
|
|
76786
78476
|
});
|
|
@@ -76794,8 +78484,8 @@ function textYChange(label, y, height) {
|
|
|
76794
78484
|
} else {
|
|
76795
78485
|
each(label.children(), (item) => {
|
|
76796
78486
|
if (item.type === "text") {
|
|
76797
|
-
if (
|
|
76798
|
-
item.attr("style", {y: y +
|
|
78487
|
+
if (inner22(item).labelType === "countDown") {
|
|
78488
|
+
item.attr("style", {y: y + inner22(item).parentHeight});
|
|
76799
78489
|
return;
|
|
76800
78490
|
}
|
|
76801
78491
|
item.attr("style", {y});
|
|
@@ -76807,20 +78497,20 @@ function labelAvoidOverlap(labels, isAvoidOverlap, marginTop = 0) {
|
|
|
76807
78497
|
if (labels.length === 0) {
|
|
76808
78498
|
return;
|
|
76809
78499
|
}
|
|
76810
|
-
labels.sort((a, b) =>
|
|
78500
|
+
labels.sort((a, b) => inner22(a).y - inner22(b).y);
|
|
76811
78501
|
const height = labels[0].isGroup ? labels[0].children().find((item) => item.type === "text").getBoundingRect().height : labels[0].getBoundingRect().height;
|
|
76812
78502
|
const sortYbyId = {};
|
|
76813
78503
|
const offestY = height / 2;
|
|
76814
78504
|
for (let i = 0; i < labels.length; i++) {
|
|
76815
78505
|
const currentLabel = labels[i];
|
|
76816
|
-
let currentLabelY =
|
|
78506
|
+
let currentLabelY = inner22(currentLabel).y;
|
|
76817
78507
|
if (i === 0 || !isAvoidOverlap) {
|
|
76818
78508
|
textYChange(currentLabel, currentLabelY - offestY, height);
|
|
76819
78509
|
continue;
|
|
76820
78510
|
}
|
|
76821
78511
|
const prevLabel = labels[i - 1];
|
|
76822
|
-
const prevLabelY = sortYbyId[prevLabel.id] ??
|
|
76823
|
-
const prevHeight =
|
|
78512
|
+
const prevLabelY = sortYbyId[prevLabel.id] ?? inner22(prevLabel).y;
|
|
78513
|
+
const prevHeight = inner22(prevLabel).showCountDown ? height * 2 + marginTop - 1 : height + marginTop;
|
|
76824
78514
|
if (prevLabelY > currentLabelY || Math.abs(currentLabelY - prevLabelY) < prevHeight) {
|
|
76825
78515
|
currentLabelY = prevLabelY + prevHeight;
|
|
76826
78516
|
}
|
|
@@ -76847,7 +78537,7 @@ function createText({option, gridRect, position: position2, ecModel, y, offset,
|
|
|
76847
78537
|
z: 101,
|
|
76848
78538
|
zlevel
|
|
76849
78539
|
});
|
|
76850
|
-
|
|
78540
|
+
inner22(textEl).y = y;
|
|
76851
78541
|
return textEl;
|
|
76852
78542
|
}
|
|
76853
78543
|
function updateText({option, gridRect, position: position2, ecModel, el, y, offset, fontSize}) {
|
|
@@ -76858,7 +78548,7 @@ function updateText({option, gridRect, position: position2, ecModel, el, y, offs
|
|
|
76858
78548
|
el.x = x;
|
|
76859
78549
|
el.y = y;
|
|
76860
78550
|
el.attr("style", fontSize ? Object.assign(style, {fontSize, padding: getPaddingByStyle(fontSize, style.borderWidth)}) : style);
|
|
76861
|
-
|
|
78551
|
+
inner22(el).y = y;
|
|
76862
78552
|
}
|
|
76863
78553
|
function createLabel({x, y, labelData, markerModel, gridRect, position: position2, labelTextStyle = {}, fontSize}) {
|
|
76864
78554
|
const {zlevel} = markerModel.option;
|
|
@@ -76910,10 +78600,10 @@ function createLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
76910
78600
|
z: 100,
|
|
76911
78601
|
ignore: !showLine
|
|
76912
78602
|
});
|
|
76913
|
-
|
|
76914
|
-
|
|
76915
|
-
|
|
76916
|
-
|
|
78603
|
+
inner22(lineEl).labelType = "line";
|
|
78604
|
+
inner22(textNameEl).labelType = "nameLabel";
|
|
78605
|
+
inner22(textEl).labelType = "textLabel";
|
|
78606
|
+
inner22(group).y = labelY;
|
|
76917
78607
|
group.add(lineEl);
|
|
76918
78608
|
group.add(textEl);
|
|
76919
78609
|
group.add(textNameEl);
|
|
@@ -76932,9 +78622,9 @@ function createLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
76932
78622
|
zlevel,
|
|
76933
78623
|
ignore: !show
|
|
76934
78624
|
});
|
|
76935
|
-
|
|
76936
|
-
|
|
76937
|
-
|
|
78625
|
+
inner22(group).showCountDown = show;
|
|
78626
|
+
inner22(countDownEl).labelType = "countDown";
|
|
78627
|
+
inner22(countDownEl).parentHeight = offsetY;
|
|
76938
78628
|
group.add(countDownEl);
|
|
76939
78629
|
}
|
|
76940
78630
|
return group;
|
|
@@ -76956,9 +78646,9 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
76956
78646
|
const textElWidth = textRect.width + paddings[1] + paddings[3];
|
|
76957
78647
|
const textElx = isLeft ? x - textElWidth - borderWidth - 1 : x + borderWidth;
|
|
76958
78648
|
const labelY = y;
|
|
76959
|
-
|
|
78649
|
+
inner22(el).y = labelY;
|
|
76960
78650
|
each(el.children(), (element) => {
|
|
76961
|
-
const labelType =
|
|
78651
|
+
const labelType = inner22(element).labelType;
|
|
76962
78652
|
switch (labelType) {
|
|
76963
78653
|
case "line":
|
|
76964
78654
|
if (!showLine) {
|
|
@@ -77002,15 +78692,15 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
77002
78692
|
element.ignore = false;
|
|
77003
78693
|
break;
|
|
77004
78694
|
case "countDown":
|
|
77005
|
-
if (!countDown.show ||
|
|
78695
|
+
if (!countDown.show || countDown.value <= 0) {
|
|
77006
78696
|
element.ignore = true;
|
|
77007
|
-
|
|
77008
|
-
|
|
78697
|
+
inner22(el).showCountDown = false;
|
|
78698
|
+
inner22(element).parentHeight = 0;
|
|
77009
78699
|
return;
|
|
77010
78700
|
}
|
|
77011
78701
|
const offsetY = showName ? textRect.height + paddings[0] + paddings[2] - 1 : 0;
|
|
77012
|
-
|
|
77013
|
-
|
|
78702
|
+
inner22(el).showCountDown = true;
|
|
78703
|
+
inner22(element).parentHeight = offsetY;
|
|
77014
78704
|
const fill = textStyle.fill === "#ffffff" ? "rgba(255,255,255,0.8)" : "rgba(0,0,0,0.8)";
|
|
77015
78705
|
element.attr("style", Object.assign({
|
|
77016
78706
|
text: countDownText,
|
|
@@ -77026,7 +78716,7 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
77026
78716
|
var MarkLabelView_default = MarkLabelView;
|
|
77027
78717
|
|
|
77028
78718
|
// src/component/marker/installMarkLabel.ts
|
|
77029
|
-
function
|
|
78719
|
+
function install65(registers) {
|
|
77030
78720
|
registers.registerComponentModel(MarkLabelModal_default);
|
|
77031
78721
|
registers.registerComponentView(MarkLabelView_default);
|
|
77032
78722
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -77092,7 +78782,7 @@ var LimitTipView2 = class extends Component_default2 {
|
|
|
77092
78782
|
};
|
|
77093
78783
|
var LimitTipView = LimitTipView2;
|
|
77094
78784
|
LimitTipView.type = "limitTip";
|
|
77095
|
-
function
|
|
78785
|
+
function install66(registers) {
|
|
77096
78786
|
registers.registerComponentModel(LimitTipModel);
|
|
77097
78787
|
registers.registerComponentView(LimitTipView);
|
|
77098
78788
|
}
|
|
@@ -77330,7 +79020,7 @@ var LegendModel_default = LegendModel;
|
|
|
77330
79020
|
|
|
77331
79021
|
// src/component/legend/LegendView.ts
|
|
77332
79022
|
var curry2 = curry;
|
|
77333
|
-
var
|
|
79023
|
+
var each19 = each;
|
|
77334
79024
|
var Group3 = Group_default;
|
|
77335
79025
|
var LegendView2 = class extends Component_default2 {
|
|
77336
79026
|
constructor() {
|
|
@@ -77394,7 +79084,7 @@ var LegendView2 = class extends Component_default2 {
|
|
|
77394
79084
|
ecModel.eachRawSeries(function(seriesModel) {
|
|
77395
79085
|
!seriesModel.get("legendHoverLink") && excludeSeriesId.push(seriesModel.id);
|
|
77396
79086
|
});
|
|
77397
|
-
|
|
79087
|
+
each19(legendModel.getData(), function(legendItemModel, dataIndex) {
|
|
77398
79088
|
const name = legendItemModel.get("name");
|
|
77399
79089
|
if (!this.newlineDisabled && (name === "" || name === "\n")) {
|
|
77400
79090
|
const g = new Group3();
|
|
@@ -77466,7 +79156,7 @@ var LegendView2 = class extends Component_default2 {
|
|
|
77466
79156
|
}
|
|
77467
79157
|
_createSelector(selector2, legendModel, api2, orient, selectorPosition) {
|
|
77468
79158
|
const selectorGroup = this.getSelectorGroup();
|
|
77469
|
-
|
|
79159
|
+
each19(selector2, function createSelectorButton(selectorItem) {
|
|
77470
79160
|
const type = selectorItem.type;
|
|
77471
79161
|
const labelText = new Text_default({
|
|
77472
79162
|
style: {
|
|
@@ -77619,7 +79309,7 @@ function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualSt
|
|
|
77619
79309
|
if (style.lineWidth === "auto") {
|
|
77620
79310
|
style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;
|
|
77621
79311
|
}
|
|
77622
|
-
|
|
79312
|
+
each19(style, (propVal, propName) => {
|
|
77623
79313
|
style[propName] === "inherit" && (style[propName] = visualStyle[propName]);
|
|
77624
79314
|
});
|
|
77625
79315
|
}
|
|
@@ -77769,7 +79459,7 @@ function installLegendAction(registers) {
|
|
|
77769
79459
|
}
|
|
77770
79460
|
|
|
77771
79461
|
// src/component/legend/installLegendPlain.ts
|
|
77772
|
-
function
|
|
79462
|
+
function install67(registers) {
|
|
77773
79463
|
registers.registerComponentModel(LegendModel_default);
|
|
77774
79464
|
registers.registerComponentView(LegendView_default);
|
|
77775
79465
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);
|
|
@@ -78099,17 +79789,17 @@ function installScrollableLegendAction(registers) {
|
|
|
78099
79789
|
}
|
|
78100
79790
|
|
|
78101
79791
|
// src/component/legend/installLegendScroll.ts
|
|
78102
|
-
function
|
|
78103
|
-
use(
|
|
79792
|
+
function install68(registers) {
|
|
79793
|
+
use(install67);
|
|
78104
79794
|
registers.registerComponentModel(ScrollableLegendModel_default);
|
|
78105
79795
|
registers.registerComponentView(ScrollableLegendView_default);
|
|
78106
79796
|
installScrollableLegendAction(registers);
|
|
78107
79797
|
}
|
|
78108
79798
|
|
|
78109
79799
|
// src/component/legend/install.ts
|
|
78110
|
-
function
|
|
78111
|
-
use(install66);
|
|
79800
|
+
function install69(registers) {
|
|
78112
79801
|
use(install67);
|
|
79802
|
+
use(install68);
|
|
78113
79803
|
}
|
|
78114
79804
|
|
|
78115
79805
|
// src/component/dataZoom/InsideZoomModel.ts
|
|
@@ -78249,9 +79939,9 @@ var KineticAnimation = class {
|
|
|
78249
79939
|
};
|
|
78250
79940
|
|
|
78251
79941
|
// src/component/dataZoom/roams.ts
|
|
78252
|
-
var
|
|
79942
|
+
var inner23 = makeInner();
|
|
78253
79943
|
function setViewInfoToCoordSysRecord(api2, dataZoomModel, getRange) {
|
|
78254
|
-
|
|
79944
|
+
inner23(api2).coordSysRecordMap.each(function(coordSysRecord) {
|
|
78255
79945
|
const dzInfo = coordSysRecord.dataZoomInfoMap.get(dataZoomModel.uid);
|
|
78256
79946
|
if (dzInfo) {
|
|
78257
79947
|
dzInfo.getRange = getRange;
|
|
@@ -78259,7 +79949,7 @@ function setViewInfoToCoordSysRecord(api2, dataZoomModel, getRange) {
|
|
|
78259
79949
|
});
|
|
78260
79950
|
}
|
|
78261
79951
|
function disposeCoordSysRecordIfNeeded(api2, dataZoomModel) {
|
|
78262
|
-
const coordSysRecordMap =
|
|
79952
|
+
const coordSysRecordMap = inner23(api2).coordSysRecordMap;
|
|
78263
79953
|
const coordSysKeyArr = coordSysRecordMap.keys();
|
|
78264
79954
|
for (let i = 0; i < coordSysKeyArr.length; i++) {
|
|
78265
79955
|
const coordSysKey = coordSysKeyArr[i];
|
|
@@ -78430,7 +80120,7 @@ function mergeControllerParams(dataZoomInfoMap) {
|
|
|
78430
80120
|
}
|
|
78431
80121
|
function installDataZoomRoamProcessor(registers) {
|
|
78432
80122
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.FILTER, function(ecModel, api2) {
|
|
78433
|
-
const apiInner =
|
|
80123
|
+
const apiInner = inner23(api2);
|
|
78434
80124
|
const coordSysRecordMap = apiInner.coordSysRecordMap || (apiInner.coordSysRecordMap = createHashMap());
|
|
78435
80125
|
coordSysRecordMap.each(function(coordSysRecord) {
|
|
78436
80126
|
coordSysRecord.dataZoomInfoMap = null;
|
|
@@ -78695,7 +80385,7 @@ var getDirectionInfo = {
|
|
|
78695
80385
|
var InsideZoomView_default = InsideZoomView;
|
|
78696
80386
|
|
|
78697
80387
|
// src/component/dataZoom/installDataZoomInside.ts
|
|
78698
|
-
function
|
|
80388
|
+
function install70(registers) {
|
|
78699
80389
|
installCommon(registers);
|
|
78700
80390
|
registers.registerComponentModel(InsideZoomModel_default);
|
|
78701
80391
|
registers.registerComponentView(InsideZoomView_default);
|
|
@@ -79442,8 +81132,8 @@ var SliderZoomView2 = class extends DataZoomView_default {
|
|
|
79442
81132
|
var SliderZoomView = SliderZoomView2;
|
|
79443
81133
|
SliderZoomView.type = "dataZoom.slider";
|
|
79444
81134
|
function getOtherDim(thisDim) {
|
|
79445
|
-
const
|
|
79446
|
-
return
|
|
81135
|
+
const map9 = {x: "y", y: "x", radius: "angle", angle: "radius"};
|
|
81136
|
+
return map9[thisDim];
|
|
79447
81137
|
}
|
|
79448
81138
|
function getCursor(orient) {
|
|
79449
81139
|
return orient === "vertical" ? "ns-resize" : "ew-resize";
|
|
@@ -79451,16 +81141,16 @@ function getCursor(orient) {
|
|
|
79451
81141
|
var SliderZoomView_default = SliderZoomView;
|
|
79452
81142
|
|
|
79453
81143
|
// src/component/dataZoom/installDataZoomSlider.ts
|
|
79454
|
-
function
|
|
81144
|
+
function install71(registers) {
|
|
79455
81145
|
registers.registerComponentModel(SliderZoomModel_default);
|
|
79456
81146
|
registers.registerComponentView(SliderZoomView_default);
|
|
79457
81147
|
installCommon(registers);
|
|
79458
81148
|
}
|
|
79459
81149
|
|
|
79460
81150
|
// src/component/dataZoom/install.ts
|
|
79461
|
-
function
|
|
79462
|
-
use(install69);
|
|
81151
|
+
function install72(registers) {
|
|
79463
81152
|
use(install70);
|
|
81153
|
+
use(install71);
|
|
79464
81154
|
}
|
|
79465
81155
|
|
|
79466
81156
|
// src/visual/visualDefault.ts
|
|
@@ -79509,8 +81199,8 @@ var visualDefault_default = visualDefault;
|
|
|
79509
81199
|
// src/component/visualMap/VisualMapModel.ts
|
|
79510
81200
|
var mapVisual2 = VisualMapping_default.mapVisual;
|
|
79511
81201
|
var eachVisual = VisualMapping_default.eachVisual;
|
|
79512
|
-
var
|
|
79513
|
-
var
|
|
81202
|
+
var isArray3 = isArray;
|
|
81203
|
+
var each20 = each;
|
|
79514
81204
|
var asc3 = asc;
|
|
79515
81205
|
var linearMap2 = linearMap;
|
|
79516
81206
|
var VisualMapModel2 = class extends Component_default {
|
|
@@ -79650,7 +81340,7 @@ var VisualMapModel2 = class extends Component_default {
|
|
|
79650
81340
|
completeInactive.call(this, target, "inRange", "outOfRange");
|
|
79651
81341
|
completeController.call(this, controller);
|
|
79652
81342
|
function completeSingle(base3) {
|
|
79653
|
-
if (
|
|
81343
|
+
if (isArray3(thisOption.color) && !base3.inRange) {
|
|
79654
81344
|
base3.inRange = {color: thisOption.color.slice().reverse()};
|
|
79655
81345
|
}
|
|
79656
81346
|
base3.inRange = base3.inRange || {color: ecModel.get("gradientColor")};
|
|
@@ -79660,7 +81350,7 @@ var VisualMapModel2 = class extends Component_default {
|
|
|
79660
81350
|
let optAbsent = base3[stateAbsent];
|
|
79661
81351
|
if (optExist && !optAbsent) {
|
|
79662
81352
|
optAbsent = base3[stateAbsent] = {};
|
|
79663
|
-
|
|
81353
|
+
each20(optExist, function(visualData, visualType) {
|
|
79664
81354
|
if (!VisualMapping_default.isValidType(visualType)) {
|
|
79665
81355
|
return;
|
|
79666
81356
|
}
|
|
@@ -79680,7 +81370,7 @@ var VisualMapModel2 = class extends Component_default {
|
|
|
79680
81370
|
const inactiveColor = this.get("inactiveColor");
|
|
79681
81371
|
const itemSymbol = this.getItemSymbol();
|
|
79682
81372
|
const defaultSymbol = itemSymbol || "roundRect";
|
|
79683
|
-
|
|
81373
|
+
each20(this.stateList, function(state) {
|
|
79684
81374
|
const itemSize = this.itemSize;
|
|
79685
81375
|
let visuals = controller2[state];
|
|
79686
81376
|
if (!visuals) {
|
|
@@ -80040,7 +81730,7 @@ function makeHighDownBatch(batch, visualMapModel) {
|
|
|
80040
81730
|
|
|
80041
81731
|
// src/component/visualMap/ContinuousView.ts
|
|
80042
81732
|
var linearMap3 = linearMap;
|
|
80043
|
-
var
|
|
81733
|
+
var each21 = each;
|
|
80044
81734
|
var mathMin11 = Math.min;
|
|
80045
81735
|
var mathMax11 = Math.max;
|
|
80046
81736
|
var HOVER_LINK_SIZE = 12;
|
|
@@ -80368,7 +82058,7 @@ var ContinuousView2 = class extends VisualMapView_default {
|
|
|
80368
82058
|
const handleLabels = shapes.handleLabels;
|
|
80369
82059
|
const itemSize = visualMapModel.itemSize;
|
|
80370
82060
|
const dataExtent = visualMapModel.getExtent();
|
|
80371
|
-
|
|
82061
|
+
each21([0, 1], function(handleIndex) {
|
|
80372
82062
|
const handleThumb = handleThumbs[handleIndex];
|
|
80373
82063
|
handleThumb.setStyle("fill", visualInRange.handlesColor[handleIndex]);
|
|
80374
82064
|
handleThumb.y = handleEnds[handleIndex];
|
|
@@ -80674,13 +82364,13 @@ function getColorVisual(seriesModel, visualMapModel, value, valueState) {
|
|
|
80674
82364
|
}
|
|
80675
82365
|
|
|
80676
82366
|
// src/component/visualMap/preprocessor.ts
|
|
80677
|
-
var
|
|
82367
|
+
var each22 = each;
|
|
80678
82368
|
function visualMapPreprocessor(option) {
|
|
80679
82369
|
let visualMap = option && option.visualMap;
|
|
80680
82370
|
if (!isArray(visualMap)) {
|
|
80681
82371
|
visualMap = visualMap ? [visualMap] : [];
|
|
80682
82372
|
}
|
|
80683
|
-
|
|
82373
|
+
each22(visualMap, function(opt) {
|
|
80684
82374
|
if (!opt) {
|
|
80685
82375
|
return;
|
|
80686
82376
|
}
|
|
@@ -80690,7 +82380,7 @@ function visualMapPreprocessor(option) {
|
|
|
80690
82380
|
}
|
|
80691
82381
|
const pieces = opt.pieces;
|
|
80692
82382
|
if (pieces && isArray(pieces)) {
|
|
80693
|
-
|
|
82383
|
+
each22(pieces, function(piece) {
|
|
80694
82384
|
if (isObject(piece)) {
|
|
80695
82385
|
if (has2(piece, "start") && !has2(piece, "min")) {
|
|
80696
82386
|
piece.min = piece.start;
|
|
@@ -80725,7 +82415,7 @@ function installCommon2(registers) {
|
|
|
80725
82415
|
}
|
|
80726
82416
|
|
|
80727
82417
|
// src/component/visualMap/installVisualMapContinuous.ts
|
|
80728
|
-
function
|
|
82418
|
+
function install73(registers) {
|
|
80729
82419
|
registers.registerComponentModel(ContinuousModel_default);
|
|
80730
82420
|
registers.registerComponentView(ContinuousView_default);
|
|
80731
82421
|
installCommon2(registers);
|
|
@@ -81165,16 +82855,16 @@ PiecewiseVisualMapView.type = "visualMap.piecewise";
|
|
|
81165
82855
|
var PiecewiseView_default = PiecewiseVisualMapView;
|
|
81166
82856
|
|
|
81167
82857
|
// src/component/visualMap/installVisualMapPiecewise.ts
|
|
81168
|
-
function
|
|
82858
|
+
function install74(registers) {
|
|
81169
82859
|
registers.registerComponentModel(PiecewiseModel_default);
|
|
81170
82860
|
registers.registerComponentView(PiecewiseView_default);
|
|
81171
82861
|
installCommon2(registers);
|
|
81172
82862
|
}
|
|
81173
82863
|
|
|
81174
82864
|
// src/component/visualMap/install.ts
|
|
81175
|
-
function
|
|
81176
|
-
use(install72);
|
|
82865
|
+
function install75(registers) {
|
|
81177
82866
|
use(install73);
|
|
82867
|
+
use(install74);
|
|
81178
82868
|
}
|
|
81179
82869
|
|
|
81180
82870
|
// src/visual/aria.ts
|
|
@@ -81186,7 +82876,7 @@ var DEFAULT_OPTION = {
|
|
|
81186
82876
|
show: false
|
|
81187
82877
|
}
|
|
81188
82878
|
};
|
|
81189
|
-
var
|
|
82879
|
+
var inner24 = makeInner();
|
|
81190
82880
|
var decalPaletteScope = {};
|
|
81191
82881
|
function ariaVisual(ecModel, api2) {
|
|
81192
82882
|
const ariaModel = ecModel.getModel("aria");
|
|
@@ -81212,7 +82902,7 @@ function ariaVisual(ecModel, api2) {
|
|
|
81212
82902
|
decalScope = {};
|
|
81213
82903
|
paletteScopeGroupByType.set(seriesModel.type, decalScope);
|
|
81214
82904
|
}
|
|
81215
|
-
|
|
82905
|
+
inner24(seriesModel).scope = decalScope;
|
|
81216
82906
|
});
|
|
81217
82907
|
ecModel.eachRawSeries((seriesModel) => {
|
|
81218
82908
|
if (ecModel.isSeriesFiltered(seriesModel)) {
|
|
@@ -81226,7 +82916,7 @@ function ariaVisual(ecModel, api2) {
|
|
|
81226
82916
|
if (!seriesModel.isColorBySeries()) {
|
|
81227
82917
|
const dataAll = seriesModel.getRawData();
|
|
81228
82918
|
const idxMap = {};
|
|
81229
|
-
const decalScope =
|
|
82919
|
+
const decalScope = inner24(seriesModel).scope;
|
|
81230
82920
|
data.each(function(idx) {
|
|
81231
82921
|
const rawIdx = data.getRawIndex(idx);
|
|
81232
82922
|
idxMap[rawIdx] = idx;
|
|
@@ -81370,7 +83060,7 @@ function ariaPreprocessor(option) {
|
|
|
81370
83060
|
}
|
|
81371
83061
|
|
|
81372
83062
|
// src/component/aria/install.ts
|
|
81373
|
-
function
|
|
83063
|
+
function install76(registers) {
|
|
81374
83064
|
registers.registerPreprocessor(ariaPreprocessor);
|
|
81375
83065
|
registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);
|
|
81376
83066
|
}
|
|
@@ -81708,7 +83398,7 @@ var sortTransform = {
|
|
|
81708
83398
|
};
|
|
81709
83399
|
|
|
81710
83400
|
// src/component/transform/install.ts
|
|
81711
|
-
function
|
|
83401
|
+
function install77(registers) {
|
|
81712
83402
|
registers.registerTransform(filterTransform);
|
|
81713
83403
|
registers.registerTransform(sortTransform);
|
|
81714
83404
|
}
|
|
@@ -81746,7 +83436,7 @@ var DatasetView = class extends Component_default2 {
|
|
|
81746
83436
|
}
|
|
81747
83437
|
};
|
|
81748
83438
|
DatasetView.type = "dataset";
|
|
81749
|
-
function
|
|
83439
|
+
function install78(registers) {
|
|
81750
83440
|
registers.registerComponentModel(DatasetModel);
|
|
81751
83441
|
registers.registerComponentView(DatasetView);
|
|
81752
83442
|
}
|
|
@@ -83464,7 +85154,7 @@ use([
|
|
|
83464
85154
|
install18,
|
|
83465
85155
|
install19,
|
|
83466
85156
|
install20,
|
|
83467
|
-
|
|
85157
|
+
install31,
|
|
83468
85158
|
install21,
|
|
83469
85159
|
install22,
|
|
83470
85160
|
install23,
|
|
@@ -83474,33 +85164,33 @@ use([
|
|
|
83474
85164
|
install27,
|
|
83475
85165
|
install28,
|
|
83476
85166
|
install29,
|
|
85167
|
+
install30,
|
|
85168
|
+
install35,
|
|
83477
85169
|
install34,
|
|
83478
|
-
install33,
|
|
83479
|
-
install31,
|
|
83480
85170
|
install32,
|
|
83481
|
-
|
|
83482
|
-
install37,
|
|
85171
|
+
install33,
|
|
83483
85172
|
install36,
|
|
83484
85173
|
install38,
|
|
85174
|
+
install37,
|
|
83485
85175
|
install39,
|
|
83486
85176
|
install40,
|
|
83487
85177
|
install41,
|
|
83488
|
-
install42
|
|
85178
|
+
install42,
|
|
85179
|
+
install43
|
|
83489
85180
|
]);
|
|
83490
|
-
use(install44);
|
|
83491
85181
|
use(install45);
|
|
83492
|
-
use(install10);
|
|
83493
85182
|
use(install46);
|
|
83494
|
-
use(
|
|
85183
|
+
use(install10);
|
|
83495
85184
|
use(install47);
|
|
85185
|
+
use(install17);
|
|
83496
85186
|
use(install48);
|
|
83497
|
-
use(
|
|
85187
|
+
use(install49);
|
|
83498
85188
|
use(install51);
|
|
83499
|
-
use(install43);
|
|
83500
85189
|
use(install52);
|
|
85190
|
+
use(install44);
|
|
83501
85191
|
use(install53);
|
|
83502
|
-
use(install65);
|
|
83503
85192
|
use(install54);
|
|
85193
|
+
use(install66);
|
|
83504
85194
|
use(install55);
|
|
83505
85195
|
use(install56);
|
|
83506
85196
|
use(install57);
|
|
@@ -83511,16 +85201,17 @@ use(install61);
|
|
|
83511
85201
|
use(install62);
|
|
83512
85202
|
use(install63);
|
|
83513
85203
|
use(install64);
|
|
83514
|
-
use(
|
|
83515
|
-
use(install71);
|
|
85204
|
+
use(install65);
|
|
83516
85205
|
use(install69);
|
|
83517
|
-
use(install70);
|
|
83518
|
-
use(install74);
|
|
83519
85206
|
use(install72);
|
|
83520
|
-
use(
|
|
85207
|
+
use(install70);
|
|
85208
|
+
use(install71);
|
|
83521
85209
|
use(install75);
|
|
85210
|
+
use(install73);
|
|
85211
|
+
use(install74);
|
|
83522
85212
|
use(install76);
|
|
83523
85213
|
use(install77);
|
|
85214
|
+
use(install78);
|
|
83524
85215
|
use(installUniversalTransition);
|
|
83525
85216
|
use(installLabelLayout);
|
|
83526
85217
|
|