tvcharts 0.8.81 → 0.8.83
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 +341 -62
- package/dist/echarts.js.map +2 -2
- package/lib/chart/arrowsPlot/ArrowPlotView.js +4 -1
- package/lib/chart/arrowsPlot/ArrowSymbolPath.js +7 -1
- package/lib/chart/barPlot/BarPath.js +7 -1
- package/lib/chart/barPlot/BarPlotView.js +4 -1
- package/lib/chart/bgColor/BgColorPath.js +13 -2
- package/lib/chart/bgColor/BgColorView.js +5 -2
- package/lib/chart/boxes/BoxesPath.js +11 -1
- package/lib/chart/boxes/BoxesView.js +5 -1
- package/lib/chart/candlePlot/CandlePlotView.js +33 -7
- package/lib/chart/candlePlot/NormalBoxPath.js +18 -8
- package/lib/chart/candlePlot/WickPath.js +7 -1
- package/lib/chart/candlePlot/candlePlotLayout.js +33 -50
- package/lib/chart/fills/FillPolyPath.js +48 -8
- package/lib/chart/fills/FillsView.js +4 -1
- package/lib/chart/labels/LabelsView.js +3 -1
- package/lib/chart/labels/SymbolPath.js +2 -1
- package/lib/chart/lineFills/LineFillsPath.js +7 -1
- package/lib/chart/linesPlot/BarPath.js +8 -2
- package/lib/chart/linesPlot/HistogramPlotPath.js +7 -1
- package/lib/chart/linesPlot/LinePlotPath.js +18 -1
- package/lib/chart/linesPlot/LinesPlotView.js +15 -4
- package/lib/chart/linesPlot/SymbolPath.js +2 -1
- package/lib/chart/mineLines/LinesPath.js +7 -1
- package/lib/chart/mineLines/MineLinesView.js +4 -1
- package/lib/component/dataZoom/AxisProxy.js +17 -3
- package/lib/component/dataZoom/roams.js +2 -2
- package/lib/component/helper/RoamController.js +5 -1
- package/lib/core/echarts.js +10 -1
- package/lib/model/Model.js +80 -8
- package/lib/util/throttle.js +76 -0
- package/package.json +2 -2
- package/types/dist/echarts.d.ts +12 -2
- package/types/dist/shared.d.ts +12 -2
- package/types/src/chart/arrowsPlot/ArrowSymbolPath.d.ts +2 -0
- package/types/src/chart/barPlot/BarPath.d.ts +4 -1
- package/types/src/chart/bgColor/BgColorPath.d.ts +5 -1
- package/types/src/chart/boxes/BoxesPath.d.ts +3 -0
- package/types/src/chart/candlePlot/NormalBoxPath.d.ts +7 -3
- package/types/src/chart/candlePlot/WickPath.d.ts +4 -1
- package/types/src/chart/fills/FillPolyPath.d.ts +4 -1
- package/types/src/chart/labels/SymbolPath.d.ts +1 -0
- package/types/src/chart/lineFills/LineFillsPath.d.ts +2 -0
- package/types/src/chart/linesPlot/BarPath.d.ts +4 -1
- package/types/src/chart/linesPlot/HistogramPlotPath.d.ts +4 -1
- package/types/src/chart/linesPlot/LinePlotPath.d.ts +4 -1
- package/types/src/chart/linesPlot/SymbolPath.d.ts +1 -0
- package/types/src/chart/mineLines/LinesPath.d.ts +2 -0
- package/types/src/component/dataZoom/AxisProxy.d.ts +15 -1
- package/types/src/component/helper/RoamController.d.ts +1 -0
- package/types/src/core/echarts.d.ts +2 -0
- package/types/src/model/Model.d.ts +7 -1
- package/types/src/util/throttle.d.ts +10 -0
- package/types/src/util/types.d.ts +2 -0
package/dist/echarts.js
CHANGED
|
@@ -165,6 +165,7 @@ function detect(ua, env2) {
|
|
|
165
165
|
env2.transform3dSupported = (browser.ie && "transition" in style || browser.edge || "WebKitCSSMatrix" in window && "m11" in new WebKitCSSMatrix() || "MozPerspective" in style) && !("OTransition" in style);
|
|
166
166
|
env2.transformSupported = env2.transform3dSupported || browser.ie && +browser.version >= 9;
|
|
167
167
|
}
|
|
168
|
+
console.log("%c [ env ]-116", "font-size:13px; background:pink; color:#bf2c9f;", env);
|
|
168
169
|
var env_default = env;
|
|
169
170
|
|
|
170
171
|
// node_modules/tvrender/src/core/util.ts
|
|
@@ -1249,7 +1250,9 @@ function transformLocalCoord(out2, elFrom, elTarget, inX, inY) {
|
|
|
1249
1250
|
return transformCoordWithViewport(_calcOut, elFrom, inX, inY, true) && transformCoordWithViewport(out2, elTarget, _calcOut[0], _calcOut[1]);
|
|
1250
1251
|
}
|
|
1251
1252
|
function transformCoordWithViewport(out2, el, inX, inY, inverse) {
|
|
1252
|
-
if (
|
|
1253
|
+
if (typeof DOMMatrix !== "undefined") {
|
|
1254
|
+
return transformCoordWithViewportDom(out2, el, inX, inY, inverse);
|
|
1255
|
+
} else if (el.getBoundingClientRect && env_default.domSupported && !isCanvasEl(el)) {
|
|
1253
1256
|
const saved = el[EVENT_SAVED_PROP] || (el[EVENT_SAVED_PROP] = {});
|
|
1254
1257
|
const markers = prepareCoordMarkers(el, saved);
|
|
1255
1258
|
const transformer = preparePointerTransformer(markers, saved, inverse);
|
|
@@ -1260,6 +1263,21 @@ function transformCoordWithViewport(out2, el, inX, inY, inverse) {
|
|
|
1260
1263
|
}
|
|
1261
1264
|
return false;
|
|
1262
1265
|
}
|
|
1266
|
+
function transformCoordWithViewportDom(out2, el, inX, inY, inverse) {
|
|
1267
|
+
const matrix13 = new DOMMatrix(getComputedStyle(el).transform);
|
|
1268
|
+
const rect = el.getBoundingClientRect();
|
|
1269
|
+
if (inverse) {
|
|
1270
|
+
const invMatrix = matrix13.inverse();
|
|
1271
|
+
const relativeX = inX - rect.left;
|
|
1272
|
+
const relativeY = inY - rect.top;
|
|
1273
|
+
out2[0] = relativeX * invMatrix.a + relativeY * invMatrix.c + invMatrix.e;
|
|
1274
|
+
out2[1] = relativeX * invMatrix.b + relativeY * invMatrix.d + invMatrix.f;
|
|
1275
|
+
} else {
|
|
1276
|
+
out2[0] = inX * matrix13.a + inY * matrix13.c + matrix13.e + rect.left;
|
|
1277
|
+
out2[1] = inX * matrix13.b + inY * matrix13.d + matrix13.f + rect.top;
|
|
1278
|
+
}
|
|
1279
|
+
return true;
|
|
1280
|
+
}
|
|
1263
1281
|
function prepareCoordMarkers(el, saved) {
|
|
1264
1282
|
let markers = saved.markers;
|
|
1265
1283
|
if (markers) {
|
|
@@ -7065,6 +7083,9 @@ var ZRender = class {
|
|
|
7065
7083
|
if (this._disposed) {
|
|
7066
7084
|
return;
|
|
7067
7085
|
}
|
|
7086
|
+
if (this._needsRefresh) {
|
|
7087
|
+
return;
|
|
7088
|
+
}
|
|
7068
7089
|
this._needsRefresh = true;
|
|
7069
7090
|
this.animation.start();
|
|
7070
7091
|
}
|
|
@@ -7246,7 +7267,7 @@ function getElementSSRData(el) {
|
|
|
7246
7267
|
function registerSSRDataGetter(getter) {
|
|
7247
7268
|
ssrDataGetter = getter;
|
|
7248
7269
|
}
|
|
7249
|
-
var version = "5.6.
|
|
7270
|
+
var version = "5.6.94";
|
|
7250
7271
|
|
|
7251
7272
|
// src/util/number.ts
|
|
7252
7273
|
var RADIAN_EPSILON = 1e-4;
|
|
@@ -14633,6 +14654,7 @@ var ItemStyleMixin = class {
|
|
|
14633
14654
|
// src/model/Model.ts
|
|
14634
14655
|
var Model = class {
|
|
14635
14656
|
constructor(option, parentModel, ecModel) {
|
|
14657
|
+
this._pathCache = new Map();
|
|
14636
14658
|
this.parentModel = parentModel;
|
|
14637
14659
|
this.ecModel = ecModel;
|
|
14638
14660
|
this.option = option;
|
|
@@ -14646,7 +14668,72 @@ var Model = class {
|
|
|
14646
14668
|
if (path == null) {
|
|
14647
14669
|
return this.option;
|
|
14648
14670
|
}
|
|
14649
|
-
|
|
14671
|
+
const pathArr = this.parsePath(path);
|
|
14672
|
+
return this._doGetOptimized(pathArr, !ignoreParent && this.parentModel);
|
|
14673
|
+
}
|
|
14674
|
+
parsePath(path) {
|
|
14675
|
+
if (typeof path === "string") {
|
|
14676
|
+
let cached = this._pathCache.get(path);
|
|
14677
|
+
if (!cached) {
|
|
14678
|
+
cached = path.split(".");
|
|
14679
|
+
this._pathCache.set(path, cached);
|
|
14680
|
+
}
|
|
14681
|
+
return cached;
|
|
14682
|
+
}
|
|
14683
|
+
return path;
|
|
14684
|
+
}
|
|
14685
|
+
_doGetOptimized(pathArr, parentModel) {
|
|
14686
|
+
const length2 = pathArr.length;
|
|
14687
|
+
switch (length2) {
|
|
14688
|
+
case 0:
|
|
14689
|
+
return this.option;
|
|
14690
|
+
case 1:
|
|
14691
|
+
return this._getSingle(pathArr[0], parentModel);
|
|
14692
|
+
case 2:
|
|
14693
|
+
return this._getDouble(pathArr[0], pathArr[1], parentModel);
|
|
14694
|
+
case 3:
|
|
14695
|
+
return this._getTriple(pathArr[0], pathArr[1], pathArr[2], parentModel);
|
|
14696
|
+
default:
|
|
14697
|
+
return this._getDeep(pathArr, parentModel);
|
|
14698
|
+
}
|
|
14699
|
+
}
|
|
14700
|
+
_getSingle(key, parentModel) {
|
|
14701
|
+
let value = this.option?.[key];
|
|
14702
|
+
if (value == null && parentModel) {
|
|
14703
|
+
value = parentModel.get(key, false);
|
|
14704
|
+
}
|
|
14705
|
+
return value;
|
|
14706
|
+
}
|
|
14707
|
+
_getDouble(key1, key2, parentModel) {
|
|
14708
|
+
const obj = this.option?.[key1];
|
|
14709
|
+
let value = obj?.[key2];
|
|
14710
|
+
if (value == null && parentModel) {
|
|
14711
|
+
value = parentModel.get([key1, key2], false);
|
|
14712
|
+
}
|
|
14713
|
+
return value;
|
|
14714
|
+
}
|
|
14715
|
+
_getTriple(key1, key2, key3, parentModel) {
|
|
14716
|
+
let value = this.option?.[key1]?.[key2]?.[key3];
|
|
14717
|
+
if (!value && parentModel) {
|
|
14718
|
+
value = parentModel.get([key1, key2, key3], false);
|
|
14719
|
+
}
|
|
14720
|
+
return value;
|
|
14721
|
+
}
|
|
14722
|
+
_getDeep(pathArr, parentModel) {
|
|
14723
|
+
let obj = this.option;
|
|
14724
|
+
const length2 = pathArr.length;
|
|
14725
|
+
for (let i = 0; i < length2; i++) {
|
|
14726
|
+
const segment = pathArr[i];
|
|
14727
|
+
if (!segment)
|
|
14728
|
+
continue;
|
|
14729
|
+
obj = obj?.[segment];
|
|
14730
|
+
if (obj == null)
|
|
14731
|
+
break;
|
|
14732
|
+
}
|
|
14733
|
+
if (obj == null && parentModel) {
|
|
14734
|
+
obj = parentModel.get(pathArr, false);
|
|
14735
|
+
}
|
|
14736
|
+
return obj;
|
|
14650
14737
|
}
|
|
14651
14738
|
getShallow(key, ignoreParent) {
|
|
14652
14739
|
const option = this.option;
|
|
@@ -14662,7 +14749,7 @@ var Model = class {
|
|
|
14662
14749
|
getModel(path, parentModel) {
|
|
14663
14750
|
const hasPath = path != null;
|
|
14664
14751
|
const pathFinal = hasPath ? this.parsePath(path) : null;
|
|
14665
|
-
const obj = hasPath ? this.
|
|
14752
|
+
const obj = hasPath ? this._doGetOptimized(pathFinal) : this.option;
|
|
14666
14753
|
parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal));
|
|
14667
14754
|
return new Model(obj, parentModel, this.ecModel);
|
|
14668
14755
|
}
|
|
@@ -14675,12 +14762,6 @@ var Model = class {
|
|
|
14675
14762
|
const Ctor = this.constructor;
|
|
14676
14763
|
return new Ctor(clone(this.option));
|
|
14677
14764
|
}
|
|
14678
|
-
parsePath(path) {
|
|
14679
|
-
if (typeof path === "string") {
|
|
14680
|
-
return path.split(".");
|
|
14681
|
-
}
|
|
14682
|
-
return path;
|
|
14683
|
-
}
|
|
14684
14765
|
resolveParentPath(path) {
|
|
14685
14766
|
return path;
|
|
14686
14767
|
}
|
|
@@ -20864,6 +20945,70 @@ function clear(obj, fnAttr) {
|
|
|
20864
20945
|
obj[fnAttr] = fn[ORIGIN_METHOD];
|
|
20865
20946
|
}
|
|
20866
20947
|
}
|
|
20948
|
+
function throttleRAF(func, delay, options = {}) {
|
|
20949
|
+
const {leading = false, trailing = true} = options;
|
|
20950
|
+
let lastTime = 0;
|
|
20951
|
+
let rafId = null;
|
|
20952
|
+
let lastArgs = null;
|
|
20953
|
+
let lastContext = null;
|
|
20954
|
+
let isTrailingPending = false;
|
|
20955
|
+
const execute = (timestamp) => {
|
|
20956
|
+
if (lastArgs && timestamp - lastTime >= delay) {
|
|
20957
|
+
func.apply(lastContext, lastArgs);
|
|
20958
|
+
lastTime = timestamp;
|
|
20959
|
+
lastArgs = null;
|
|
20960
|
+
lastContext = null;
|
|
20961
|
+
isTrailingPending = false;
|
|
20962
|
+
}
|
|
20963
|
+
rafId = null;
|
|
20964
|
+
};
|
|
20965
|
+
const throttled = function(...args) {
|
|
20966
|
+
const currentTime = performance.now();
|
|
20967
|
+
lastContext = this;
|
|
20968
|
+
lastArgs = args;
|
|
20969
|
+
if (currentTime - lastTime >= delay) {
|
|
20970
|
+
if (rafId) {
|
|
20971
|
+
cancelAnimationFrame(rafId);
|
|
20972
|
+
rafId = null;
|
|
20973
|
+
}
|
|
20974
|
+
if (leading) {
|
|
20975
|
+
func.apply(this, args);
|
|
20976
|
+
lastTime = currentTime;
|
|
20977
|
+
lastArgs = null;
|
|
20978
|
+
lastContext = null;
|
|
20979
|
+
} else if (trailing) {
|
|
20980
|
+
isTrailingPending = true;
|
|
20981
|
+
}
|
|
20982
|
+
} else if (trailing && !rafId && !isTrailingPending) {
|
|
20983
|
+
isTrailingPending = true;
|
|
20984
|
+
rafId = requestAnimationFrame(execute);
|
|
20985
|
+
}
|
|
20986
|
+
};
|
|
20987
|
+
throttled.cancel = () => {
|
|
20988
|
+
if (rafId) {
|
|
20989
|
+
cancelAnimationFrame(rafId);
|
|
20990
|
+
rafId = null;
|
|
20991
|
+
}
|
|
20992
|
+
lastArgs = null;
|
|
20993
|
+
lastContext = null;
|
|
20994
|
+
lastTime = 0;
|
|
20995
|
+
isTrailingPending = false;
|
|
20996
|
+
};
|
|
20997
|
+
throttled.flush = () => {
|
|
20998
|
+
if (isTrailingPending && lastArgs) {
|
|
20999
|
+
if (rafId) {
|
|
21000
|
+
cancelAnimationFrame(rafId);
|
|
21001
|
+
rafId = null;
|
|
21002
|
+
}
|
|
21003
|
+
func.apply(lastContext, lastArgs);
|
|
21004
|
+
lastTime = performance.now();
|
|
21005
|
+
lastArgs = null;
|
|
21006
|
+
lastContext = null;
|
|
21007
|
+
isTrailingPending = false;
|
|
21008
|
+
}
|
|
21009
|
+
};
|
|
21010
|
+
return throttled;
|
|
21011
|
+
}
|
|
20867
21012
|
|
|
20868
21013
|
// src/visual/style.ts
|
|
20869
21014
|
var inner4 = makeInner();
|
|
@@ -24198,6 +24343,7 @@ var ECharts = class extends Eventful_default {
|
|
|
24198
24343
|
constructor(dom, theme2, opts) {
|
|
24199
24344
|
super(new ECEventProcessor());
|
|
24200
24345
|
this._throttledSelectItem = throttle(triggerSelectItem, 80);
|
|
24346
|
+
this._throttledSelectItemTime = 0;
|
|
24201
24347
|
this._chartsViews = [];
|
|
24202
24348
|
this._chartsMap = {};
|
|
24203
24349
|
this._componentsViews = [];
|
|
@@ -25317,6 +25463,39 @@ var ECharts = class extends Eventful_default {
|
|
|
25317
25463
|
this.scrollToDataIndex(dataIndex, animationDuration);
|
|
25318
25464
|
}
|
|
25319
25465
|
}
|
|
25466
|
+
scrollToRange(startTime, endTime, expectCount = 0) {
|
|
25467
|
+
if (this._disposed) {
|
|
25468
|
+
disposedWarning(this.id);
|
|
25469
|
+
return;
|
|
25470
|
+
}
|
|
25471
|
+
const xAxisModal = this._model.getComponent("xAxis", 0);
|
|
25472
|
+
const scale4 = xAxisModal.axis.scale;
|
|
25473
|
+
const categories = scale4.getOrdinalMeta().getCategories();
|
|
25474
|
+
const dataCount = categories.length;
|
|
25475
|
+
const [startIndex, endIndex] = getIndexRange(categories, startTime, endTime);
|
|
25476
|
+
const axisLength = xAxisModal.axis.getExtent()[1];
|
|
25477
|
+
let barCount = Math.max(endIndex - startIndex + 1, 2);
|
|
25478
|
+
let barSpace = Math.max(1, axisLength / barCount);
|
|
25479
|
+
let lastBarRightSideDiffBarCount = endIndex - dataCount + 0.5;
|
|
25480
|
+
const maxRightOffsetBarCount = axisLength / barSpace - Math.min(2, dataCount);
|
|
25481
|
+
if (lastBarRightSideDiffBarCount > maxRightOffsetBarCount) {
|
|
25482
|
+
lastBarRightSideDiffBarCount = maxRightOffsetBarCount;
|
|
25483
|
+
}
|
|
25484
|
+
const minRightOffsetBarCount = -dataCount + Math.min(2, dataCount);
|
|
25485
|
+
if (lastBarRightSideDiffBarCount < minRightOffsetBarCount) {
|
|
25486
|
+
lastBarRightSideDiffBarCount = minRightOffsetBarCount;
|
|
25487
|
+
if (expectCount && expectCount !== dataCount) {
|
|
25488
|
+
barSpace = Math.max(1, axisLength / expectCount);
|
|
25489
|
+
}
|
|
25490
|
+
}
|
|
25491
|
+
const payload = {
|
|
25492
|
+
type: "dataZoom",
|
|
25493
|
+
dataZoomIndex: 0,
|
|
25494
|
+
barSpace,
|
|
25495
|
+
lastBarRightSideDiffBarCount
|
|
25496
|
+
};
|
|
25497
|
+
doDispatchAction.call(this, payload, false);
|
|
25498
|
+
}
|
|
25320
25499
|
setMarkLabel(seriesName, data) {
|
|
25321
25500
|
const seriesModal = this._model.getSeriesByName(seriesName)[0];
|
|
25322
25501
|
if (seriesModal) {
|
|
@@ -25340,6 +25519,14 @@ var ECharts = class extends Eventful_default {
|
|
|
25340
25519
|
const scale4 = xAxisModal.axis.scale;
|
|
25341
25520
|
return scale4.getOrdinalMeta().getCategoriesSize() - 1;
|
|
25342
25521
|
}
|
|
25522
|
+
_seriesSelectItem(params) {
|
|
25523
|
+
const time = Date.now();
|
|
25524
|
+
if (this._throttledSelectItemTime && time - this._throttledSelectItemTime < 160) {
|
|
25525
|
+
return;
|
|
25526
|
+
}
|
|
25527
|
+
this._throttledSelectItemTime = time;
|
|
25528
|
+
this._throttledSelectItem(params);
|
|
25529
|
+
}
|
|
25343
25530
|
};
|
|
25344
25531
|
PENDING_UPDATE, IN_MAIN_PROCESS_KEY, CONNECT_STATUS_KEY, CONNECT_LAYOUT_STATUS_KEY, STATUS_NEEDS_UPDATE_KEY;
|
|
25345
25532
|
ECharts.internalField = function() {
|
|
@@ -25898,7 +26085,7 @@ ECharts.internalField = function() {
|
|
|
25898
26085
|
handleGroupMouseOverForHighDown(ecIns.mousemoveComponentGroupId, api2);
|
|
25899
26086
|
ecIns[STATUS_NEEDS_UPDATE_KEY] = true;
|
|
25900
26087
|
}
|
|
25901
|
-
ecIns.
|
|
26088
|
+
ecIns._seriesSelectItem({
|
|
25902
26089
|
messageCenter: ecIns._messageCenter,
|
|
25903
26090
|
ecModel,
|
|
25904
26091
|
type: "series"
|
|
@@ -42166,6 +42353,10 @@ var RoamController = class extends Eventful_default {
|
|
|
42166
42353
|
this._startX = x;
|
|
42167
42354
|
this._startY = y;
|
|
42168
42355
|
this._dragging = true;
|
|
42356
|
+
if (this.kineticScrollId) {
|
|
42357
|
+
this.kineticScrollId && cancelAnimationFrame(this.kineticScrollId);
|
|
42358
|
+
this.kineticScrollId = null;
|
|
42359
|
+
}
|
|
42169
42360
|
if (this.kineticScroll) {
|
|
42170
42361
|
this.kineticScroll = null;
|
|
42171
42362
|
}
|
|
@@ -42275,7 +42466,7 @@ var RoamController = class extends Eventful_default {
|
|
|
42275
42466
|
isAvailableBehavior: null,
|
|
42276
42467
|
lastBarRightSideDiffBarCount: Math.round(newPos / this.minScrollUnit) * this.minScrollUnit
|
|
42277
42468
|
});
|
|
42278
|
-
requestAnimationFrame_default(() => this._kineticScroll());
|
|
42469
|
+
this.kineticScrollId = requestAnimationFrame_default(() => this._kineticScroll());
|
|
42279
42470
|
} else {
|
|
42280
42471
|
trigger(this, "dragEnd", "moveOnMouseMove", {}, {isAvailableBehavior: null});
|
|
42281
42472
|
}
|
|
@@ -56048,7 +56239,7 @@ var LinePlotPath = class extends Path_default {
|
|
|
56048
56239
|
return new LinePlotShape();
|
|
56049
56240
|
}
|
|
56050
56241
|
buildPath(ctx2, shape) {
|
|
56051
|
-
const {points: points4, connectSelf, barWidth} = shape;
|
|
56242
|
+
const {points: points4, connectSelf, barWidth, isWebviewRender, stroke} = shape;
|
|
56052
56243
|
if (connectSelf) {
|
|
56053
56244
|
const offset = barWidth / 2;
|
|
56054
56245
|
let isMove = false;
|
|
@@ -56064,6 +56255,11 @@ var LinePlotPath = class extends Path_default {
|
|
|
56064
56255
|
if (!nextPoint || isPointNull3(nextPoint)) {
|
|
56065
56256
|
ctx2.moveTo(x - offset, y);
|
|
56066
56257
|
ctx2.lineTo(x + offset, y);
|
|
56258
|
+
if (isWebviewRender && stroke && index % 10 === 0) {
|
|
56259
|
+
ctx2.strokeStyle(stroke);
|
|
56260
|
+
ctx2.beginPathFill();
|
|
56261
|
+
ctx2.moveTo(x, y);
|
|
56262
|
+
}
|
|
56067
56263
|
continue;
|
|
56068
56264
|
}
|
|
56069
56265
|
ctx2.moveTo(x, y);
|
|
@@ -56071,6 +56267,11 @@ var LinePlotPath = class extends Path_default {
|
|
|
56071
56267
|
} else {
|
|
56072
56268
|
const [x, y] = point;
|
|
56073
56269
|
ctx2.lineTo(x, y);
|
|
56270
|
+
if (isWebviewRender && stroke && index % 10 === 0) {
|
|
56271
|
+
ctx2.strokeStyle(stroke);
|
|
56272
|
+
ctx2.beginPathFill();
|
|
56273
|
+
ctx2.moveTo(x, y);
|
|
56274
|
+
}
|
|
56074
56275
|
}
|
|
56075
56276
|
}
|
|
56076
56277
|
} else {
|
|
@@ -56090,6 +56291,11 @@ var LinePlotPath = class extends Path_default {
|
|
|
56090
56291
|
}
|
|
56091
56292
|
const [x, y] = point;
|
|
56092
56293
|
ctx2.lineTo(x, y);
|
|
56294
|
+
if (isWebviewRender && stroke && index % 10 === 0) {
|
|
56295
|
+
ctx2.strokeStyle(stroke);
|
|
56296
|
+
ctx2.beginPathFill();
|
|
56297
|
+
ctx2.moveTo(x, y);
|
|
56298
|
+
}
|
|
56093
56299
|
}
|
|
56094
56300
|
}
|
|
56095
56301
|
}
|
|
@@ -56222,7 +56428,7 @@ var HistogramPlotPath = class extends Path_default {
|
|
|
56222
56428
|
return new HistogramPlotShape();
|
|
56223
56429
|
}
|
|
56224
56430
|
buildPath(ctx2, shape) {
|
|
56225
|
-
const {points: points4, baseY} = shape;
|
|
56431
|
+
const {points: points4, baseY, stroke, isWebviewRender} = shape;
|
|
56226
56432
|
for (let index = 0; index < points4.length; index++) {
|
|
56227
56433
|
const point = points4[index];
|
|
56228
56434
|
if (point === 0 || isPointNull5(point)) {
|
|
@@ -56231,6 +56437,10 @@ var HistogramPlotPath = class extends Path_default {
|
|
|
56231
56437
|
const [x, y] = point;
|
|
56232
56438
|
ctx2.moveTo(x, y);
|
|
56233
56439
|
ctx2.lineTo(x, baseY);
|
|
56440
|
+
if (isWebviewRender && stroke && index % 5 === 0) {
|
|
56441
|
+
ctx2.strokeStyle(stroke);
|
|
56442
|
+
ctx2.beginPathFill();
|
|
56443
|
+
}
|
|
56234
56444
|
}
|
|
56235
56445
|
}
|
|
56236
56446
|
};
|
|
@@ -56257,7 +56467,7 @@ var BarPlotPath = class extends Path_default {
|
|
|
56257
56467
|
}
|
|
56258
56468
|
getDefaultStyle() {
|
|
56259
56469
|
return {
|
|
56260
|
-
stroke: "
|
|
56470
|
+
stroke: "none",
|
|
56261
56471
|
fill: "#000"
|
|
56262
56472
|
};
|
|
56263
56473
|
}
|
|
@@ -56265,7 +56475,7 @@ var BarPlotPath = class extends Path_default {
|
|
|
56265
56475
|
return new BarPlotShape();
|
|
56266
56476
|
}
|
|
56267
56477
|
buildPath(ctx2, shape) {
|
|
56268
|
-
const {points: points4, baseY, width} = shape;
|
|
56478
|
+
const {points: points4, baseY, width, isWebviewRender, fill} = shape;
|
|
56269
56479
|
const offset = width / 2;
|
|
56270
56480
|
const gap = offset >= 1 ? 1 : 0;
|
|
56271
56481
|
for (let index = 0; index < points4.length; index++) {
|
|
@@ -56283,6 +56493,10 @@ var BarPlotPath = class extends Path_default {
|
|
|
56283
56493
|
ctx2.lineTo(rightX, baseY);
|
|
56284
56494
|
ctx2.lineTo(leftX, baseY);
|
|
56285
56495
|
ctx2.lineTo(leftX, dataY);
|
|
56496
|
+
if (isWebviewRender && fill && index % 5 === 0) {
|
|
56497
|
+
ctx2.fillStyle(fill);
|
|
56498
|
+
ctx2.beginPathFill();
|
|
56499
|
+
}
|
|
56286
56500
|
}
|
|
56287
56501
|
}
|
|
56288
56502
|
};
|
|
@@ -56416,6 +56630,7 @@ var SymbolPath = class extends Path_default {
|
|
|
56416
56630
|
buildPath(path, shape) {
|
|
56417
56631
|
const points4 = shape.points;
|
|
56418
56632
|
const isShadow = shape.isShadow;
|
|
56633
|
+
const isWebviewRender = shape.isWebviewRender;
|
|
56419
56634
|
const symbolProxy = this.symbolProxy;
|
|
56420
56635
|
const symbolProxyShape = symbolProxy.shape;
|
|
56421
56636
|
let lastColor = "";
|
|
@@ -56427,7 +56642,7 @@ var SymbolPath = class extends Path_default {
|
|
|
56427
56642
|
continue;
|
|
56428
56643
|
}
|
|
56429
56644
|
const colorChanged = lastColor && lastColor !== color2;
|
|
56430
|
-
if (colorChanged) {
|
|
56645
|
+
if (colorChanged || isWebviewRender && i % 5 === 0) {
|
|
56431
56646
|
path.fillStyle(lastColor);
|
|
56432
56647
|
path.beginPathFill();
|
|
56433
56648
|
}
|
|
@@ -56630,6 +56845,7 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56630
56845
|
const z2 = seriesModel.get("z2");
|
|
56631
56846
|
const visualColor = getVisualGradient2(data, seriesModel.coordinateSystem, api2);
|
|
56632
56847
|
const connectNulls = seriesModel.get("connectNulls");
|
|
56848
|
+
const isMobile = seriesModel.get("isMobile");
|
|
56633
56849
|
const step = seriesModel.get("step");
|
|
56634
56850
|
const barSpace = Math.floor((seriesModel.coordinateSystem.getAxesByScale("ordinal")[0].scale.barSpace || calculatebandWidth(seriesModel, data)) * 0.8) || 1;
|
|
56635
56851
|
each(linePointsByKey, function(item, key) {
|
|
@@ -56642,7 +56858,9 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56642
56858
|
shape: {
|
|
56643
56859
|
points: item,
|
|
56644
56860
|
connectSelf: !connectNulls && !step,
|
|
56645
|
-
barWidth: barSpace
|
|
56861
|
+
barWidth: barSpace,
|
|
56862
|
+
stroke: color2,
|
|
56863
|
+
isWebviewRender: isMobile
|
|
56646
56864
|
},
|
|
56647
56865
|
style: {
|
|
56648
56866
|
lineDash,
|
|
@@ -56721,6 +56939,7 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56721
56939
|
const histogramGroup = this._histogramGroup;
|
|
56722
56940
|
const histbase = seriesModel.get("histbase") || 0;
|
|
56723
56941
|
const z2 = seriesModel.get("z2");
|
|
56942
|
+
const isMobile = seriesModel.get("isMobile");
|
|
56724
56943
|
const baseY = seriesModel.coordinateSystem.dataToPoint([0, histbase], true)[1];
|
|
56725
56944
|
each(linePointsByKey, function(item, key) {
|
|
56726
56945
|
const [stroke, lineDash, lineWidth] = key.split(":");
|
|
@@ -56728,7 +56947,9 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56728
56947
|
const el = new HistogramPlotPath_default({
|
|
56729
56948
|
shape: {
|
|
56730
56949
|
points: item,
|
|
56731
|
-
baseY
|
|
56950
|
+
baseY,
|
|
56951
|
+
stroke: color2,
|
|
56952
|
+
isWebviewRender: isMobile
|
|
56732
56953
|
},
|
|
56733
56954
|
style: {
|
|
56734
56955
|
stroke: color2,
|
|
@@ -56759,6 +56980,7 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56759
56980
|
}
|
|
56760
56981
|
const symbolGroup = this._symbolGroup;
|
|
56761
56982
|
const z2 = seriesModel.get("z2");
|
|
56983
|
+
const isMobile = seriesModel.get("isMobile");
|
|
56762
56984
|
each(symbolPointsByColor, function(item, key) {
|
|
56763
56985
|
if (shadowShape) {
|
|
56764
56986
|
const shadowEl = new SymbolPath_default({
|
|
@@ -56777,7 +56999,8 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56777
56999
|
}
|
|
56778
57000
|
const el = new SymbolPath_default({
|
|
56779
57001
|
shape: {
|
|
56780
|
-
points: item
|
|
57002
|
+
points: item,
|
|
57003
|
+
isWebviewRender: isMobile
|
|
56781
57004
|
},
|
|
56782
57005
|
style: {
|
|
56783
57006
|
fill: "#000000"
|
|
@@ -56865,6 +57088,7 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56865
57088
|
});
|
|
56866
57089
|
return;
|
|
56867
57090
|
}
|
|
57091
|
+
const isMobile = seriesModel.get("isMobile");
|
|
56868
57092
|
each(linePointsByKey, function(item, key) {
|
|
56869
57093
|
const [stroke] = key.split(":");
|
|
56870
57094
|
const {color: color2, isDefaultColor} = getFormatColor(stroke);
|
|
@@ -56872,7 +57096,9 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
56872
57096
|
shape: {
|
|
56873
57097
|
points: item,
|
|
56874
57098
|
baseY,
|
|
56875
|
-
width
|
|
57099
|
+
width,
|
|
57100
|
+
isWebviewRender: isMobile,
|
|
57101
|
+
fill: color2
|
|
56876
57102
|
},
|
|
56877
57103
|
style: {
|
|
56878
57104
|
fill: color2
|
|
@@ -59641,13 +59867,13 @@ var NormalBoxPathShape2 = class {
|
|
|
59641
59867
|
var NormalBoxPath2 = class extends Path_default {
|
|
59642
59868
|
constructor(opts) {
|
|
59643
59869
|
super(opts);
|
|
59644
|
-
this.type = "
|
|
59870
|
+
this.type = "candlePlotBox";
|
|
59645
59871
|
}
|
|
59646
59872
|
getDefaultShape() {
|
|
59647
59873
|
return new NormalBoxPathShape2();
|
|
59648
59874
|
}
|
|
59649
59875
|
buildPath(ctx2, shape) {
|
|
59650
|
-
const {points: points4, isSimpleBox} = shape;
|
|
59876
|
+
const {points: points4, isSimpleBox, fill, isMobile, stroke} = shape;
|
|
59651
59877
|
for (let index = 0; index < points4.length; ) {
|
|
59652
59878
|
const point1 = points4[index++];
|
|
59653
59879
|
const point2 = points4[index++];
|
|
@@ -59659,11 +59885,12 @@ var NormalBoxPath2 = class extends Path_default {
|
|
|
59659
59885
|
ctx2.moveTo(x, point1[1]);
|
|
59660
59886
|
ctx2.lineTo(x, isSame ? point1[1] + 1 : point3[1]);
|
|
59661
59887
|
} else {
|
|
59662
|
-
ctx2.
|
|
59663
|
-
|
|
59664
|
-
|
|
59665
|
-
ctx2.
|
|
59666
|
-
ctx2.
|
|
59888
|
+
ctx2.rect(point1[0], point1[1], point2[0] - point1[0], point3[1] - point1[1]);
|
|
59889
|
+
}
|
|
59890
|
+
if (isMobile && index % 16 === 0 && index !== points4.length) {
|
|
59891
|
+
!isSimpleBox && fill && ctx2.fillStyle(fill);
|
|
59892
|
+
stroke && ctx2.strokeStyle(stroke);
|
|
59893
|
+
ctx2.beginPathFill();
|
|
59667
59894
|
}
|
|
59668
59895
|
}
|
|
59669
59896
|
}
|
|
@@ -59682,7 +59909,7 @@ var WickPath = class extends Path_default {
|
|
|
59682
59909
|
return new WickPathShape();
|
|
59683
59910
|
}
|
|
59684
59911
|
buildPath(ctx2, shape) {
|
|
59685
|
-
const {points: points4} = shape;
|
|
59912
|
+
const {points: points4, isMobile, stroke} = shape;
|
|
59686
59913
|
for (let index = 0; index < points4.length; ) {
|
|
59687
59914
|
const point1 = points4[index++];
|
|
59688
59915
|
const point2 = points4[index++];
|
|
@@ -59692,6 +59919,10 @@ var WickPath = class extends Path_default {
|
|
|
59692
59919
|
ctx2.lineTo(point2[0], point2[1]);
|
|
59693
59920
|
ctx2.moveTo(point3[0], point3[1]);
|
|
59694
59921
|
ctx2.lineTo(point4[0], point4[1]);
|
|
59922
|
+
if (isMobile && stroke && index % 16 === 0 && index !== points4.length) {
|
|
59923
|
+
ctx2.strokeStyle(stroke);
|
|
59924
|
+
ctx2.beginPathFill();
|
|
59925
|
+
}
|
|
59695
59926
|
}
|
|
59696
59927
|
}
|
|
59697
59928
|
};
|
|
@@ -59716,26 +59947,32 @@ var CandlePlotView2 = class extends Chart_default {
|
|
|
59716
59947
|
const isSimpleBox = data.getLayout("isSimpleBox");
|
|
59717
59948
|
const bodyPointsByColor = data.getLayout("bodyPointsByColor");
|
|
59718
59949
|
const wickPointsByColor = data.getLayout("wickPointsByColor");
|
|
59950
|
+
const isMobile = seriesModel.get("isMobile");
|
|
59719
59951
|
each(bodyPointsByColor, function(points4, key) {
|
|
59720
59952
|
const [fill, stroke] = key.split(":");
|
|
59721
59953
|
const el = new NormalBoxPath_default({
|
|
59722
59954
|
shape: {
|
|
59723
59955
|
points: points4,
|
|
59724
|
-
isSimpleBox
|
|
59956
|
+
isSimpleBox,
|
|
59957
|
+
fill: fill !== "none" ? fill : "",
|
|
59958
|
+
isMobile,
|
|
59959
|
+
stroke: stroke !== "none" ? stroke : ""
|
|
59725
59960
|
},
|
|
59726
59961
|
style: {
|
|
59727
59962
|
fill,
|
|
59728
59963
|
stroke
|
|
59729
59964
|
}
|
|
59730
59965
|
});
|
|
59731
|
-
el.states.emphasis = emphasisState;
|
|
59732
59966
|
group.add(el);
|
|
59967
|
+
el.states.emphasis = emphasisState;
|
|
59733
59968
|
});
|
|
59734
59969
|
each(wickPointsByColor, function(points4, key) {
|
|
59735
59970
|
const [stroke] = key.split(":");
|
|
59736
59971
|
const el = new WickPath_default({
|
|
59737
59972
|
shape: {
|
|
59738
|
-
points: points4
|
|
59973
|
+
points: points4,
|
|
59974
|
+
isMobile,
|
|
59975
|
+
stroke: stroke !== "none" ? stroke : ""
|
|
59739
59976
|
},
|
|
59740
59977
|
style: {
|
|
59741
59978
|
stroke
|
|
@@ -59750,8 +59987,6 @@ var CandlePlotView2 = class extends Chart_default {
|
|
|
59750
59987
|
} else {
|
|
59751
59988
|
this.group.removeClipPath();
|
|
59752
59989
|
}
|
|
59753
|
-
toggleHoverEmphasis(this.group, null, null, false);
|
|
59754
|
-
getECData(this.group).groupId = groupId;
|
|
59755
59990
|
}
|
|
59756
59991
|
remove(ecModel) {
|
|
59757
59992
|
this._clear();
|
|
@@ -59880,10 +60115,18 @@ var candlePlotLayout = {
|
|
|
59880
60115
|
const highestVal = store.get(highestDimI, dataIndex);
|
|
59881
60116
|
const ocLow = Math.min(openVal, closeVal);
|
|
59882
60117
|
const ocHigh = Math.max(openVal, closeVal);
|
|
59883
|
-
const
|
|
59884
|
-
const
|
|
59885
|
-
const
|
|
59886
|
-
const
|
|
60118
|
+
const [ocLowX, ocLowY] = coordSys.dataToPoint([axisDimVal, ocLow]);
|
|
60119
|
+
const x = ocLowX + 0.5;
|
|
60120
|
+
const ocLowPoint = [x, Math.floor(ocLowY)];
|
|
60121
|
+
const ocHighPoint = coordSys.dataToPoint([axisDimVal, ocHigh]);
|
|
60122
|
+
ocHighPoint[0] = x;
|
|
60123
|
+
ocHighPoint[1] = Math.floor(ocHighPoint[1]);
|
|
60124
|
+
const lowestPoint = coordSys.dataToPoint([axisDimVal, lowestVal]);
|
|
60125
|
+
lowestPoint[0] = x;
|
|
60126
|
+
lowestPoint[1] = Math.floor(lowestPoint[1]);
|
|
60127
|
+
const highestPoint = coordSys.dataToPoint([axisDimVal, highestVal]);
|
|
60128
|
+
highestPoint[0] = x;
|
|
60129
|
+
highestPoint[1] = Math.floor(highestPoint[1]);
|
|
59887
60130
|
const itemModel = candleData.getItemModel(dataIndex);
|
|
59888
60131
|
const hasDojiColor = !!itemModel.get(["itemStyle", "borderColorDoji"]);
|
|
59889
60132
|
const sign = getSign2(store, dataIndex, openVal, closeVal, closeDimI, hasDojiColor);
|
|
@@ -59909,19 +60152,6 @@ var candlePlotLayout = {
|
|
|
59909
60152
|
wickPointsByColor,
|
|
59910
60153
|
isSimpleBox
|
|
59911
60154
|
});
|
|
59912
|
-
function getPoint(val, axisDimVal) {
|
|
59913
|
-
const p = [];
|
|
59914
|
-
p[cDimIdx] = axisDimVal;
|
|
59915
|
-
p[vDimIdx] = val;
|
|
59916
|
-
const points4 = isNaN(axisDimVal) || isNaN(val) ? [NaN, NaN] : coordSys.dataToPoint(p);
|
|
59917
|
-
if (!isNaN(points4[0])) {
|
|
59918
|
-
points4[0] = points4[0] + 0.5;
|
|
59919
|
-
}
|
|
59920
|
-
if (!isNaN(points4[1])) {
|
|
59921
|
-
points4[1] = Math.floor(points4[1]);
|
|
59922
|
-
}
|
|
59923
|
-
return points4;
|
|
59924
|
-
}
|
|
59925
60155
|
function addBodyEnd(ends, point, start2) {
|
|
59926
60156
|
const point1 = point.slice();
|
|
59927
60157
|
const point2 = point.slice();
|
|
@@ -60598,9 +60828,9 @@ var LabelsView2 = class extends Chart_default {
|
|
|
60598
60828
|
const data = seriesModel.getData();
|
|
60599
60829
|
this.seriesModel = seriesModel;
|
|
60600
60830
|
this.api = api2;
|
|
60831
|
+
this._renderTooltipSymbol(data, seriesModel);
|
|
60601
60832
|
this._renderSymbol(data, seriesModel);
|
|
60602
60833
|
this._renderText(data, seriesModel);
|
|
60603
|
-
this._renderTooltipSymbol(data, seriesModel);
|
|
60604
60834
|
toggleHoverEmphasis(this.group, null, null, false);
|
|
60605
60835
|
const groupId = seriesModel.get("groupId");
|
|
60606
60836
|
getECData(this.group).groupId = groupId;
|
|
@@ -60616,6 +60846,7 @@ var LabelsView2 = class extends Chart_default {
|
|
|
60616
60846
|
const textGroup = this._textGroup;
|
|
60617
60847
|
const textList = data.getLayout("textList");
|
|
60618
60848
|
const emphasisState = seriesModel.get("emphasis").emphasisState;
|
|
60849
|
+
const isShape = seriesModel.get("isShape");
|
|
60619
60850
|
each(textList, function(item) {
|
|
60620
60851
|
const {
|
|
60621
60852
|
text,
|
|
@@ -60643,7 +60874,8 @@ var LabelsView2 = class extends Chart_default {
|
|
|
60643
60874
|
y: point[1] + offset[1],
|
|
60644
60875
|
fontStyle,
|
|
60645
60876
|
fontWeight
|
|
60646
|
-
}
|
|
60877
|
+
},
|
|
60878
|
+
silent: !isShape
|
|
60647
60879
|
});
|
|
60648
60880
|
el.states.emphasis = emphasisState;
|
|
60649
60881
|
textGroup.add(el);
|
|
@@ -61453,14 +61685,45 @@ var FillPolyPath = class extends Path_default {
|
|
|
61453
61685
|
}
|
|
61454
61686
|
getDefaultStyle() {
|
|
61455
61687
|
return {
|
|
61456
|
-
stroke: "
|
|
61688
|
+
stroke: "none"
|
|
61457
61689
|
};
|
|
61458
61690
|
}
|
|
61459
61691
|
getDefaultShape() {
|
|
61460
61692
|
return new FillPolyShape();
|
|
61461
61693
|
}
|
|
61462
61694
|
buildPath(ctx2, shape) {
|
|
61463
|
-
const {points: points4} = shape;
|
|
61695
|
+
const {points: points4, isWebviewRender, fill} = shape;
|
|
61696
|
+
if (isWebviewRender) {
|
|
61697
|
+
const fillCount = 3;
|
|
61698
|
+
for (let index = 0; index < points4.length; index++) {
|
|
61699
|
+
const polyPoints = points4[index];
|
|
61700
|
+
const midIndex = polyPoints.length / 2;
|
|
61701
|
+
let startIndex = 0;
|
|
61702
|
+
for (let i = 0; i < midIndex; i++) {
|
|
61703
|
+
const [x, y] = polyPoints[i];
|
|
61704
|
+
if (i === startIndex) {
|
|
61705
|
+
ctx2.moveTo(x, y);
|
|
61706
|
+
continue;
|
|
61707
|
+
}
|
|
61708
|
+
ctx2.lineTo(x, y);
|
|
61709
|
+
if (i % fillCount === 0) {
|
|
61710
|
+
for (let k = polyPoints.length - i - 1; k < polyPoints.length - startIndex; k++) {
|
|
61711
|
+
ctx2.lineTo(polyPoints[k][0], polyPoints[k][1]);
|
|
61712
|
+
}
|
|
61713
|
+
ctx2.closePath();
|
|
61714
|
+
ctx2.fillStyle(fill);
|
|
61715
|
+
ctx2.beginPathFill();
|
|
61716
|
+
startIndex = i + 1;
|
|
61717
|
+
} else if (i + 1 === midIndex) {
|
|
61718
|
+
for (let k = polyPoints.length - midIndex; k < polyPoints.length - i + (midIndex - startIndex - 1); k++) {
|
|
61719
|
+
ctx2.lineTo(polyPoints[k][0], polyPoints[k][1]);
|
|
61720
|
+
}
|
|
61721
|
+
ctx2.closePath();
|
|
61722
|
+
}
|
|
61723
|
+
}
|
|
61724
|
+
}
|
|
61725
|
+
return;
|
|
61726
|
+
}
|
|
61464
61727
|
for (let index = 0; index < points4.length; index++) {
|
|
61465
61728
|
const polyPoints = points4[index];
|
|
61466
61729
|
for (let i = 0; i < polyPoints.length; i++) {
|
|
@@ -61491,6 +61754,7 @@ var FillsView2 = class extends Chart_default {
|
|
|
61491
61754
|
render(seriesModel, ecModel, api2) {
|
|
61492
61755
|
const data = seriesModel.getData();
|
|
61493
61756
|
const pointsByColor = data.getLayout("pointsByColor");
|
|
61757
|
+
const isMobile = seriesModel.get("isMobile");
|
|
61494
61758
|
if (!this._polygonGroup) {
|
|
61495
61759
|
this._polygonGroup = new Group_default();
|
|
61496
61760
|
this.group.add(this._polygonGroup);
|
|
@@ -61525,7 +61789,9 @@ var FillsView2 = class extends Chart_default {
|
|
|
61525
61789
|
}
|
|
61526
61790
|
const el = new FillPolyPath_default({
|
|
61527
61791
|
shape: {
|
|
61528
|
-
points: points4
|
|
61792
|
+
points: points4,
|
|
61793
|
+
isWebviewRender: isMobile,
|
|
61794
|
+
fill
|
|
61529
61795
|
},
|
|
61530
61796
|
style: {
|
|
61531
61797
|
fill,
|
|
@@ -69857,12 +70123,12 @@ var each15 = each;
|
|
|
69857
70123
|
var asc2 = asc;
|
|
69858
70124
|
var leftMinVisibleBarCount = 2;
|
|
69859
70125
|
var rightMinVisibleBarCount = 2;
|
|
69860
|
-
var triggerVisibleChanged =
|
|
70126
|
+
var triggerVisibleChanged = throttleRAF((api2, params) => {
|
|
69861
70127
|
api2.trigger("visiblechanged", params);
|
|
69862
70128
|
}, 20);
|
|
69863
70129
|
var AxisProxy = class {
|
|
69864
70130
|
constructor(dimName, axisIndex, dataZoomModel, ecModel) {
|
|
69865
|
-
this.
|
|
70131
|
+
this._lastVisibleChangeTime = 0;
|
|
69866
70132
|
this._dimName = dimName;
|
|
69867
70133
|
this._axisIndex = axisIndex;
|
|
69868
70134
|
this.ecModel = ecModel;
|
|
@@ -69903,6 +70169,14 @@ var AxisProxy = class {
|
|
|
69903
70169
|
getMinMaxSpan() {
|
|
69904
70170
|
return clone(this._minMaxSpan);
|
|
69905
70171
|
}
|
|
70172
|
+
_throttleVisibleChanged(api2, params) {
|
|
70173
|
+
const time = Date.now();
|
|
70174
|
+
if (this._lastVisibleChangeTime && time - this._lastVisibleChangeTime < 20) {
|
|
70175
|
+
return;
|
|
70176
|
+
}
|
|
70177
|
+
api2.trigger("visiblechanged", params);
|
|
70178
|
+
this._lastVisibleChangeTime = time;
|
|
70179
|
+
}
|
|
69906
70180
|
calculateDataWindow(opt) {
|
|
69907
70181
|
const dataExtent = this._dataExtent;
|
|
69908
70182
|
const axisModel = this.getAxisModel();
|
|
@@ -69999,8 +70273,8 @@ var AxisProxy = class {
|
|
|
69999
70273
|
if (from < 0 && !dataZoomModel.isDragging) {
|
|
70000
70274
|
api2.trigger("loadmore", [from, to]);
|
|
70001
70275
|
}
|
|
70002
|
-
const visibleFrom = Math.max(0, Math.
|
|
70003
|
-
const visibleTo = Math.min(
|
|
70276
|
+
const visibleFrom = Math.max(0, Math.round(to - barCount));
|
|
70277
|
+
const visibleTo = Math.min(Math.round(lastBarRightSideDiffBarCount + dataCount - 0.5), dataCount - 1);
|
|
70004
70278
|
const messageCenter = dataZoomModel.ecModel.scheduler.ecInstance.getMessageCenter();
|
|
70005
70279
|
this._throttleVisibleChanged(messageCenter, {
|
|
70006
70280
|
from,
|
|
@@ -70208,6 +70482,11 @@ function calculateDataExtent(axisProxy, axisDim, seriesModels) {
|
|
|
70208
70482
|
baseValue = seriesData.getBaseValue(dim);
|
|
70209
70483
|
}
|
|
70210
70484
|
unionAxisExtentFromData(dataExtent, seriesData, axisDim, baseValue);
|
|
70485
|
+
const histbase = seriesModel.get("histbase");
|
|
70486
|
+
if (axisDim === "y" && histbase !== void 0) {
|
|
70487
|
+
histbase < dataExtent[0] && (dataExtent[0] = histbase);
|
|
70488
|
+
histbase > dataExtent[1] && (dataExtent[1] = histbase);
|
|
70489
|
+
}
|
|
70211
70490
|
});
|
|
70212
70491
|
const rawExtentResult = ensureScaleRawExtentInfo(axisModel.axis.scale, axisModel, dataExtent).calculate();
|
|
70213
70492
|
return {
|
|
@@ -71816,7 +72095,7 @@ function toCSSVendorPrefix(styleVendor, styleProp) {
|
|
|
71816
72095
|
styleVendor = idx === -1 ? styleProp : `-${styleVendor.slice(0, idx)}-${styleProp}`;
|
|
71817
72096
|
return styleVendor.toLowerCase();
|
|
71818
72097
|
}
|
|
71819
|
-
function
|
|
72098
|
+
function getComputedStyle2(el, style) {
|
|
71820
72099
|
const stl = el.currentStyle || document.defaultView && document.defaultView.getComputedStyle(el);
|
|
71821
72100
|
return stl ? style ? stl[style] : stl : null;
|
|
71822
72101
|
}
|
|
@@ -71998,7 +72277,7 @@ var TooltipHTMLContent2 = class {
|
|
|
71998
72277
|
update(tooltipModel) {
|
|
71999
72278
|
if (!this._container) {
|
|
72000
72279
|
const container = this._api.getDom();
|
|
72001
|
-
const position2 =
|
|
72280
|
+
const position2 = getComputedStyle2(container, "position");
|
|
72002
72281
|
const domStyle = container.style;
|
|
72003
72282
|
if (domStyle.position !== "absolute" && position2 !== "absolute") {
|
|
72004
72283
|
domStyle.position = "relative";
|