tvcharts 0.6.60 → 0.6.62
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 +1092 -732
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -2
- package/lib/chart/boxes/BoxesSeries.js +2 -1
- package/lib/chart/boxes/BoxesView.js +1 -1
- package/lib/chart/charPlot/CharPlotLayout.js +139 -0
- package/lib/chart/charPlot/CharPlotSeries.js +102 -0
- package/lib/chart/charPlot/CharPlotView.js +127 -0
- package/lib/chart/charPlot/install.js +53 -0
- package/lib/chart/charPlot/util.js +46 -0
- package/lib/chart/fills/FillsView.js +1 -0
- package/lib/chart/lineFills/LineFillsSeries.js +2 -1
- package/lib/chart/mineLines/MineLinesSeries.js +2 -1
- package/lib/export/charts.js +1 -0
- package/lib/model/Global.js +1 -0
- package/lib/util/states.js +1 -1
- package/package.json +1 -1
- package/types/dist/charts.d.ts +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +6 -4
- package/types/src/chart/charPlot/CharPlotLayout.d.ts +3 -0
- package/types/src/chart/charPlot/CharPlotSeries.d.ts +51 -0
- package/types/src/chart/charPlot/CharPlotView.d.ts +21 -0
- package/types/src/chart/charPlot/install.d.ts +2 -0
- package/types/src/chart/charPlot/util.d.ts +4 -0
- package/types/src/export/charts.d.ts +1 -0
package/dist/echarts.js
CHANGED
|
@@ -247,8 +247,8 @@ var platformApi = {
|
|
|
247
247
|
let _cachedFont;
|
|
248
248
|
return (text, font) => {
|
|
249
249
|
if (!_ctx) {
|
|
250
|
-
const
|
|
251
|
-
_ctx =
|
|
250
|
+
const canvas2 = platformApi.createCanvas();
|
|
251
|
+
_ctx = canvas2 && canvas2.getContext("2d");
|
|
252
252
|
}
|
|
253
253
|
if (_ctx) {
|
|
254
254
|
if (_cachedFont !== font) {
|
|
@@ -1250,7 +1250,7 @@ var Eventful = class {
|
|
|
1250
1250
|
const eventProcessor = this._$eventProcessor;
|
|
1251
1251
|
if (_h) {
|
|
1252
1252
|
const argLen = args.length;
|
|
1253
|
-
const
|
|
1253
|
+
const ctx2 = args[argLen - 1];
|
|
1254
1254
|
const len2 = _h.length;
|
|
1255
1255
|
for (let i = 0; i < len2; i++) {
|
|
1256
1256
|
const hItem = _h[i];
|
|
@@ -1259,16 +1259,16 @@ var Eventful = class {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
switch (argLen) {
|
|
1261
1261
|
case 0:
|
|
1262
|
-
hItem.h.call(
|
|
1262
|
+
hItem.h.call(ctx2);
|
|
1263
1263
|
break;
|
|
1264
1264
|
case 1:
|
|
1265
|
-
hItem.h.call(
|
|
1265
|
+
hItem.h.call(ctx2, args[0]);
|
|
1266
1266
|
break;
|
|
1267
1267
|
case 2:
|
|
1268
|
-
hItem.h.call(
|
|
1268
|
+
hItem.h.call(ctx2, args[0], args[1]);
|
|
1269
1269
|
break;
|
|
1270
1270
|
default:
|
|
1271
|
-
hItem.h.apply(
|
|
1271
|
+
hItem.h.apply(ctx2, args.slice(1, argLen - 1));
|
|
1272
1272
|
break;
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
@@ -9199,8 +9199,8 @@ var PathProxy2 = class {
|
|
|
9199
9199
|
setDPR(dpr2) {
|
|
9200
9200
|
this.dpr = dpr2;
|
|
9201
9201
|
}
|
|
9202
|
-
setContext(
|
|
9203
|
-
this._ctx =
|
|
9202
|
+
setContext(ctx2) {
|
|
9203
|
+
this._ctx = ctx2;
|
|
9204
9204
|
}
|
|
9205
9205
|
getContext() {
|
|
9206
9206
|
return this._ctx;
|
|
@@ -9325,22 +9325,22 @@ var PathProxy2 = class {
|
|
|
9325
9325
|
closePath() {
|
|
9326
9326
|
this._drawPendingPt();
|
|
9327
9327
|
this.addData(CMD.Z);
|
|
9328
|
-
const
|
|
9328
|
+
const ctx2 = this._ctx;
|
|
9329
9329
|
const x0 = this._x0;
|
|
9330
9330
|
const y0 = this._y0;
|
|
9331
|
-
if (
|
|
9332
|
-
|
|
9331
|
+
if (ctx2) {
|
|
9332
|
+
ctx2.closePath();
|
|
9333
9333
|
}
|
|
9334
9334
|
this._xi = x0;
|
|
9335
9335
|
this._yi = y0;
|
|
9336
9336
|
return this;
|
|
9337
9337
|
}
|
|
9338
|
-
fill(
|
|
9339
|
-
|
|
9338
|
+
fill(ctx2) {
|
|
9339
|
+
ctx2 && ctx2.fill();
|
|
9340
9340
|
this.toStatic();
|
|
9341
9341
|
}
|
|
9342
|
-
stroke(
|
|
9343
|
-
|
|
9342
|
+
stroke(ctx2) {
|
|
9343
|
+
ctx2 && ctx2.stroke();
|
|
9344
9344
|
this.toStatic();
|
|
9345
9345
|
}
|
|
9346
9346
|
len() {
|
|
@@ -9615,7 +9615,7 @@ var PathProxy2 = class {
|
|
|
9615
9615
|
this._pathLen = pathTotalLen;
|
|
9616
9616
|
return pathTotalLen;
|
|
9617
9617
|
}
|
|
9618
|
-
rebuildPath(
|
|
9618
|
+
rebuildPath(ctx2, percent) {
|
|
9619
9619
|
const d = this.data;
|
|
9620
9620
|
const ux = this._ux;
|
|
9621
9621
|
const uy = this._uy;
|
|
@@ -9657,14 +9657,14 @@ var PathProxy2 = class {
|
|
|
9657
9657
|
y0 = yi;
|
|
9658
9658
|
}
|
|
9659
9659
|
if (cmd !== CMD.L && pendingPtDist > 0) {
|
|
9660
|
-
|
|
9660
|
+
ctx2.lineTo(pendingPtX, pendingPtY);
|
|
9661
9661
|
pendingPtDist = 0;
|
|
9662
9662
|
}
|
|
9663
9663
|
switch (cmd) {
|
|
9664
9664
|
case CMD.M:
|
|
9665
9665
|
x0 = xi = d[i++];
|
|
9666
9666
|
y0 = yi = d[i++];
|
|
9667
|
-
|
|
9667
|
+
ctx2.moveTo(xi, yi);
|
|
9668
9668
|
break;
|
|
9669
9669
|
case CMD.L: {
|
|
9670
9670
|
x = d[i++];
|
|
@@ -9676,12 +9676,12 @@ var PathProxy2 = class {
|
|
|
9676
9676
|
const l = pathSegLen[segCount++];
|
|
9677
9677
|
if (accumLength + l > displayedLength) {
|
|
9678
9678
|
const t = (displayedLength - accumLength) / l;
|
|
9679
|
-
|
|
9679
|
+
ctx2.lineTo(xi * (1 - t) + x * t, yi * (1 - t) + y * t);
|
|
9680
9680
|
break lo;
|
|
9681
9681
|
}
|
|
9682
9682
|
accumLength += l;
|
|
9683
9683
|
}
|
|
9684
|
-
|
|
9684
|
+
ctx2.lineTo(x, y);
|
|
9685
9685
|
xi = x;
|
|
9686
9686
|
yi = y;
|
|
9687
9687
|
pendingPtDist = 0;
|
|
@@ -9708,12 +9708,12 @@ var PathProxy2 = class {
|
|
|
9708
9708
|
const t = (displayedLength - accumLength) / l;
|
|
9709
9709
|
cubicSubdivide(xi, x1, x2, x3, t, tmpOutX);
|
|
9710
9710
|
cubicSubdivide(yi, y1, y2, y3, t, tmpOutY);
|
|
9711
|
-
|
|
9711
|
+
ctx2.bezierCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2], tmpOutX[3], tmpOutY[3]);
|
|
9712
9712
|
break lo;
|
|
9713
9713
|
}
|
|
9714
9714
|
accumLength += l;
|
|
9715
9715
|
}
|
|
9716
|
-
|
|
9716
|
+
ctx2.bezierCurveTo(x1, y1, x2, y2, x3, y3);
|
|
9717
9717
|
xi = x3;
|
|
9718
9718
|
yi = y3;
|
|
9719
9719
|
break;
|
|
@@ -9729,12 +9729,12 @@ var PathProxy2 = class {
|
|
|
9729
9729
|
const t = (displayedLength - accumLength) / l;
|
|
9730
9730
|
quadraticSubdivide(xi, x1, x2, t, tmpOutX);
|
|
9731
9731
|
quadraticSubdivide(yi, y1, y2, t, tmpOutY);
|
|
9732
|
-
|
|
9732
|
+
ctx2.quadraticCurveTo(tmpOutX[1], tmpOutY[1], tmpOutX[2], tmpOutY[2]);
|
|
9733
9733
|
break lo;
|
|
9734
9734
|
}
|
|
9735
9735
|
accumLength += l;
|
|
9736
9736
|
}
|
|
9737
|
-
|
|
9737
|
+
ctx2.quadraticCurveTo(x1, y1, x2, y2);
|
|
9738
9738
|
xi = x2;
|
|
9739
9739
|
yi = y2;
|
|
9740
9740
|
break;
|
|
@@ -9760,10 +9760,10 @@ var PathProxy2 = class {
|
|
|
9760
9760
|
}
|
|
9761
9761
|
accumLength += l;
|
|
9762
9762
|
}
|
|
9763
|
-
if (isEllipse &&
|
|
9764
|
-
|
|
9763
|
+
if (isEllipse && ctx2.ellipse) {
|
|
9764
|
+
ctx2.ellipse(cx, cy, rx, ry, psi, startAngle, endAngle, anticlockwise);
|
|
9765
9765
|
} else {
|
|
9766
|
-
|
|
9766
|
+
ctx2.arc(cx, cy, r, startAngle, endAngle, anticlockwise);
|
|
9767
9767
|
}
|
|
9768
9768
|
if (breakBuild) {
|
|
9769
9769
|
break lo;
|
|
@@ -9786,33 +9786,33 @@ var PathProxy2 = class {
|
|
|
9786
9786
|
const l = pathSegLen[segCount++];
|
|
9787
9787
|
if (accumLength + l > displayedLength) {
|
|
9788
9788
|
let d2 = displayedLength - accumLength;
|
|
9789
|
-
|
|
9790
|
-
|
|
9789
|
+
ctx2.moveTo(x, y);
|
|
9790
|
+
ctx2.lineTo(x + mathMin3(d2, width), y);
|
|
9791
9791
|
d2 -= width;
|
|
9792
9792
|
if (d2 > 0) {
|
|
9793
|
-
|
|
9793
|
+
ctx2.lineTo(x + width, y + mathMin3(d2, height));
|
|
9794
9794
|
}
|
|
9795
9795
|
d2 -= height;
|
|
9796
9796
|
if (d2 > 0) {
|
|
9797
|
-
|
|
9797
|
+
ctx2.lineTo(x + mathMax3(width - d2, 0), y + height);
|
|
9798
9798
|
}
|
|
9799
9799
|
d2 -= width;
|
|
9800
9800
|
if (d2 > 0) {
|
|
9801
|
-
|
|
9801
|
+
ctx2.lineTo(x, y + mathMax3(height - d2, 0));
|
|
9802
9802
|
}
|
|
9803
9803
|
break lo;
|
|
9804
9804
|
}
|
|
9805
9805
|
accumLength += l;
|
|
9806
9806
|
}
|
|
9807
|
-
|
|
9807
|
+
ctx2.rect(x, y, width, height);
|
|
9808
9808
|
break;
|
|
9809
9809
|
case CMD.F: {
|
|
9810
9810
|
const r2 = d[i++];
|
|
9811
9811
|
const g = d[i++];
|
|
9812
9812
|
const b = d[i++];
|
|
9813
9813
|
const a = d[i++];
|
|
9814
|
-
|
|
9815
|
-
|
|
9814
|
+
ctx2.fillStyle = `rgba(${r2},${g},${b},${a})`;
|
|
9815
|
+
ctx2.fill();
|
|
9816
9816
|
break;
|
|
9817
9817
|
}
|
|
9818
9818
|
case CMD.S: {
|
|
@@ -9820,24 +9820,24 @@ var PathProxy2 = class {
|
|
|
9820
9820
|
const g = d[i++];
|
|
9821
9821
|
const b = d[i++];
|
|
9822
9822
|
const a = d[i++];
|
|
9823
|
-
|
|
9824
|
-
|
|
9823
|
+
ctx2.strokeStyle = `rgba(${r2},${g},${b},${a})`;
|
|
9824
|
+
ctx2.stroke();
|
|
9825
9825
|
break;
|
|
9826
9826
|
}
|
|
9827
9827
|
case CMD.B:
|
|
9828
|
-
|
|
9828
|
+
ctx2.beginPath();
|
|
9829
9829
|
break;
|
|
9830
9830
|
case CMD.Z:
|
|
9831
9831
|
if (drawPart) {
|
|
9832
9832
|
const l = pathSegLen[segCount++];
|
|
9833
9833
|
if (accumLength + l > displayedLength) {
|
|
9834
9834
|
const t = (displayedLength - accumLength) / l;
|
|
9835
|
-
|
|
9835
|
+
ctx2.lineTo(xi * (1 - t) + x0 * t, yi * (1 - t) + y0 * t);
|
|
9836
9836
|
break lo;
|
|
9837
9837
|
}
|
|
9838
9838
|
accumLength += l;
|
|
9839
9839
|
}
|
|
9840
|
-
|
|
9840
|
+
ctx2.closePath();
|
|
9841
9841
|
xi = x0;
|
|
9842
9842
|
yi = y0;
|
|
9843
9843
|
}
|
|
@@ -10299,8 +10299,8 @@ var Path2 = class extends Displayable_default {
|
|
|
10299
10299
|
if (style.decal) {
|
|
10300
10300
|
const decalEl = this._decalEl = this._decalEl || new Path2();
|
|
10301
10301
|
if (decalEl.buildPath === Path2.prototype.buildPath) {
|
|
10302
|
-
decalEl.buildPath = (
|
|
10303
|
-
this.buildPath(
|
|
10302
|
+
decalEl.buildPath = (ctx2) => {
|
|
10303
|
+
this.buildPath(ctx2, this.shape);
|
|
10304
10304
|
};
|
|
10305
10305
|
}
|
|
10306
10306
|
decalEl.silent = true;
|
|
@@ -10388,7 +10388,7 @@ var Path2 = class extends Displayable_default {
|
|
|
10388
10388
|
}
|
|
10389
10389
|
}
|
|
10390
10390
|
}
|
|
10391
|
-
buildPath(
|
|
10391
|
+
buildPath(ctx2, shapeCfg, inBatch) {
|
|
10392
10392
|
}
|
|
10393
10393
|
pathUpdated() {
|
|
10394
10394
|
this.__dirty &= ~SHAPE_CHANGED_BIT;
|
|
@@ -10750,7 +10750,7 @@ ZRImage.prototype.type = "image";
|
|
|
10750
10750
|
var Image_default = ZRImage;
|
|
10751
10751
|
|
|
10752
10752
|
// node_modules/tvrender/src/graphic/helper/roundRect.ts
|
|
10753
|
-
function buildPath(
|
|
10753
|
+
function buildPath(ctx2, shape) {
|
|
10754
10754
|
let x = shape.x;
|
|
10755
10755
|
let y = shape.y;
|
|
10756
10756
|
let width = shape.width;
|
|
@@ -10810,15 +10810,15 @@ function buildPath(ctx, shape) {
|
|
|
10810
10810
|
r1 *= height / total;
|
|
10811
10811
|
r4 *= height / total;
|
|
10812
10812
|
}
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
r2 !== 0 &&
|
|
10816
|
-
|
|
10817
|
-
r3 !== 0 &&
|
|
10818
|
-
|
|
10819
|
-
r4 !== 0 &&
|
|
10820
|
-
|
|
10821
|
-
r1 !== 0 &&
|
|
10813
|
+
ctx2.moveTo(x + r1, y);
|
|
10814
|
+
ctx2.lineTo(x + width - r2, y);
|
|
10815
|
+
r2 !== 0 && ctx2.arc(x + width - r2, y + r2, r2, -Math.PI / 2, 0);
|
|
10816
|
+
ctx2.lineTo(x + width, y + height - r3);
|
|
10817
|
+
r3 !== 0 && ctx2.arc(x + width - r3, y + height - r3, r3, 0, Math.PI / 2);
|
|
10818
|
+
ctx2.lineTo(x + r4, y + height);
|
|
10819
|
+
r4 !== 0 && ctx2.arc(x + r4, y + height - r4, r4, Math.PI / 2, Math.PI);
|
|
10820
|
+
ctx2.lineTo(x, y + r1);
|
|
10821
|
+
r1 !== 0 && ctx2.arc(x + r1, y + r1, r1, Math.PI, Math.PI * 1.5);
|
|
10822
10822
|
}
|
|
10823
10823
|
|
|
10824
10824
|
// node_modules/tvrender/src/graphic/helper/subPixelOptimize.ts
|
|
@@ -10894,7 +10894,7 @@ var Rect = class extends Path_default {
|
|
|
10894
10894
|
getDefaultShape() {
|
|
10895
10895
|
return new RectShape();
|
|
10896
10896
|
}
|
|
10897
|
-
buildPath(
|
|
10897
|
+
buildPath(ctx2, shape) {
|
|
10898
10898
|
let x;
|
|
10899
10899
|
let y;
|
|
10900
10900
|
let width;
|
|
@@ -10914,9 +10914,9 @@ var Rect = class extends Path_default {
|
|
|
10914
10914
|
height = shape.height;
|
|
10915
10915
|
}
|
|
10916
10916
|
if (!shape.r) {
|
|
10917
|
-
|
|
10917
|
+
ctx2.rect(x, y, width, height);
|
|
10918
10918
|
} else {
|
|
10919
|
-
buildPath(
|
|
10919
|
+
buildPath(ctx2, shape);
|
|
10920
10920
|
}
|
|
10921
10921
|
}
|
|
10922
10922
|
isZeroArea() {
|
|
@@ -12494,13 +12494,13 @@ function createPathOptions(str, opts) {
|
|
|
12494
12494
|
innerOpts.buildPath = function(path) {
|
|
12495
12495
|
if (isPathProxy(path)) {
|
|
12496
12496
|
path.setData(pathProxy.data);
|
|
12497
|
-
const
|
|
12498
|
-
if (
|
|
12499
|
-
path.rebuildPath(
|
|
12497
|
+
const ctx2 = path.getContext();
|
|
12498
|
+
if (ctx2) {
|
|
12499
|
+
path.rebuildPath(ctx2, 1);
|
|
12500
12500
|
}
|
|
12501
12501
|
} else {
|
|
12502
|
-
const
|
|
12503
|
-
pathProxy.rebuildPath(
|
|
12502
|
+
const ctx2 = path;
|
|
12503
|
+
pathProxy.rebuildPath(ctx2, 1);
|
|
12504
12504
|
}
|
|
12505
12505
|
};
|
|
12506
12506
|
innerOpts.applyTransform = function(m2) {
|
|
@@ -12535,9 +12535,9 @@ function mergePath(pathEls, opts) {
|
|
|
12535
12535
|
pathBundle.buildPath = function(path) {
|
|
12536
12536
|
if (isPathProxy(path)) {
|
|
12537
12537
|
path.appendPath(pathList);
|
|
12538
|
-
const
|
|
12539
|
-
if (
|
|
12540
|
-
path.rebuildPath(
|
|
12538
|
+
const ctx2 = path.getContext();
|
|
12539
|
+
if (ctx2) {
|
|
12540
|
+
path.rebuildPath(ctx2, 1);
|
|
12541
12541
|
}
|
|
12542
12542
|
}
|
|
12543
12543
|
};
|
|
@@ -12582,9 +12582,9 @@ var Circle = class extends Path_default {
|
|
|
12582
12582
|
getDefaultShape() {
|
|
12583
12583
|
return new CircleShape();
|
|
12584
12584
|
}
|
|
12585
|
-
buildPath(
|
|
12586
|
-
|
|
12587
|
-
|
|
12585
|
+
buildPath(ctx2, shape) {
|
|
12586
|
+
ctx2.moveTo(shape.cx + shape.r, shape.cy);
|
|
12587
|
+
ctx2.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2);
|
|
12588
12588
|
}
|
|
12589
12589
|
};
|
|
12590
12590
|
Circle.prototype.type = "circle";
|
|
@@ -12606,7 +12606,7 @@ var Ellipse = class extends Path_default {
|
|
|
12606
12606
|
getDefaultShape() {
|
|
12607
12607
|
return new EllipseShape();
|
|
12608
12608
|
}
|
|
12609
|
-
buildPath(
|
|
12609
|
+
buildPath(ctx2, shape) {
|
|
12610
12610
|
const k = 0.5522848;
|
|
12611
12611
|
const x = shape.cx;
|
|
12612
12612
|
const y = shape.cy;
|
|
@@ -12614,12 +12614,12 @@ var Ellipse = class extends Path_default {
|
|
|
12614
12614
|
const b = shape.ry;
|
|
12615
12615
|
const ox = a * k;
|
|
12616
12616
|
const oy = b * k;
|
|
12617
|
-
|
|
12618
|
-
|
|
12619
|
-
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12617
|
+
ctx2.moveTo(x - a, y);
|
|
12618
|
+
ctx2.bezierCurveTo(x - a, y - oy, x - ox, y - b, x, y - b);
|
|
12619
|
+
ctx2.bezierCurveTo(x + ox, y - b, x + a, y - oy, x + a, y);
|
|
12620
|
+
ctx2.bezierCurveTo(x + a, y + oy, x + ox, y + b, x, y + b);
|
|
12621
|
+
ctx2.bezierCurveTo(x - ox, y + b, x - a, y + oy, x - a, y);
|
|
12622
|
+
ctx2.closePath();
|
|
12623
12623
|
}
|
|
12624
12624
|
};
|
|
12625
12625
|
Ellipse.prototype.type = "ellipse";
|
|
@@ -12709,7 +12709,7 @@ function normalizeCornerRadius(cr) {
|
|
|
12709
12709
|
}
|
|
12710
12710
|
return arr;
|
|
12711
12711
|
}
|
|
12712
|
-
function buildPath2(
|
|
12712
|
+
function buildPath2(ctx2, shape) {
|
|
12713
12713
|
let radius = mathMax4(shape.r, 0);
|
|
12714
12714
|
let innerRadius = mathMax4(shape.r0 || 0, 0);
|
|
12715
12715
|
const hasRadius = radius > 0;
|
|
@@ -12736,13 +12736,13 @@ function buildPath2(ctx, shape) {
|
|
|
12736
12736
|
const mod = arc2 > PI26 && arc2 % PI26;
|
|
12737
12737
|
mod > e && (arc2 = mod);
|
|
12738
12738
|
if (!(radius > e)) {
|
|
12739
|
-
|
|
12739
|
+
ctx2.moveTo(cx, cy);
|
|
12740
12740
|
} else if (arc2 > PI26 - e) {
|
|
12741
|
-
|
|
12742
|
-
|
|
12741
|
+
ctx2.moveTo(cx + radius * mathCos4(startAngle), cy + radius * mathSin4(startAngle));
|
|
12742
|
+
ctx2.arc(cx, cy, radius, startAngle, endAngle, !clockwise);
|
|
12743
12743
|
if (innerRadius > e) {
|
|
12744
|
-
|
|
12745
|
-
|
|
12744
|
+
ctx2.moveTo(cx + innerRadius * mathCos4(endAngle), cy + innerRadius * mathSin4(endAngle));
|
|
12745
|
+
ctx2.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise);
|
|
12746
12746
|
}
|
|
12747
12747
|
} else {
|
|
12748
12748
|
let icrStart;
|
|
@@ -12799,45 +12799,45 @@ function buildPath2(ctx, shape) {
|
|
|
12799
12799
|
}
|
|
12800
12800
|
}
|
|
12801
12801
|
if (!hasArc) {
|
|
12802
|
-
|
|
12802
|
+
ctx2.moveTo(cx + xrs, cy + yrs);
|
|
12803
12803
|
} else if (limitedOcrMax > e) {
|
|
12804
12804
|
const crStart = mathMin4(ocrStart, limitedOcrMax);
|
|
12805
12805
|
const crEnd = mathMin4(ocrEnd, limitedOcrMax);
|
|
12806
12806
|
const ct0 = computeCornerTangents(xirs, yirs, xrs, yrs, radius, crStart, clockwise);
|
|
12807
12807
|
const ct1 = computeCornerTangents(xre, yre, xire, yire, radius, crEnd, clockwise);
|
|
12808
|
-
|
|
12808
|
+
ctx2.moveTo(cx + ct0.cx + ct0.x0, cy + ct0.cy + ct0.y0);
|
|
12809
12809
|
if (limitedOcrMax < ocrMax && crStart === crEnd) {
|
|
12810
|
-
|
|
12810
|
+
ctx2.arc(cx + ct0.cx, cy + ct0.cy, limitedOcrMax, mathATan2(ct0.y0, ct0.x0), mathATan2(ct1.y0, ct1.x0), !clockwise);
|
|
12811
12811
|
} else {
|
|
12812
|
-
crStart > 0 &&
|
|
12813
|
-
|
|
12814
|
-
crEnd > 0 &&
|
|
12812
|
+
crStart > 0 && ctx2.arc(cx + ct0.cx, cy + ct0.cy, crStart, mathATan2(ct0.y0, ct0.x0), mathATan2(ct0.y1, ct0.x1), !clockwise);
|
|
12813
|
+
ctx2.arc(cx, cy, radius, mathATan2(ct0.cy + ct0.y1, ct0.cx + ct0.x1), mathATan2(ct1.cy + ct1.y1, ct1.cx + ct1.x1), !clockwise);
|
|
12814
|
+
crEnd > 0 && ctx2.arc(cx + ct1.cx, cy + ct1.cy, crEnd, mathATan2(ct1.y1, ct1.x1), mathATan2(ct1.y0, ct1.x0), !clockwise);
|
|
12815
12815
|
}
|
|
12816
12816
|
} else {
|
|
12817
|
-
|
|
12818
|
-
|
|
12817
|
+
ctx2.moveTo(cx + xrs, cy + yrs);
|
|
12818
|
+
ctx2.arc(cx, cy, radius, startAngle, endAngle, !clockwise);
|
|
12819
12819
|
}
|
|
12820
12820
|
if (!(innerRadius > e) || !hasArc) {
|
|
12821
|
-
|
|
12821
|
+
ctx2.lineTo(cx + xire, cy + yire);
|
|
12822
12822
|
} else if (limitedIcrMax > e) {
|
|
12823
12823
|
const crStart = mathMin4(icrStart, limitedIcrMax);
|
|
12824
12824
|
const crEnd = mathMin4(icrEnd, limitedIcrMax);
|
|
12825
12825
|
const ct0 = computeCornerTangents(xire, yire, xre, yre, innerRadius, -crEnd, clockwise);
|
|
12826
12826
|
const ct1 = computeCornerTangents(xrs, yrs, xirs, yirs, innerRadius, -crStart, clockwise);
|
|
12827
|
-
|
|
12827
|
+
ctx2.lineTo(cx + ct0.cx + ct0.x0, cy + ct0.cy + ct0.y0);
|
|
12828
12828
|
if (limitedIcrMax < icrMax && crStart === crEnd) {
|
|
12829
|
-
|
|
12829
|
+
ctx2.arc(cx + ct0.cx, cy + ct0.cy, limitedIcrMax, mathATan2(ct0.y0, ct0.x0), mathATan2(ct1.y0, ct1.x0), !clockwise);
|
|
12830
12830
|
} else {
|
|
12831
|
-
crEnd > 0 &&
|
|
12832
|
-
|
|
12833
|
-
crStart > 0 &&
|
|
12831
|
+
crEnd > 0 && ctx2.arc(cx + ct0.cx, cy + ct0.cy, crEnd, mathATan2(ct0.y0, ct0.x0), mathATan2(ct0.y1, ct0.x1), !clockwise);
|
|
12832
|
+
ctx2.arc(cx, cy, innerRadius, mathATan2(ct0.cy + ct0.y1, ct0.cx + ct0.x1), mathATan2(ct1.cy + ct1.y1, ct1.cx + ct1.x1), clockwise);
|
|
12833
|
+
crStart > 0 && ctx2.arc(cx + ct1.cx, cy + ct1.cy, crStart, mathATan2(ct1.y1, ct1.x1), mathATan2(ct1.y0, ct1.x0), !clockwise);
|
|
12834
12834
|
}
|
|
12835
12835
|
} else {
|
|
12836
|
-
|
|
12837
|
-
|
|
12836
|
+
ctx2.lineTo(cx + xire, cy + yire);
|
|
12837
|
+
ctx2.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise);
|
|
12838
12838
|
}
|
|
12839
12839
|
}
|
|
12840
|
-
|
|
12840
|
+
ctx2.closePath();
|
|
12841
12841
|
}
|
|
12842
12842
|
|
|
12843
12843
|
// node_modules/tvrender/src/graphic/shape/Sector.ts
|
|
@@ -12860,8 +12860,8 @@ var Sector = class extends Path_default {
|
|
|
12860
12860
|
getDefaultShape() {
|
|
12861
12861
|
return new SectorShape();
|
|
12862
12862
|
}
|
|
12863
|
-
buildPath(
|
|
12864
|
-
buildPath2(
|
|
12863
|
+
buildPath(ctx2, shape) {
|
|
12864
|
+
buildPath2(ctx2, shape);
|
|
12865
12865
|
}
|
|
12866
12866
|
isZeroArea() {
|
|
12867
12867
|
return this.shape.startAngle === this.shape.endAngle || this.shape.r === this.shape.r0;
|
|
@@ -12886,14 +12886,14 @@ var Ring = class extends Path_default {
|
|
|
12886
12886
|
getDefaultShape() {
|
|
12887
12887
|
return new RingShape();
|
|
12888
12888
|
}
|
|
12889
|
-
buildPath(
|
|
12889
|
+
buildPath(ctx2, shape) {
|
|
12890
12890
|
const x = shape.cx;
|
|
12891
12891
|
const y = shape.cy;
|
|
12892
12892
|
const PI210 = Math.PI * 2;
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12893
|
+
ctx2.moveTo(x + shape.r, y);
|
|
12894
|
+
ctx2.arc(x, y, shape.r, 0, PI210, false);
|
|
12895
|
+
ctx2.moveTo(x + shape.r0, y);
|
|
12896
|
+
ctx2.arc(x, y, shape.r0, 0, PI210, true);
|
|
12897
12897
|
}
|
|
12898
12898
|
};
|
|
12899
12899
|
Ring.prototype.type = "ring";
|
|
@@ -12962,27 +12962,27 @@ function smoothBezier(points4, smooth, isLoop, constraint) {
|
|
|
12962
12962
|
}
|
|
12963
12963
|
|
|
12964
12964
|
// node_modules/tvrender/src/graphic/helper/poly.ts
|
|
12965
|
-
function buildPath3(
|
|
12965
|
+
function buildPath3(ctx2, shape, closePath) {
|
|
12966
12966
|
const smooth = shape.smooth;
|
|
12967
12967
|
let points4 = shape.points;
|
|
12968
12968
|
if (points4 && points4.length >= 2) {
|
|
12969
12969
|
if (smooth) {
|
|
12970
12970
|
const controlPoints = smoothBezier(points4, smooth, closePath, shape.smoothConstraint);
|
|
12971
|
-
|
|
12971
|
+
ctx2.moveTo(points4[0][0], points4[0][1]);
|
|
12972
12972
|
const len2 = points4.length;
|
|
12973
12973
|
for (let i = 0; i < (closePath ? len2 : len2 - 1); i++) {
|
|
12974
12974
|
const cp1 = controlPoints[i * 2];
|
|
12975
12975
|
const cp2 = controlPoints[i * 2 + 1];
|
|
12976
12976
|
const p = points4[(i + 1) % len2];
|
|
12977
|
-
|
|
12977
|
+
ctx2.bezierCurveTo(cp1[0], cp1[1], cp2[0], cp2[1], p[0], p[1]);
|
|
12978
12978
|
}
|
|
12979
12979
|
} else {
|
|
12980
|
-
|
|
12980
|
+
ctx2.moveTo(points4[0][0], points4[0][1]);
|
|
12981
12981
|
for (let i = 1, l = points4.length; i < l; i++) {
|
|
12982
|
-
|
|
12982
|
+
ctx2.lineTo(points4[i][0], points4[i][1]);
|
|
12983
12983
|
}
|
|
12984
12984
|
}
|
|
12985
|
-
closePath &&
|
|
12985
|
+
closePath && ctx2.closePath();
|
|
12986
12986
|
}
|
|
12987
12987
|
}
|
|
12988
12988
|
|
|
@@ -13001,8 +13001,8 @@ var Polygon = class extends Path_default {
|
|
|
13001
13001
|
getDefaultShape() {
|
|
13002
13002
|
return new PolygonShape();
|
|
13003
13003
|
}
|
|
13004
|
-
buildPath(
|
|
13005
|
-
buildPath3(
|
|
13004
|
+
buildPath(ctx2, shape) {
|
|
13005
|
+
buildPath3(ctx2, shape, true);
|
|
13006
13006
|
}
|
|
13007
13007
|
};
|
|
13008
13008
|
Polygon.prototype.type = "polygon";
|
|
@@ -13030,8 +13030,8 @@ var Polyline = class extends Path_default {
|
|
|
13030
13030
|
getDefaultShape() {
|
|
13031
13031
|
return new PolylineShape();
|
|
13032
13032
|
}
|
|
13033
|
-
buildPath(
|
|
13034
|
-
buildPath3(
|
|
13033
|
+
buildPath(ctx2, shape) {
|
|
13034
|
+
buildPath3(ctx2, shape, false);
|
|
13035
13035
|
}
|
|
13036
13036
|
};
|
|
13037
13037
|
Polyline.prototype.type = "polyline";
|
|
@@ -13061,7 +13061,7 @@ var Line = class extends Path_default {
|
|
|
13061
13061
|
getDefaultShape() {
|
|
13062
13062
|
return new LineShape();
|
|
13063
13063
|
}
|
|
13064
|
-
buildPath(
|
|
13064
|
+
buildPath(ctx2, shape) {
|
|
13065
13065
|
let x1;
|
|
13066
13066
|
let y1;
|
|
13067
13067
|
let x2;
|
|
@@ -13082,12 +13082,12 @@ var Line = class extends Path_default {
|
|
|
13082
13082
|
if (percent === 0) {
|
|
13083
13083
|
return;
|
|
13084
13084
|
}
|
|
13085
|
-
|
|
13085
|
+
ctx2.moveTo(x1, y1);
|
|
13086
13086
|
if (percent < 1) {
|
|
13087
13087
|
x2 = x1 * (1 - percent) + x2 * percent;
|
|
13088
13088
|
y2 = y1 * (1 - percent) + y2 * percent;
|
|
13089
13089
|
}
|
|
13090
|
-
|
|
13090
|
+
ctx2.lineTo(x2, y2);
|
|
13091
13091
|
}
|
|
13092
13092
|
pointAt(p) {
|
|
13093
13093
|
const shape = this.shape;
|
|
@@ -13141,7 +13141,7 @@ var BezierCurve = class extends Path_default {
|
|
|
13141
13141
|
getDefaultShape() {
|
|
13142
13142
|
return new BezierCurveShape();
|
|
13143
13143
|
}
|
|
13144
|
-
buildPath(
|
|
13144
|
+
buildPath(ctx2, shape) {
|
|
13145
13145
|
let x1 = shape.x1;
|
|
13146
13146
|
let y1 = shape.y1;
|
|
13147
13147
|
let x2 = shape.x2;
|
|
@@ -13154,7 +13154,7 @@ var BezierCurve = class extends Path_default {
|
|
|
13154
13154
|
if (percent === 0) {
|
|
13155
13155
|
return;
|
|
13156
13156
|
}
|
|
13157
|
-
|
|
13157
|
+
ctx2.moveTo(x1, y1);
|
|
13158
13158
|
if (cpx2 == null || cpy2 == null) {
|
|
13159
13159
|
if (percent < 1) {
|
|
13160
13160
|
quadraticSubdivide(x1, cpx1, x2, percent, out);
|
|
@@ -13164,7 +13164,7 @@ var BezierCurve = class extends Path_default {
|
|
|
13164
13164
|
cpy1 = out[1];
|
|
13165
13165
|
y2 = out[2];
|
|
13166
13166
|
}
|
|
13167
|
-
|
|
13167
|
+
ctx2.quadraticCurveTo(cpx1, cpy1, x2, y2);
|
|
13168
13168
|
} else {
|
|
13169
13169
|
if (percent < 1) {
|
|
13170
13170
|
cubicSubdivide(x1, cpx1, cpx2, x2, percent, out);
|
|
@@ -13176,7 +13176,7 @@ var BezierCurve = class extends Path_default {
|
|
|
13176
13176
|
cpy2 = out[2];
|
|
13177
13177
|
y2 = out[3];
|
|
13178
13178
|
}
|
|
13179
|
-
|
|
13179
|
+
ctx2.bezierCurveTo(cpx1, cpy1, cpx2, cpy2, x2, y2);
|
|
13180
13180
|
}
|
|
13181
13181
|
}
|
|
13182
13182
|
pointAt(t) {
|
|
@@ -13214,7 +13214,7 @@ var Arc = class extends Path_default {
|
|
|
13214
13214
|
getDefaultShape() {
|
|
13215
13215
|
return new ArcShape();
|
|
13216
13216
|
}
|
|
13217
|
-
buildPath(
|
|
13217
|
+
buildPath(ctx2, shape) {
|
|
13218
13218
|
const x = shape.cx;
|
|
13219
13219
|
const y = shape.cy;
|
|
13220
13220
|
const r = Math.max(shape.r, 0);
|
|
@@ -13223,8 +13223,8 @@ var Arc = class extends Path_default {
|
|
|
13223
13223
|
const clockwise = shape.clockwise;
|
|
13224
13224
|
const unitX = Math.cos(startAngle);
|
|
13225
13225
|
const unitY = Math.sin(startAngle);
|
|
13226
|
-
|
|
13227
|
-
|
|
13226
|
+
ctx2.moveTo(unitX * r + x, unitY * r + y);
|
|
13227
|
+
ctx2.arc(x, y, r, startAngle, endAngle, !clockwise);
|
|
13228
13228
|
}
|
|
13229
13229
|
};
|
|
13230
13230
|
Arc.prototype.type = "arc";
|
|
@@ -13257,10 +13257,10 @@ var CompoundPath = class extends Path_default {
|
|
|
13257
13257
|
paths[i].path.setScale(scale4[0], scale4[1], paths[i].segmentIgnoreThreshold);
|
|
13258
13258
|
}
|
|
13259
13259
|
}
|
|
13260
|
-
buildPath(
|
|
13260
|
+
buildPath(ctx2, shape) {
|
|
13261
13261
|
const paths = shape.paths || [];
|
|
13262
13262
|
for (let i = 0; i < paths.length; i++) {
|
|
13263
|
-
paths[i].buildPath(
|
|
13263
|
+
paths[i].buildPath(ctx2, paths[i].shape, true);
|
|
13264
13264
|
}
|
|
13265
13265
|
}
|
|
13266
13266
|
afterBrush() {
|
|
@@ -13561,15 +13561,15 @@ var CirculateLine = class extends Path_default {
|
|
|
13561
13561
|
getDefaultShape() {
|
|
13562
13562
|
return new CirculateLineShape();
|
|
13563
13563
|
}
|
|
13564
|
-
buildPath(
|
|
13564
|
+
buildPath(ctx2, shape) {
|
|
13565
13565
|
const {points: points4, count: count2, gap, lineWidth} = shape;
|
|
13566
13566
|
const [start2, end2] = points4;
|
|
13567
13567
|
const [startX, startY] = start2 || [];
|
|
13568
13568
|
const [endX, endY] = end2 || [];
|
|
13569
13569
|
for (let index = 0; index < count2; index++) {
|
|
13570
13570
|
const xGap = index * gap;
|
|
13571
|
-
|
|
13572
|
-
|
|
13571
|
+
ctx2.moveTo(formatPoint(startX + xGap, lineWidth), startY);
|
|
13572
|
+
ctx2.lineTo(formatPoint(endX + xGap, lineWidth), endY);
|
|
13573
13573
|
}
|
|
13574
13574
|
}
|
|
13575
13575
|
};
|
|
@@ -13589,14 +13589,14 @@ var Diagonal = class extends Path_default {
|
|
|
13589
13589
|
getDefaultShape() {
|
|
13590
13590
|
return new DiagonalShape();
|
|
13591
13591
|
}
|
|
13592
|
-
buildPath(
|
|
13592
|
+
buildPath(ctx2, shape) {
|
|
13593
13593
|
const {points: points4} = shape;
|
|
13594
13594
|
for (let index = 0; index < points4.length; index++) {
|
|
13595
13595
|
const [startPoint, endPoint] = points4[index];
|
|
13596
13596
|
const [startX, startY] = startPoint;
|
|
13597
13597
|
const [endX, endY] = endPoint;
|
|
13598
|
-
|
|
13599
|
-
|
|
13598
|
+
ctx2.moveTo(startX, startY);
|
|
13599
|
+
ctx2.lineTo(endX, endY);
|
|
13600
13600
|
}
|
|
13601
13601
|
}
|
|
13602
13602
|
};
|
|
@@ -16278,6 +16278,7 @@ var BUILTIN_CHARTS_MAP = {
|
|
|
16278
16278
|
strategy: "StrategyChart",
|
|
16279
16279
|
mineLines: "MineLinesChart",
|
|
16280
16280
|
lineFills: "LineFillsChart",
|
|
16281
|
+
charPlot: "CharPlotChart",
|
|
16281
16282
|
boxes: "BoxesChart",
|
|
16282
16283
|
labels: "LabelsChart",
|
|
16283
16284
|
hlines: "HLinesChart",
|
|
@@ -19823,14 +19824,14 @@ function getBlockGapLevel(frag) {
|
|
|
19823
19824
|
}
|
|
19824
19825
|
return 0;
|
|
19825
19826
|
}
|
|
19826
|
-
function buildSection(
|
|
19827
|
+
function buildSection(ctx2, fragment, topMarginForOuterGap, toolTipTextStyle) {
|
|
19827
19828
|
const noHeader = fragment.noHeader;
|
|
19828
19829
|
const gaps = getGap(getBlockGapLevel(fragment));
|
|
19829
19830
|
const subMarkupTextList = [];
|
|
19830
19831
|
let subBlocks = fragment.blocks || [];
|
|
19831
19832
|
assert(!subBlocks || isArray(subBlocks));
|
|
19832
19833
|
subBlocks = subBlocks || [];
|
|
19833
|
-
const orderMode =
|
|
19834
|
+
const orderMode = ctx2.orderMode;
|
|
19834
19835
|
if (fragment.sortBlocks && orderMode) {
|
|
19835
19836
|
subBlocks = subBlocks.slice();
|
|
19836
19837
|
const orderMap = {valueAsc: "asc", valueDesc: "desc"};
|
|
@@ -19843,57 +19844,57 @@ function buildSection(ctx, fragment, topMarginForOuterGap, toolTipTextStyle) {
|
|
|
19843
19844
|
}
|
|
19844
19845
|
each(subBlocks, function(subBlock, idx) {
|
|
19845
19846
|
const valueFormatter = fragment.valueFormatter;
|
|
19846
|
-
const subMarkupText2 = getBuilder(subBlock)(valueFormatter ? extend(extend({},
|
|
19847
|
+
const subMarkupText2 = getBuilder(subBlock)(valueFormatter ? extend(extend({}, ctx2), {valueFormatter}) : ctx2, subBlock, idx > 0 ? gaps.html : 0, toolTipTextStyle);
|
|
19847
19848
|
subMarkupText2 != null && subMarkupTextList.push(subMarkupText2);
|
|
19848
19849
|
});
|
|
19849
|
-
const subMarkupText =
|
|
19850
|
+
const subMarkupText = ctx2.renderMode === "richText" ? subMarkupTextList.join(gaps.richText) : wrapBlockHTML(subMarkupTextList.join(""), noHeader ? topMarginForOuterGap : gaps.html);
|
|
19850
19851
|
if (noHeader) {
|
|
19851
19852
|
return subMarkupText;
|
|
19852
19853
|
}
|
|
19853
|
-
const displayableHeader = makeValueReadable(fragment.header, "ordinal",
|
|
19854
|
-
const {nameStyle} = getTooltipTextStyle(toolTipTextStyle,
|
|
19855
|
-
if (
|
|
19856
|
-
return wrapInlineNameRichText(
|
|
19854
|
+
const displayableHeader = makeValueReadable(fragment.header, "ordinal", ctx2.useUTC);
|
|
19855
|
+
const {nameStyle} = getTooltipTextStyle(toolTipTextStyle, ctx2.renderMode);
|
|
19856
|
+
if (ctx2.renderMode === "richText") {
|
|
19857
|
+
return wrapInlineNameRichText(ctx2, displayableHeader, nameStyle) + gaps.richText + subMarkupText;
|
|
19857
19858
|
} else {
|
|
19858
19859
|
return wrapBlockHTML(`<div style="${nameStyle};${TOOLTIP_LINE_HEIGHT_CSS};">` + encodeHTML(displayableHeader) + "</div>" + subMarkupText, topMarginForOuterGap);
|
|
19859
19860
|
}
|
|
19860
19861
|
}
|
|
19861
|
-
function buildNameValue(
|
|
19862
|
-
const renderMode =
|
|
19862
|
+
function buildNameValue(ctx2, fragment, topMarginForOuterGap, toolTipTextStyle) {
|
|
19863
|
+
const renderMode = ctx2.renderMode;
|
|
19863
19864
|
const noName = fragment.noName;
|
|
19864
19865
|
const noValue = fragment.noValue;
|
|
19865
19866
|
const noMarker = !fragment.markerType;
|
|
19866
19867
|
const name = fragment.name;
|
|
19867
|
-
const useUTC =
|
|
19868
|
-
const valueFormatter = fragment.valueFormatter ||
|
|
19868
|
+
const useUTC = ctx2.useUTC;
|
|
19869
|
+
const valueFormatter = fragment.valueFormatter || ctx2.valueFormatter || ((value) => {
|
|
19869
19870
|
value = isArray(value) ? value : [value];
|
|
19870
19871
|
return map(value, (val, idx) => makeValueReadable(val, isArray(valueTypeOption) ? valueTypeOption[idx] : valueTypeOption, useUTC));
|
|
19871
19872
|
});
|
|
19872
19873
|
if (noName && noValue) {
|
|
19873
19874
|
return;
|
|
19874
19875
|
}
|
|
19875
|
-
const markerStr = noMarker ? "" :
|
|
19876
|
+
const markerStr = noMarker ? "" : ctx2.markupStyleCreator.makeTooltipMarker(fragment.markerType, fragment.markerColor || "#333", renderMode);
|
|
19876
19877
|
const readableName = noName ? "" : makeValueReadable(name, "ordinal", useUTC);
|
|
19877
19878
|
const valueTypeOption = fragment.valueType;
|
|
19878
19879
|
const readableValueList = noValue ? [] : valueFormatter(fragment.value, fragment.dataIndex);
|
|
19879
19880
|
const valueAlignRight = !noMarker || !noName;
|
|
19880
19881
|
const valueCloseToMarker = !noMarker && noName;
|
|
19881
19882
|
const {nameStyle, valueStyle} = getTooltipTextStyle(toolTipTextStyle, renderMode);
|
|
19882
|
-
return renderMode === "richText" ? (noMarker ? "" : markerStr) + (noName ? "" : wrapInlineNameRichText(
|
|
19883
|
+
return renderMode === "richText" ? (noMarker ? "" : markerStr) + (noName ? "" : wrapInlineNameRichText(ctx2, readableName, nameStyle)) + (noValue ? "" : wrapInlineValueRichText(ctx2, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML((noMarker ? "" : markerStr) + (noName ? "" : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? "" : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap);
|
|
19883
19884
|
}
|
|
19884
19885
|
function buildTooltipMarkup(fragment, markupStyleCreator, renderMode, orderMode, useUTC, toolTipTextStyle) {
|
|
19885
19886
|
if (!fragment) {
|
|
19886
19887
|
return;
|
|
19887
19888
|
}
|
|
19888
19889
|
const builder = getBuilder(fragment);
|
|
19889
|
-
const
|
|
19890
|
+
const ctx2 = {
|
|
19890
19891
|
useUTC,
|
|
19891
19892
|
renderMode,
|
|
19892
19893
|
orderMode,
|
|
19893
19894
|
markupStyleCreator,
|
|
19894
19895
|
valueFormatter: fragment.valueFormatter
|
|
19895
19896
|
};
|
|
19896
|
-
return builder(
|
|
19897
|
+
return builder(ctx2, fragment, 0, toolTipTextStyle);
|
|
19897
19898
|
}
|
|
19898
19899
|
function getGap(gapLevel) {
|
|
19899
19900
|
return {
|
|
@@ -19916,14 +19917,14 @@ function wrapInlineValueHTML(valueList, alignRight, valueCloseToMarker, style) {
|
|
|
19916
19917
|
valueList = isArray(valueList) ? valueList : [valueList];
|
|
19917
19918
|
return `<span style="${alignCSS};${style}">` + map(valueList, (value) => encodeHTML(value)).join(" ") + "</span>";
|
|
19918
19919
|
}
|
|
19919
|
-
function wrapInlineNameRichText(
|
|
19920
|
-
return
|
|
19920
|
+
function wrapInlineNameRichText(ctx2, name, style) {
|
|
19921
|
+
return ctx2.markupStyleCreator.wrapRichTextStyle(name, style);
|
|
19921
19922
|
}
|
|
19922
|
-
function wrapInlineValueRichText(
|
|
19923
|
+
function wrapInlineValueRichText(ctx2, values, alignRight, valueCloseToMarker, style) {
|
|
19923
19924
|
const styles = [style];
|
|
19924
19925
|
const paddingLeft = valueCloseToMarker ? 10 : 20;
|
|
19925
19926
|
alignRight && styles.push({padding: [0, 0, 0, paddingLeft], align: "right"});
|
|
19926
|
-
return
|
|
19927
|
+
return ctx2.markupStyleCreator.wrapRichTextStyle(isArray(values) ? values.join(" ") : values, styles);
|
|
19927
19928
|
}
|
|
19928
19929
|
function retrieveVisualColorForTooltipMarker(series, dataIndex) {
|
|
19929
19930
|
const style = series.getData().getItemVisual(dataIndex, "style");
|
|
@@ -21868,18 +21869,18 @@ var Arrow = Path_default.extend({
|
|
|
21868
21869
|
width: 0,
|
|
21869
21870
|
height: 0
|
|
21870
21871
|
},
|
|
21871
|
-
buildPath: function(
|
|
21872
|
+
buildPath: function(ctx2, shape) {
|
|
21872
21873
|
const height = shape.height;
|
|
21873
21874
|
const width = shape.width;
|
|
21874
21875
|
const x = shape.x;
|
|
21875
21876
|
const y = shape.y;
|
|
21876
21877
|
const dx = width / 3 * 2;
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
|
|
21878
|
+
ctx2.moveTo(x, y);
|
|
21879
|
+
ctx2.lineTo(x + dx, y + height);
|
|
21880
|
+
ctx2.lineTo(x, y + height / 4 * 3);
|
|
21881
|
+
ctx2.lineTo(x - dx, y + height);
|
|
21882
|
+
ctx2.lineTo(x, y);
|
|
21883
|
+
ctx2.closePath();
|
|
21883
21884
|
}
|
|
21884
21885
|
});
|
|
21885
21886
|
var Cross = Path_default.extend({
|
|
@@ -21890,27 +21891,27 @@ var Cross = Path_default.extend({
|
|
|
21890
21891
|
width: 0,
|
|
21891
21892
|
height: 0
|
|
21892
21893
|
},
|
|
21893
|
-
buildPath: function(
|
|
21894
|
+
buildPath: function(ctx2, shape) {
|
|
21894
21895
|
const height = shape.height;
|
|
21895
21896
|
const width = shape.width;
|
|
21896
21897
|
const x = shape.x;
|
|
21897
21898
|
const y = shape.y;
|
|
21898
21899
|
const dx = width / 3;
|
|
21899
21900
|
const dy = height / 3;
|
|
21900
|
-
|
|
21901
|
-
|
|
21902
|
-
|
|
21903
|
-
|
|
21904
|
-
|
|
21905
|
-
|
|
21906
|
-
|
|
21907
|
-
|
|
21908
|
-
|
|
21909
|
-
|
|
21910
|
-
|
|
21911
|
-
|
|
21912
|
-
|
|
21913
|
-
|
|
21901
|
+
ctx2.moveTo(x - dx * 0.5, y + dy * 1.5);
|
|
21902
|
+
ctx2.lineTo(x + dx * 0.5, y + dy * 1.5);
|
|
21903
|
+
ctx2.lineTo(x + dx * 0.5, y + dy * 0.5);
|
|
21904
|
+
ctx2.lineTo(x + dx * 1.5, y + dy * 0.5);
|
|
21905
|
+
ctx2.lineTo(x + dx * 1.5, y - dy * 0.5);
|
|
21906
|
+
ctx2.lineTo(x + dx * 0.5, y - dy * 0.5);
|
|
21907
|
+
ctx2.lineTo(x + dx * 0.5, y - dy * 1.5);
|
|
21908
|
+
ctx2.lineTo(x - dx * 0.5, y - dy * 1.5);
|
|
21909
|
+
ctx2.lineTo(x - dx * 0.5, y - dy * 0.5);
|
|
21910
|
+
ctx2.lineTo(x - dx * 1.5, y - dy * 0.5);
|
|
21911
|
+
ctx2.lineTo(x - dx * 1.5, y + dy * 0.5);
|
|
21912
|
+
ctx2.lineTo(x - dx * 0.5, y + dy * 0.5);
|
|
21913
|
+
ctx2.lineTo(x - dx * 0.5, y + dy * 1.5);
|
|
21914
|
+
ctx2.closePath();
|
|
21914
21915
|
}
|
|
21915
21916
|
});
|
|
21916
21917
|
var LabelDown = Path_default.extend({
|
|
@@ -21923,21 +21924,21 @@ var LabelDown = Path_default.extend({
|
|
|
21923
21924
|
r: 0,
|
|
21924
21925
|
triangleWidth: 0
|
|
21925
21926
|
},
|
|
21926
|
-
buildPath: function(
|
|
21927
|
+
buildPath: function(ctx2, shape) {
|
|
21927
21928
|
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21928
21929
|
const triangleHeight = triangleWidth;
|
|
21929
|
-
|
|
21930
|
-
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
|
|
21934
|
-
|
|
21935
|
-
|
|
21936
|
-
|
|
21937
|
-
|
|
21938
|
-
|
|
21939
|
-
|
|
21940
|
-
|
|
21930
|
+
ctx2.moveTo(x + r, y);
|
|
21931
|
+
ctx2.lineTo(x + width - r, y);
|
|
21932
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21933
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
21934
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21935
|
+
ctx2.lineTo(x + width / 2 + triangleWidth, y + height);
|
|
21936
|
+
ctx2.lineTo(x + width / 2, y + height + triangleHeight);
|
|
21937
|
+
ctx2.lineTo(x + width / 2 - triangleWidth, y + height);
|
|
21938
|
+
ctx2.lineTo(x + r, y + height);
|
|
21939
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21940
|
+
ctx2.lineTo(x, y + r);
|
|
21941
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21941
21942
|
}
|
|
21942
21943
|
});
|
|
21943
21944
|
var LabelUp = Path_default.extend({
|
|
@@ -21950,21 +21951,21 @@ var LabelUp = Path_default.extend({
|
|
|
21950
21951
|
r: 0,
|
|
21951
21952
|
triangleWidth: 0
|
|
21952
21953
|
},
|
|
21953
|
-
buildPath: function(
|
|
21954
|
+
buildPath: function(ctx2, shape) {
|
|
21954
21955
|
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21955
21956
|
const triangleHeight = triangleWidth;
|
|
21956
|
-
|
|
21957
|
-
|
|
21958
|
-
|
|
21959
|
-
|
|
21960
|
-
|
|
21961
|
-
|
|
21962
|
-
|
|
21963
|
-
|
|
21964
|
-
|
|
21965
|
-
|
|
21966
|
-
|
|
21967
|
-
|
|
21957
|
+
ctx2.moveTo(x + r, y);
|
|
21958
|
+
ctx2.lineTo(x + width / 2 - triangleWidth, y);
|
|
21959
|
+
ctx2.lineTo(x + width / 2, y - triangleHeight);
|
|
21960
|
+
ctx2.lineTo(x + width / 2 + triangleWidth, y);
|
|
21961
|
+
ctx2.lineTo(x + width - r, y);
|
|
21962
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21963
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
21964
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21965
|
+
ctx2.lineTo(x + r, y + height);
|
|
21966
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21967
|
+
ctx2.lineTo(x, y + r);
|
|
21968
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21968
21969
|
}
|
|
21969
21970
|
});
|
|
21970
21971
|
var LabelLeft = Path_default.extend({
|
|
@@ -21977,21 +21978,21 @@ var LabelLeft = Path_default.extend({
|
|
|
21977
21978
|
r: 0,
|
|
21978
21979
|
triangleWidth: 0
|
|
21979
21980
|
},
|
|
21980
|
-
buildPath: function(
|
|
21981
|
+
buildPath: function(ctx2, shape) {
|
|
21981
21982
|
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21982
21983
|
const triangleHeight = triangleWidth;
|
|
21983
|
-
|
|
21984
|
-
|
|
21985
|
-
|
|
21986
|
-
|
|
21987
|
-
|
|
21988
|
-
|
|
21989
|
-
|
|
21990
|
-
|
|
21991
|
-
|
|
21992
|
-
|
|
21993
|
-
|
|
21994
|
-
|
|
21984
|
+
ctx2.moveTo(x + r, y);
|
|
21985
|
+
ctx2.lineTo(x + width - r, y);
|
|
21986
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21987
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
21988
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21989
|
+
ctx2.lineTo(x + r, y + height);
|
|
21990
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21991
|
+
ctx2.lineTo(x, y + height / 2 + triangleWidth);
|
|
21992
|
+
ctx2.lineTo(x - triangleHeight, y + height / 2);
|
|
21993
|
+
ctx2.lineTo(x, y + height / 2 - triangleWidth);
|
|
21994
|
+
ctx2.lineTo(x, y + r);
|
|
21995
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21995
21996
|
}
|
|
21996
21997
|
});
|
|
21997
21998
|
var LabelRight = Path_default.extend({
|
|
@@ -22004,21 +22005,21 @@ var LabelRight = Path_default.extend({
|
|
|
22004
22005
|
r: 0,
|
|
22005
22006
|
triangleWidth: 0
|
|
22006
22007
|
},
|
|
22007
|
-
buildPath: function(
|
|
22008
|
+
buildPath: function(ctx2, shape) {
|
|
22008
22009
|
const {x, y, width, height, r, triangleWidth} = shape;
|
|
22009
22010
|
const triangleHeight = triangleWidth;
|
|
22010
|
-
|
|
22011
|
-
|
|
22012
|
-
|
|
22013
|
-
|
|
22014
|
-
|
|
22015
|
-
|
|
22016
|
-
|
|
22017
|
-
|
|
22018
|
-
|
|
22019
|
-
|
|
22020
|
-
|
|
22021
|
-
|
|
22011
|
+
ctx2.moveTo(x + r, y);
|
|
22012
|
+
ctx2.lineTo(x + width - r, y);
|
|
22013
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
22014
|
+
ctx2.lineTo(x + width, y + height / 2 - triangleWidth);
|
|
22015
|
+
ctx2.lineTo(x + width + triangleHeight, y + height / 2);
|
|
22016
|
+
ctx2.lineTo(x + width, y + height / 2 + triangleWidth);
|
|
22017
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
22018
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
22019
|
+
ctx2.lineTo(x + r, y + height);
|
|
22020
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
22021
|
+
ctx2.lineTo(x, y + r);
|
|
22022
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
22022
22023
|
}
|
|
22023
22024
|
});
|
|
22024
22025
|
var LabelLowerLeft = Path_default.extend({
|
|
@@ -22033,7 +22034,7 @@ var LabelLowerLeft = Path_default.extend({
|
|
|
22033
22034
|
offsetX: 0,
|
|
22034
22035
|
offsetWidth: 0
|
|
22035
22036
|
},
|
|
22036
|
-
buildPath: function(
|
|
22037
|
+
buildPath: function(ctx2, shape) {
|
|
22037
22038
|
const height = shape.height;
|
|
22038
22039
|
const width = shape.width;
|
|
22039
22040
|
const x = shape.x;
|
|
@@ -22042,16 +22043,16 @@ var LabelLowerLeft = Path_default.extend({
|
|
|
22042
22043
|
const offsetY = shape.offsetY;
|
|
22043
22044
|
const offsetX = shape.offsetX;
|
|
22044
22045
|
const offsetWidth = shape.offsetWidth;
|
|
22045
|
-
|
|
22046
|
-
|
|
22047
|
-
|
|
22048
|
-
|
|
22049
|
-
|
|
22050
|
-
|
|
22051
|
-
|
|
22052
|
-
|
|
22053
|
-
|
|
22054
|
-
|
|
22046
|
+
ctx2.moveTo(x + r, y);
|
|
22047
|
+
ctx2.lineTo(x + width - r, y);
|
|
22048
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
22049
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
22050
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
22051
|
+
ctx2.lineTo(x + r, y + height);
|
|
22052
|
+
ctx2.lineTo(x - offsetWidth, y + height + offsetY);
|
|
22053
|
+
ctx2.lineTo(x, y + height - offsetX);
|
|
22054
|
+
ctx2.lineTo(x, y + r);
|
|
22055
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
22055
22056
|
}
|
|
22056
22057
|
});
|
|
22057
22058
|
var LabelLowerRight = Path_default.extend({
|
|
@@ -22066,7 +22067,7 @@ var LabelLowerRight = Path_default.extend({
|
|
|
22066
22067
|
offsetX: 0,
|
|
22067
22068
|
offsetWidth: 0
|
|
22068
22069
|
},
|
|
22069
|
-
buildPath: function(
|
|
22070
|
+
buildPath: function(ctx2, shape) {
|
|
22070
22071
|
const offsetY = shape.offsetY;
|
|
22071
22072
|
const offsetX = shape.offsetX;
|
|
22072
22073
|
const offsetWidth = shape.offsetWidth;
|
|
@@ -22075,16 +22076,16 @@ var LabelLowerRight = Path_default.extend({
|
|
|
22075
22076
|
const x = shape.x;
|
|
22076
22077
|
const y = shape.y;
|
|
22077
22078
|
const r = shape.r;
|
|
22078
|
-
|
|
22079
|
-
|
|
22080
|
-
|
|
22081
|
-
|
|
22082
|
-
|
|
22083
|
-
|
|
22084
|
-
|
|
22085
|
-
|
|
22086
|
-
|
|
22087
|
-
|
|
22079
|
+
ctx2.moveTo(x + r, y);
|
|
22080
|
+
ctx2.lineTo(x + width - r, y);
|
|
22081
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
22082
|
+
ctx2.lineTo(x + width, y + height - offsetWidth);
|
|
22083
|
+
ctx2.lineTo(x + width + offsetX, y + height + offsetY);
|
|
22084
|
+
ctx2.lineTo(x + width - r, y + height);
|
|
22085
|
+
ctx2.lineTo(x + r, y + height);
|
|
22086
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
22087
|
+
ctx2.lineTo(x, y + r);
|
|
22088
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
22088
22089
|
}
|
|
22089
22090
|
});
|
|
22090
22091
|
var LabelUpperLeft = Path_default.extend({
|
|
@@ -22099,7 +22100,7 @@ var LabelUpperLeft = Path_default.extend({
|
|
|
22099
22100
|
offsetX: 0,
|
|
22100
22101
|
offsetWidth: 0
|
|
22101
22102
|
},
|
|
22102
|
-
buildPath: function(
|
|
22103
|
+
buildPath: function(ctx2, shape) {
|
|
22103
22104
|
const height = shape.height;
|
|
22104
22105
|
const width = shape.width;
|
|
22105
22106
|
const x = shape.x;
|
|
@@ -22108,16 +22109,16 @@ var LabelUpperLeft = Path_default.extend({
|
|
|
22108
22109
|
const offsetY = shape.offsetY;
|
|
22109
22110
|
const offsetX = shape.offsetX;
|
|
22110
22111
|
const offsetWidth = shape.offsetWidth;
|
|
22111
|
-
|
|
22112
|
-
|
|
22113
|
-
|
|
22114
|
-
|
|
22115
|
-
|
|
22116
|
-
|
|
22117
|
-
|
|
22118
|
-
|
|
22119
|
-
|
|
22120
|
-
|
|
22112
|
+
ctx2.moveTo(x + r, y);
|
|
22113
|
+
ctx2.lineTo(x + width - r, y);
|
|
22114
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
22115
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
22116
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
22117
|
+
ctx2.lineTo(x + r, y + height);
|
|
22118
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
22119
|
+
ctx2.lineTo(x, y + offsetWidth);
|
|
22120
|
+
ctx2.lineTo(x - offsetX, y - offsetY);
|
|
22121
|
+
ctx2.lineTo(x + r, y);
|
|
22121
22122
|
}
|
|
22122
22123
|
});
|
|
22123
22124
|
var LabelUpperRight = Path_default.extend({
|
|
@@ -22132,7 +22133,7 @@ var LabelUpperRight = Path_default.extend({
|
|
|
22132
22133
|
offsetX: 0,
|
|
22133
22134
|
offsetWidth: 0
|
|
22134
22135
|
},
|
|
22135
|
-
buildPath: function(
|
|
22136
|
+
buildPath: function(ctx2, shape) {
|
|
22136
22137
|
const height = shape.height;
|
|
22137
22138
|
const width = shape.width;
|
|
22138
22139
|
const x = shape.x;
|
|
@@ -22141,16 +22142,16 @@ var LabelUpperRight = Path_default.extend({
|
|
|
22141
22142
|
const offsetY = shape.offsetY;
|
|
22142
22143
|
const offsetX = shape.offsetX;
|
|
22143
22144
|
const offsetWidth = shape.offsetWidth;
|
|
22144
|
-
|
|
22145
|
-
|
|
22146
|
-
|
|
22147
|
-
|
|
22148
|
-
|
|
22149
|
-
|
|
22150
|
-
|
|
22151
|
-
|
|
22152
|
-
|
|
22153
|
-
|
|
22145
|
+
ctx2.moveTo(x + r, y);
|
|
22146
|
+
ctx2.lineTo(x + width - r, y);
|
|
22147
|
+
ctx2.lineTo(x + width + offsetX, y - offsetY);
|
|
22148
|
+
ctx2.lineTo(x + width, y + offsetWidth);
|
|
22149
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
22150
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
22151
|
+
ctx2.lineTo(x + r, y + height);
|
|
22152
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
22153
|
+
ctx2.lineTo(x, y);
|
|
22154
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
22154
22155
|
}
|
|
22155
22156
|
});
|
|
22156
22157
|
var LabelCenter = Path_default.extend({
|
|
@@ -22162,21 +22163,21 @@ var LabelCenter = Path_default.extend({
|
|
|
22162
22163
|
height: 0,
|
|
22163
22164
|
r: 0
|
|
22164
22165
|
},
|
|
22165
|
-
buildPath: function(
|
|
22166
|
+
buildPath: function(ctx2, shape) {
|
|
22166
22167
|
const height = shape.height;
|
|
22167
22168
|
const width = shape.width;
|
|
22168
22169
|
const x = shape.x;
|
|
22169
22170
|
const y = shape.y;
|
|
22170
22171
|
const r = shape.r;
|
|
22171
|
-
|
|
22172
|
-
|
|
22173
|
-
|
|
22174
|
-
|
|
22175
|
-
|
|
22176
|
-
|
|
22177
|
-
|
|
22178
|
-
|
|
22179
|
-
|
|
22172
|
+
ctx2.moveTo(x + r, y);
|
|
22173
|
+
ctx2.lineTo(x + width - r, y);
|
|
22174
|
+
ctx2.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
22175
|
+
ctx2.lineTo(x + width, y + height - r);
|
|
22176
|
+
ctx2.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
22177
|
+
ctx2.lineTo(x + r, y + height);
|
|
22178
|
+
ctx2.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
22179
|
+
ctx2.lineTo(x, y);
|
|
22180
|
+
ctx2.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
22180
22181
|
}
|
|
22181
22182
|
});
|
|
22182
22183
|
var XCross = Path_default.extend({
|
|
@@ -22187,14 +22188,14 @@ var XCross = Path_default.extend({
|
|
|
22187
22188
|
width: 0,
|
|
22188
22189
|
height: 0
|
|
22189
22190
|
},
|
|
22190
|
-
buildPath: function(
|
|
22191
|
+
buildPath: function(ctx2, shape) {
|
|
22191
22192
|
const {x, y} = shape;
|
|
22192
22193
|
const width = shape.width / 2;
|
|
22193
22194
|
const height = shape.height / 2;
|
|
22194
|
-
|
|
22195
|
-
|
|
22196
|
-
|
|
22197
|
-
|
|
22195
|
+
ctx2.moveTo(x + width, y - height);
|
|
22196
|
+
ctx2.lineTo(x - width, y + height);
|
|
22197
|
+
ctx2.moveTo(x - width, y - height);
|
|
22198
|
+
ctx2.lineTo(x + width, y + height);
|
|
22198
22199
|
}
|
|
22199
22200
|
});
|
|
22200
22201
|
var LCross = Path_default.extend({
|
|
@@ -22205,14 +22206,14 @@ var LCross = Path_default.extend({
|
|
|
22205
22206
|
width: 0,
|
|
22206
22207
|
height: 0
|
|
22207
22208
|
},
|
|
22208
|
-
buildPath: function(
|
|
22209
|
+
buildPath: function(ctx2, shape) {
|
|
22209
22210
|
const {x, y} = shape;
|
|
22210
22211
|
const width = shape.width / 2;
|
|
22211
22212
|
const height = shape.height / 2;
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22213
|
+
ctx2.moveTo(x, y - height);
|
|
22214
|
+
ctx2.lineTo(x, y + height);
|
|
22215
|
+
ctx2.moveTo(x - width, y);
|
|
22216
|
+
ctx2.lineTo(x + width, y);
|
|
22216
22217
|
}
|
|
22217
22218
|
});
|
|
22218
22219
|
var Flag = Path_default.extend({
|
|
@@ -22223,7 +22224,7 @@ var Flag = Path_default.extend({
|
|
|
22223
22224
|
width: 0,
|
|
22224
22225
|
height: 0
|
|
22225
22226
|
},
|
|
22226
|
-
buildPath: function(
|
|
22227
|
+
buildPath: function(ctx2, shape) {
|
|
22227
22228
|
const {x, y} = shape;
|
|
22228
22229
|
const width = shape.width / 2;
|
|
22229
22230
|
const height = shape.height / 2;
|
|
@@ -22234,14 +22235,14 @@ var Flag = Path_default.extend({
|
|
|
22234
22235
|
const endX = x + width;
|
|
22235
22236
|
const topY = y - height;
|
|
22236
22237
|
const bottomY = y + height;
|
|
22237
|
-
|
|
22238
|
-
|
|
22239
|
-
|
|
22240
|
-
|
|
22241
|
-
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22238
|
+
ctx2.moveTo(x - width, topY);
|
|
22239
|
+
ctx2.lineTo(startX, topY);
|
|
22240
|
+
ctx2.bezierCurveTo(startX + 1 / 3 * shape.width, topY - range, startX + 2 / 3 * shape.width, topY + range, endX, topY);
|
|
22241
|
+
ctx2.lineTo(endX, topY + rangeHeight);
|
|
22242
|
+
ctx2.bezierCurveTo(startX + 2 / 3 * shape.width, topY + range + rangeHeight, startX + 1 / 3 * shape.width, topY - range + rangeHeight, startX, topY + rangeHeight);
|
|
22243
|
+
ctx2.lineTo(startX, bottomY);
|
|
22244
|
+
ctx2.lineTo(x - width, bottomY);
|
|
22245
|
+
ctx2.lineTo(x - width, topY);
|
|
22245
22246
|
}
|
|
22246
22247
|
});
|
|
22247
22248
|
var TriangleDown = Path_default.extend({
|
|
@@ -22311,19 +22312,19 @@ var ArrowUp = Path_default.extend({
|
|
|
22311
22312
|
rectWidth: 0,
|
|
22312
22313
|
triangleHeight: 0
|
|
22313
22314
|
},
|
|
22314
|
-
buildPath: function(
|
|
22315
|
+
buildPath: function(ctx2, shape) {
|
|
22315
22316
|
const {cx, cy, rectWidth, triangleHeight} = shape;
|
|
22316
22317
|
const width = shape.width / 2;
|
|
22317
22318
|
const height = shape.height / 2;
|
|
22318
22319
|
const triangleY = cy - height + triangleHeight;
|
|
22319
|
-
|
|
22320
|
-
|
|
22321
|
-
|
|
22322
|
-
|
|
22323
|
-
|
|
22324
|
-
|
|
22325
|
-
|
|
22326
|
-
|
|
22320
|
+
ctx2.moveTo(cx, cy - height);
|
|
22321
|
+
ctx2.lineTo(cx + width, triangleY);
|
|
22322
|
+
ctx2.lineTo(cx + width - rectWidth, triangleY);
|
|
22323
|
+
ctx2.lineTo(cx + width - rectWidth, cy + height);
|
|
22324
|
+
ctx2.lineTo(cx - width + rectWidth, cy + height);
|
|
22325
|
+
ctx2.lineTo(cx - width + rectWidth, triangleY);
|
|
22326
|
+
ctx2.lineTo(cx - width, triangleY);
|
|
22327
|
+
ctx2.closePath();
|
|
22327
22328
|
}
|
|
22328
22329
|
});
|
|
22329
22330
|
var ArrowUpClose = Path_default.extend({
|
|
@@ -22336,21 +22337,21 @@ var ArrowUpClose = Path_default.extend({
|
|
|
22336
22337
|
rectWidth: 0,
|
|
22337
22338
|
triangleHeight: 0
|
|
22338
22339
|
},
|
|
22339
|
-
buildPath: function(
|
|
22340
|
+
buildPath: function(ctx2, shape) {
|
|
22340
22341
|
const {cx, cy, rectWidth, triangleHeight} = shape;
|
|
22341
22342
|
const width = shape.width / 2;
|
|
22342
22343
|
const height = shape.height / 2;
|
|
22343
22344
|
const triangleY = cy - height + triangleHeight;
|
|
22344
22345
|
const rectHeight = 3;
|
|
22345
|
-
|
|
22346
|
-
|
|
22347
|
-
|
|
22348
|
-
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22352
|
-
|
|
22353
|
-
|
|
22346
|
+
ctx2.moveTo(cx, cy - height);
|
|
22347
|
+
ctx2.lineTo(cx + width, triangleY);
|
|
22348
|
+
ctx2.lineTo(cx + width - rectWidth, triangleY);
|
|
22349
|
+
ctx2.lineTo(cx + width - rectWidth, cy + height);
|
|
22350
|
+
ctx2.lineTo(cx - width + rectWidth, cy + height);
|
|
22351
|
+
ctx2.lineTo(cx - width + rectWidth, triangleY);
|
|
22352
|
+
ctx2.lineTo(cx - width, triangleY);
|
|
22353
|
+
ctx2.closePath();
|
|
22354
|
+
ctx2.rect(cx - width + 0.5, cy - height - 0.5 - rectHeight, shape.width - 0.5, rectHeight);
|
|
22354
22355
|
}
|
|
22355
22356
|
});
|
|
22356
22357
|
var ArrowDown = Path_default.extend({
|
|
@@ -22363,19 +22364,19 @@ var ArrowDown = Path_default.extend({
|
|
|
22363
22364
|
rectWidth: 0,
|
|
22364
22365
|
triangleHeight: 0
|
|
22365
22366
|
},
|
|
22366
|
-
buildPath: function(
|
|
22367
|
+
buildPath: function(ctx2, shape) {
|
|
22367
22368
|
const {cx, cy, rectWidth, triangleHeight} = shape;
|
|
22368
22369
|
const width = shape.width / 2;
|
|
22369
22370
|
const height = shape.height / 2;
|
|
22370
22371
|
const triangleY = cy + height - triangleHeight;
|
|
22371
|
-
|
|
22372
|
-
|
|
22373
|
-
|
|
22374
|
-
|
|
22375
|
-
|
|
22376
|
-
|
|
22377
|
-
|
|
22378
|
-
|
|
22372
|
+
ctx2.moveTo(cx, cy + height);
|
|
22373
|
+
ctx2.lineTo(cx + width, triangleY);
|
|
22374
|
+
ctx2.lineTo(cx + width - rectWidth, triangleY);
|
|
22375
|
+
ctx2.lineTo(cx + width - rectWidth, cy - height);
|
|
22376
|
+
ctx2.lineTo(cx - width + rectWidth, cy - height);
|
|
22377
|
+
ctx2.lineTo(cx - width + rectWidth, triangleY);
|
|
22378
|
+
ctx2.lineTo(cx - width, triangleY);
|
|
22379
|
+
ctx2.closePath();
|
|
22379
22380
|
}
|
|
22380
22381
|
});
|
|
22381
22382
|
var ArrowDownClose = Path_default.extend({
|
|
@@ -22388,21 +22389,21 @@ var ArrowDownClose = Path_default.extend({
|
|
|
22388
22389
|
rectWidth: 0,
|
|
22389
22390
|
triangleHeight: 0
|
|
22390
22391
|
},
|
|
22391
|
-
buildPath: function(
|
|
22392
|
+
buildPath: function(ctx2, shape) {
|
|
22392
22393
|
const {cx, cy, rectWidth, triangleHeight} = shape;
|
|
22393
22394
|
const width = shape.width / 2;
|
|
22394
22395
|
const height = shape.height / 2;
|
|
22395
22396
|
const triangleY = cy + height - triangleHeight;
|
|
22396
22397
|
const rectHeight = 3;
|
|
22397
|
-
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22398
|
+
ctx2.moveTo(cx, cy + height);
|
|
22399
|
+
ctx2.lineTo(cx + width, triangleY);
|
|
22400
|
+
ctx2.lineTo(cx + width - rectWidth, triangleY);
|
|
22401
|
+
ctx2.lineTo(cx + width - rectWidth, cy - height);
|
|
22402
|
+
ctx2.lineTo(cx - width + rectWidth, cy - height);
|
|
22403
|
+
ctx2.lineTo(cx - width + rectWidth, triangleY);
|
|
22404
|
+
ctx2.lineTo(cx - width, triangleY);
|
|
22405
|
+
ctx2.closePath();
|
|
22406
|
+
ctx2.rect(cx - width + 0.5, cy + height + 0.5, shape.width - 0.5, rectHeight);
|
|
22406
22407
|
}
|
|
22407
22408
|
});
|
|
22408
22409
|
var symbolCtors = {
|
|
@@ -22690,7 +22691,7 @@ var SymbolClz = Path_default.extend({
|
|
|
22690
22691
|
}
|
|
22691
22692
|
return res;
|
|
22692
22693
|
},
|
|
22693
|
-
buildPath(
|
|
22694
|
+
buildPath(ctx2, shape, inBundle) {
|
|
22694
22695
|
let symbolType = shape.symbolType;
|
|
22695
22696
|
if (symbolType !== "none") {
|
|
22696
22697
|
let proxySymbol = symbolBuildProxies[symbolType];
|
|
@@ -22699,7 +22700,7 @@ var SymbolClz = Path_default.extend({
|
|
|
22699
22700
|
proxySymbol = symbolBuildProxies[symbolType];
|
|
22700
22701
|
}
|
|
22701
22702
|
symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape, shape);
|
|
22702
|
-
proxySymbol.buildPath(
|
|
22703
|
+
proxySymbol.buildPath(ctx2, proxySymbol.shape, inBundle);
|
|
22703
22704
|
}
|
|
22704
22705
|
}
|
|
22705
22706
|
});
|
|
@@ -22769,7 +22770,7 @@ function normalizeSymbolOffset(symbolOffset, symbolSize) {
|
|
|
22769
22770
|
function isSafeNum(num) {
|
|
22770
22771
|
return isFinite(num);
|
|
22771
22772
|
}
|
|
22772
|
-
function createLinearGradient(
|
|
22773
|
+
function createLinearGradient(ctx2, obj, rect) {
|
|
22773
22774
|
let x = obj.x == null ? 0 : obj.x;
|
|
22774
22775
|
let x2 = obj.x2 == null ? 1 : obj.x2;
|
|
22775
22776
|
let y = obj.y == null ? 0 : obj.y;
|
|
@@ -22784,10 +22785,10 @@ function createLinearGradient(ctx, obj, rect) {
|
|
|
22784
22785
|
x2 = isSafeNum(x2) ? x2 : 1;
|
|
22785
22786
|
y = isSafeNum(y) ? y : 0;
|
|
22786
22787
|
y2 = isSafeNum(y2) ? y2 : 0;
|
|
22787
|
-
const canvasGradient =
|
|
22788
|
+
const canvasGradient = ctx2.createLinearGradient(x, y, x2, y2);
|
|
22788
22789
|
return canvasGradient;
|
|
22789
22790
|
}
|
|
22790
|
-
function createRadialGradient(
|
|
22791
|
+
function createRadialGradient(ctx2, obj, rect) {
|
|
22791
22792
|
const width = rect.width;
|
|
22792
22793
|
const height = rect.height;
|
|
22793
22794
|
const min3 = Math.min(width, height);
|
|
@@ -22802,11 +22803,11 @@ function createRadialGradient(ctx, obj, rect) {
|
|
|
22802
22803
|
x = isSafeNum(x) ? x : 0.5;
|
|
22803
22804
|
y = isSafeNum(y) ? y : 0.5;
|
|
22804
22805
|
r = r >= 0 && isSafeNum(r) ? r : 0.5;
|
|
22805
|
-
const canvasGradient =
|
|
22806
|
+
const canvasGradient = ctx2.createRadialGradient(x, y, 0, x, y, r);
|
|
22806
22807
|
return canvasGradient;
|
|
22807
22808
|
}
|
|
22808
|
-
function getCanvasGradient(
|
|
22809
|
-
const canvasGradient = obj.type === "radial" ? createRadialGradient(
|
|
22809
|
+
function getCanvasGradient(ctx2, obj, rect) {
|
|
22810
|
+
const canvasGradient = obj.type === "radial" ? createRadialGradient(ctx2, obj, rect) : createLinearGradient(ctx2, obj, rect);
|
|
22810
22811
|
const colorStops = obj.colorStops;
|
|
22811
22812
|
for (let i = 0; i < colorStops.length; i++) {
|
|
22812
22813
|
canvasGradient.addColorStop(colorStops[i].offset, colorStops[i].color);
|
|
@@ -22878,30 +22879,30 @@ function styleHasFill(style) {
|
|
|
22878
22879
|
const fill = style.fill;
|
|
22879
22880
|
return fill != null && fill !== "none";
|
|
22880
22881
|
}
|
|
22881
|
-
function doFillPath(
|
|
22882
|
+
function doFillPath(ctx2, style) {
|
|
22882
22883
|
if (style.fillOpacity != null && style.fillOpacity !== 1) {
|
|
22883
|
-
const originalGlobalAlpha =
|
|
22884
|
-
|
|
22885
|
-
|
|
22886
|
-
|
|
22884
|
+
const originalGlobalAlpha = ctx2.globalAlpha;
|
|
22885
|
+
ctx2.globalAlpha = style.fillOpacity * style.opacity;
|
|
22886
|
+
ctx2.fill();
|
|
22887
|
+
ctx2.globalAlpha = originalGlobalAlpha;
|
|
22887
22888
|
} else {
|
|
22888
|
-
|
|
22889
|
+
ctx2.fill();
|
|
22889
22890
|
}
|
|
22890
22891
|
}
|
|
22891
|
-
function doStrokePath(
|
|
22892
|
+
function doStrokePath(ctx2, style) {
|
|
22892
22893
|
if (style.strokeOpacity != null && style.strokeOpacity !== 1) {
|
|
22893
|
-
const originalGlobalAlpha =
|
|
22894
|
-
|
|
22895
|
-
|
|
22896
|
-
|
|
22894
|
+
const originalGlobalAlpha = ctx2.globalAlpha;
|
|
22895
|
+
ctx2.globalAlpha = style.strokeOpacity * style.opacity;
|
|
22896
|
+
ctx2.stroke();
|
|
22897
|
+
ctx2.globalAlpha = originalGlobalAlpha;
|
|
22897
22898
|
} else {
|
|
22898
|
-
|
|
22899
|
+
ctx2.stroke();
|
|
22899
22900
|
}
|
|
22900
22901
|
}
|
|
22901
|
-
function createCanvasPattern(
|
|
22902
|
+
function createCanvasPattern(ctx2, pattern, el) {
|
|
22902
22903
|
const image = createOrUpdateImage(pattern.image, pattern.__image, el);
|
|
22903
22904
|
if (isImageReady(image)) {
|
|
22904
|
-
const canvasPattern =
|
|
22905
|
+
const canvasPattern = ctx2.createPattern(image, pattern.repeat || "repeat");
|
|
22905
22906
|
if (typeof DOMMatrix === "function" && canvasPattern && canvasPattern.setTransform) {
|
|
22906
22907
|
const matrix13 = new DOMMatrix();
|
|
22907
22908
|
matrix13.translateSelf(pattern.x || 0, pattern.y || 0);
|
|
@@ -22912,7 +22913,7 @@ function createCanvasPattern(ctx, pattern, el) {
|
|
|
22912
22913
|
return canvasPattern;
|
|
22913
22914
|
}
|
|
22914
22915
|
}
|
|
22915
|
-
function brushPath(
|
|
22916
|
+
function brushPath(ctx2, el, style, inBatch) {
|
|
22916
22917
|
let hasStroke = styleHasStroke(style);
|
|
22917
22918
|
let hasFill = styleHasFill(style);
|
|
22918
22919
|
const strokePercent = style.strokePercent;
|
|
@@ -22939,35 +22940,35 @@ function brushPath(ctx, el, style, inBatch) {
|
|
|
22939
22940
|
rect = el.getBoundingRect();
|
|
22940
22941
|
}
|
|
22941
22942
|
if (hasFillGradient) {
|
|
22942
|
-
fillGradient = dirtyFlag ? getCanvasGradient(
|
|
22943
|
+
fillGradient = dirtyFlag ? getCanvasGradient(ctx2, fill, rect) : el.__canvasFillGradient;
|
|
22943
22944
|
el.__canvasFillGradient = fillGradient;
|
|
22944
22945
|
}
|
|
22945
22946
|
if (hasStrokeGradient) {
|
|
22946
|
-
strokeGradient = dirtyFlag ? getCanvasGradient(
|
|
22947
|
+
strokeGradient = dirtyFlag ? getCanvasGradient(ctx2, stroke, rect) : el.__canvasStrokeGradient;
|
|
22947
22948
|
el.__canvasStrokeGradient = strokeGradient;
|
|
22948
22949
|
}
|
|
22949
22950
|
if (hasFillPattern) {
|
|
22950
|
-
fillPattern = dirtyFlag || !el.__canvasFillPattern ? createCanvasPattern(
|
|
22951
|
+
fillPattern = dirtyFlag || !el.__canvasFillPattern ? createCanvasPattern(ctx2, fill, el) : el.__canvasFillPattern;
|
|
22951
22952
|
el.__canvasFillPattern = fillPattern;
|
|
22952
22953
|
}
|
|
22953
22954
|
if (hasStrokePattern) {
|
|
22954
|
-
strokePattern = dirtyFlag || !el.__canvasStrokePattern ? createCanvasPattern(
|
|
22955
|
+
strokePattern = dirtyFlag || !el.__canvasStrokePattern ? createCanvasPattern(ctx2, stroke, el) : el.__canvasStrokePattern;
|
|
22955
22956
|
el.__canvasStrokePattern = fillPattern;
|
|
22956
22957
|
}
|
|
22957
22958
|
if (hasFillGradient) {
|
|
22958
|
-
|
|
22959
|
+
ctx2.fillStyle = fillGradient;
|
|
22959
22960
|
} else if (hasFillPattern) {
|
|
22960
22961
|
if (fillPattern) {
|
|
22961
|
-
|
|
22962
|
+
ctx2.fillStyle = fillPattern;
|
|
22962
22963
|
} else {
|
|
22963
22964
|
hasFill = false;
|
|
22964
22965
|
}
|
|
22965
22966
|
}
|
|
22966
22967
|
if (hasStrokeGradient) {
|
|
22967
|
-
|
|
22968
|
+
ctx2.strokeStyle = strokeGradient;
|
|
22968
22969
|
} else if (hasStrokePattern) {
|
|
22969
22970
|
if (strokePattern) {
|
|
22970
|
-
|
|
22971
|
+
ctx2.strokeStyle = strokePattern;
|
|
22971
22972
|
} else {
|
|
22972
22973
|
hasStroke = false;
|
|
22973
22974
|
}
|
|
@@ -22977,16 +22978,16 @@ function brushPath(ctx, el, style, inBatch) {
|
|
|
22977
22978
|
path.setScale(scale4[0], scale4[1], el.segmentIgnoreThreshold);
|
|
22978
22979
|
let lineDash;
|
|
22979
22980
|
let lineDashOffset;
|
|
22980
|
-
if (
|
|
22981
|
+
if (ctx2.setLineDash && style.lineDash) {
|
|
22981
22982
|
[lineDash, lineDashOffset] = getLineDash(el);
|
|
22982
22983
|
}
|
|
22983
22984
|
let needsRebuild = true;
|
|
22984
22985
|
if (firstDraw || dirtyFlag & SHAPE_CHANGED_BIT) {
|
|
22985
|
-
path.setDPR(
|
|
22986
|
+
path.setDPR(ctx2.dpr);
|
|
22986
22987
|
if (strokePart) {
|
|
22987
22988
|
path.setContext(null);
|
|
22988
22989
|
} else {
|
|
22989
|
-
path.setContext(
|
|
22990
|
+
path.setContext(ctx2);
|
|
22990
22991
|
needsRebuild = false;
|
|
22991
22992
|
}
|
|
22992
22993
|
path.reset();
|
|
@@ -22995,34 +22996,34 @@ function brushPath(ctx, el, style, inBatch) {
|
|
|
22995
22996
|
el.pathUpdated();
|
|
22996
22997
|
}
|
|
22997
22998
|
if (needsRebuild) {
|
|
22998
|
-
path.rebuildPath(
|
|
22999
|
+
path.rebuildPath(ctx2, strokePart ? strokePercent : 1);
|
|
22999
23000
|
}
|
|
23000
23001
|
if (lineDash) {
|
|
23001
|
-
|
|
23002
|
-
|
|
23002
|
+
ctx2.setLineDash(lineDash);
|
|
23003
|
+
ctx2.lineDashOffset = lineDashOffset;
|
|
23003
23004
|
}
|
|
23004
23005
|
if (!inBatch) {
|
|
23005
23006
|
if (style.strokeFirst) {
|
|
23006
23007
|
if (hasStroke) {
|
|
23007
|
-
doStrokePath(
|
|
23008
|
+
doStrokePath(ctx2, style);
|
|
23008
23009
|
}
|
|
23009
23010
|
if (hasFill) {
|
|
23010
|
-
doFillPath(
|
|
23011
|
+
doFillPath(ctx2, style);
|
|
23011
23012
|
}
|
|
23012
23013
|
} else {
|
|
23013
23014
|
if (hasFill) {
|
|
23014
|
-
doFillPath(
|
|
23015
|
+
doFillPath(ctx2, style);
|
|
23015
23016
|
}
|
|
23016
23017
|
if (hasStroke) {
|
|
23017
|
-
doStrokePath(
|
|
23018
|
+
doStrokePath(ctx2, style);
|
|
23018
23019
|
}
|
|
23019
23020
|
}
|
|
23020
23021
|
}
|
|
23021
23022
|
if (lineDash) {
|
|
23022
|
-
|
|
23023
|
+
ctx2.setLineDash([]);
|
|
23023
23024
|
}
|
|
23024
23025
|
}
|
|
23025
|
-
function brushImage(
|
|
23026
|
+
function brushImage(ctx2, el, style) {
|
|
23026
23027
|
const image = el.__image = createOrUpdateImage(style.image, el.__image, el, el.onload);
|
|
23027
23028
|
if (!image || !isImageReady(image)) {
|
|
23028
23029
|
return;
|
|
@@ -23043,50 +23044,50 @@ function brushImage(ctx, el, style) {
|
|
|
23043
23044
|
if (style.sWidth && style.sHeight) {
|
|
23044
23045
|
const sx = style.sx || 0;
|
|
23045
23046
|
const sy = style.sy || 0;
|
|
23046
|
-
|
|
23047
|
+
ctx2.drawImage(image, sx, sy, style.sWidth, style.sHeight, x, y, width, height);
|
|
23047
23048
|
} else if (style.sx && style.sy) {
|
|
23048
23049
|
const sx = style.sx;
|
|
23049
23050
|
const sy = style.sy;
|
|
23050
23051
|
const sWidth = width - sx;
|
|
23051
23052
|
const sHeight = height - sy;
|
|
23052
|
-
|
|
23053
|
+
ctx2.drawImage(image, sx, sy, sWidth, sHeight, x, y, width, height);
|
|
23053
23054
|
} else {
|
|
23054
|
-
|
|
23055
|
+
ctx2.drawImage(image, x, y, width, height);
|
|
23055
23056
|
}
|
|
23056
23057
|
}
|
|
23057
|
-
function brushText(
|
|
23058
|
+
function brushText(ctx2, el, style) {
|
|
23058
23059
|
let text = style.text;
|
|
23059
23060
|
text != null && (text += "");
|
|
23060
23061
|
if (text) {
|
|
23061
|
-
|
|
23062
|
-
|
|
23063
|
-
|
|
23062
|
+
ctx2.font = style.font || DEFAULT_FONT;
|
|
23063
|
+
ctx2.textAlign = style.textAlign;
|
|
23064
|
+
ctx2.textBaseline = style.textBaseline;
|
|
23064
23065
|
let lineDash;
|
|
23065
23066
|
let lineDashOffset;
|
|
23066
|
-
if (
|
|
23067
|
+
if (ctx2.setLineDash && style.lineDash) {
|
|
23067
23068
|
[lineDash, lineDashOffset] = getLineDash(el);
|
|
23068
23069
|
}
|
|
23069
23070
|
if (lineDash) {
|
|
23070
|
-
|
|
23071
|
-
|
|
23071
|
+
ctx2.setLineDash(lineDash);
|
|
23072
|
+
ctx2.lineDashOffset = lineDashOffset;
|
|
23072
23073
|
}
|
|
23073
23074
|
if (style.strokeFirst) {
|
|
23074
23075
|
if (styleHasStroke(style)) {
|
|
23075
|
-
|
|
23076
|
+
ctx2.strokeText(text, style.x, style.y);
|
|
23076
23077
|
}
|
|
23077
23078
|
if (styleHasFill(style)) {
|
|
23078
|
-
|
|
23079
|
+
ctx2.fillText(text, style.x, style.y);
|
|
23079
23080
|
}
|
|
23080
23081
|
} else {
|
|
23081
23082
|
if (styleHasFill(style)) {
|
|
23082
|
-
|
|
23083
|
+
ctx2.fillText(text, style.x, style.y);
|
|
23083
23084
|
}
|
|
23084
23085
|
if (styleHasStroke(style)) {
|
|
23085
|
-
|
|
23086
|
+
ctx2.strokeText(text, style.x, style.y);
|
|
23086
23087
|
}
|
|
23087
23088
|
}
|
|
23088
23089
|
if (lineDash) {
|
|
23089
|
-
|
|
23090
|
+
ctx2.setLineDash([]);
|
|
23090
23091
|
}
|
|
23091
23092
|
}
|
|
23092
23093
|
}
|
|
@@ -23096,7 +23097,7 @@ var STROKE_PROPS = [
|
|
|
23096
23097
|
["lineJoin", "miter"],
|
|
23097
23098
|
["miterLimit", 10]
|
|
23098
23099
|
];
|
|
23099
|
-
function bindCommonProps(
|
|
23100
|
+
function bindCommonProps(ctx2, style, prevStyle, forceSetAll, scope) {
|
|
23100
23101
|
let styleChanged = false;
|
|
23101
23102
|
if (!forceSetAll) {
|
|
23102
23103
|
prevStyle = prevStyle || {};
|
|
@@ -23105,74 +23106,74 @@ function bindCommonProps(ctx, style, prevStyle, forceSetAll, scope) {
|
|
|
23105
23106
|
}
|
|
23106
23107
|
}
|
|
23107
23108
|
if (forceSetAll || style.opacity !== prevStyle.opacity) {
|
|
23108
|
-
flushPathDrawn(
|
|
23109
|
+
flushPathDrawn(ctx2, scope);
|
|
23109
23110
|
styleChanged = true;
|
|
23110
23111
|
const opacity = Math.max(Math.min(style.opacity, 1), 0);
|
|
23111
|
-
|
|
23112
|
+
ctx2.globalAlpha = isNaN(opacity) ? DEFAULT_COMMON_STYLE.opacity : opacity;
|
|
23112
23113
|
}
|
|
23113
23114
|
if (forceSetAll || style.blend !== prevStyle.blend) {
|
|
23114
23115
|
if (!styleChanged) {
|
|
23115
|
-
flushPathDrawn(
|
|
23116
|
+
flushPathDrawn(ctx2, scope);
|
|
23116
23117
|
styleChanged = true;
|
|
23117
23118
|
}
|
|
23118
|
-
|
|
23119
|
+
ctx2.globalCompositeOperation = style.blend || DEFAULT_COMMON_STYLE.blend;
|
|
23119
23120
|
}
|
|
23120
23121
|
for (let i = 0; i < SHADOW_NUMBER_PROPS.length; i++) {
|
|
23121
23122
|
const propName = SHADOW_NUMBER_PROPS[i];
|
|
23122
23123
|
if (forceSetAll || style[propName] !== prevStyle[propName]) {
|
|
23123
23124
|
if (!styleChanged) {
|
|
23124
|
-
flushPathDrawn(
|
|
23125
|
+
flushPathDrawn(ctx2, scope);
|
|
23125
23126
|
styleChanged = true;
|
|
23126
23127
|
}
|
|
23127
|
-
|
|
23128
|
+
ctx2[propName] = ctx2.dpr * (style[propName] || 0);
|
|
23128
23129
|
}
|
|
23129
23130
|
}
|
|
23130
23131
|
if (forceSetAll || style.shadowColor !== prevStyle.shadowColor) {
|
|
23131
23132
|
if (!styleChanged) {
|
|
23132
|
-
flushPathDrawn(
|
|
23133
|
+
flushPathDrawn(ctx2, scope);
|
|
23133
23134
|
styleChanged = true;
|
|
23134
23135
|
}
|
|
23135
|
-
|
|
23136
|
+
ctx2.shadowColor = style.shadowColor || DEFAULT_COMMON_STYLE.shadowColor;
|
|
23136
23137
|
}
|
|
23137
23138
|
return styleChanged;
|
|
23138
23139
|
}
|
|
23139
|
-
function bindPathAndTextCommonStyle(
|
|
23140
|
+
function bindPathAndTextCommonStyle(ctx2, el, prevEl, forceSetAll, scope) {
|
|
23140
23141
|
const style = getStyle(el, scope.inHover);
|
|
23141
23142
|
const prevStyle = forceSetAll ? null : prevEl && getStyle(prevEl, scope.inHover) || {};
|
|
23142
23143
|
if (style === prevStyle) {
|
|
23143
23144
|
return false;
|
|
23144
23145
|
}
|
|
23145
|
-
let styleChanged = bindCommonProps(
|
|
23146
|
+
let styleChanged = bindCommonProps(ctx2, style, prevStyle, forceSetAll, scope);
|
|
23146
23147
|
if (forceSetAll || style.fill !== prevStyle.fill) {
|
|
23147
23148
|
if (!styleChanged) {
|
|
23148
|
-
flushPathDrawn(
|
|
23149
|
+
flushPathDrawn(ctx2, scope);
|
|
23149
23150
|
styleChanged = true;
|
|
23150
23151
|
}
|
|
23151
|
-
isValidStrokeFillStyle(style.fill) && (
|
|
23152
|
+
isValidStrokeFillStyle(style.fill) && (ctx2.fillStyle = style.fill);
|
|
23152
23153
|
}
|
|
23153
23154
|
if (forceSetAll || style.stroke !== prevStyle.stroke) {
|
|
23154
23155
|
if (!styleChanged) {
|
|
23155
|
-
flushPathDrawn(
|
|
23156
|
+
flushPathDrawn(ctx2, scope);
|
|
23156
23157
|
styleChanged = true;
|
|
23157
23158
|
}
|
|
23158
|
-
isValidStrokeFillStyle(style.stroke) && (
|
|
23159
|
+
isValidStrokeFillStyle(style.stroke) && (ctx2.strokeStyle = style.stroke);
|
|
23159
23160
|
}
|
|
23160
23161
|
if (forceSetAll || style.opacity !== prevStyle.opacity) {
|
|
23161
23162
|
if (!styleChanged) {
|
|
23162
|
-
flushPathDrawn(
|
|
23163
|
+
flushPathDrawn(ctx2, scope);
|
|
23163
23164
|
styleChanged = true;
|
|
23164
23165
|
}
|
|
23165
|
-
|
|
23166
|
+
ctx2.globalAlpha = style.opacity == null ? 1 : style.opacity;
|
|
23166
23167
|
}
|
|
23167
23168
|
if (el.hasStroke()) {
|
|
23168
23169
|
const lineWidth = style.lineWidth;
|
|
23169
23170
|
const newLineWidth = lineWidth / (style.strokeNoScale && el.getLineScale ? el.getLineScale() : 1);
|
|
23170
|
-
if (
|
|
23171
|
+
if (ctx2.lineWidth !== newLineWidth) {
|
|
23171
23172
|
if (!styleChanged) {
|
|
23172
|
-
flushPathDrawn(
|
|
23173
|
+
flushPathDrawn(ctx2, scope);
|
|
23173
23174
|
styleChanged = true;
|
|
23174
23175
|
}
|
|
23175
|
-
|
|
23176
|
+
ctx2.lineWidth = newLineWidth;
|
|
23176
23177
|
}
|
|
23177
23178
|
}
|
|
23178
23179
|
for (let i = 0; i < STROKE_PROPS.length; i++) {
|
|
@@ -23180,35 +23181,35 @@ function bindPathAndTextCommonStyle(ctx, el, prevEl, forceSetAll, scope) {
|
|
|
23180
23181
|
const propName = prop[0];
|
|
23181
23182
|
if (forceSetAll || style[propName] !== prevStyle[propName]) {
|
|
23182
23183
|
if (!styleChanged) {
|
|
23183
|
-
flushPathDrawn(
|
|
23184
|
+
flushPathDrawn(ctx2, scope);
|
|
23184
23185
|
styleChanged = true;
|
|
23185
23186
|
}
|
|
23186
|
-
|
|
23187
|
+
ctx2[propName] = style[propName] || prop[1];
|
|
23187
23188
|
}
|
|
23188
23189
|
}
|
|
23189
23190
|
return styleChanged;
|
|
23190
23191
|
}
|
|
23191
|
-
function bindImageStyle(
|
|
23192
|
-
return bindCommonProps(
|
|
23192
|
+
function bindImageStyle(ctx2, el, prevEl, forceSetAll, scope) {
|
|
23193
|
+
return bindCommonProps(ctx2, getStyle(el, scope.inHover), prevEl && getStyle(prevEl, scope.inHover), forceSetAll, scope);
|
|
23193
23194
|
}
|
|
23194
|
-
function setContextTransform(
|
|
23195
|
+
function setContextTransform(ctx2, el) {
|
|
23195
23196
|
const m2 = el.transform;
|
|
23196
|
-
const dpr2 =
|
|
23197
|
+
const dpr2 = ctx2.dpr || 1;
|
|
23197
23198
|
if (m2) {
|
|
23198
|
-
|
|
23199
|
+
ctx2.setTransform(dpr2 * m2[0], dpr2 * m2[1], dpr2 * m2[2], dpr2 * m2[3], dpr2 * m2[4], dpr2 * m2[5]);
|
|
23199
23200
|
} else {
|
|
23200
|
-
|
|
23201
|
+
ctx2.setTransform(dpr2, 0, 0, dpr2, 0, 0);
|
|
23201
23202
|
}
|
|
23202
23203
|
}
|
|
23203
|
-
function updateClipStatus(clipPaths,
|
|
23204
|
+
function updateClipStatus(clipPaths, ctx2, scope) {
|
|
23204
23205
|
let allClipped = false;
|
|
23205
23206
|
for (let i = 0; i < clipPaths.length; i++) {
|
|
23206
23207
|
const clipPath = clipPaths[i];
|
|
23207
23208
|
allClipped = allClipped || clipPath.isZeroArea();
|
|
23208
|
-
setContextTransform(
|
|
23209
|
-
|
|
23210
|
-
clipPath.buildPath(
|
|
23211
|
-
|
|
23209
|
+
setContextTransform(ctx2, clipPath);
|
|
23210
|
+
ctx2.beginPath();
|
|
23211
|
+
clipPath.buildPath(ctx2, clipPath.shape);
|
|
23212
|
+
ctx2.clip();
|
|
23212
23213
|
}
|
|
23213
23214
|
scope.allClipped = allClipped;
|
|
23214
23215
|
}
|
|
@@ -23229,19 +23230,19 @@ function canPathBatch(style) {
|
|
|
23229
23230
|
const hasStroke = styleHasStroke(style);
|
|
23230
23231
|
return !(style.lineDash || !(+hasFill ^ +hasStroke) || hasFill && typeof style.fill !== "string" || hasStroke && typeof style.stroke !== "string" || style.strokePercent < 1 || style.strokeOpacity < 1 || style.fillOpacity < 1);
|
|
23231
23232
|
}
|
|
23232
|
-
function flushPathDrawn(
|
|
23233
|
-
scope.batchFill &&
|
|
23234
|
-
scope.batchStroke &&
|
|
23233
|
+
function flushPathDrawn(ctx2, scope) {
|
|
23234
|
+
scope.batchFill && ctx2.fill();
|
|
23235
|
+
scope.batchStroke && ctx2.stroke();
|
|
23235
23236
|
scope.batchFill = "";
|
|
23236
23237
|
scope.batchStroke = "";
|
|
23237
23238
|
}
|
|
23238
23239
|
function getStyle(el, inHover) {
|
|
23239
23240
|
return inHover ? el.__hoverStyle || el.style : el.style;
|
|
23240
23241
|
}
|
|
23241
|
-
function brushSingle(
|
|
23242
|
-
brush(
|
|
23242
|
+
function brushSingle(ctx2, el) {
|
|
23243
|
+
brush(ctx2, el, {inHover: false, viewWidth: 0, viewHeight: 0}, true);
|
|
23243
23244
|
}
|
|
23244
|
-
function brush(
|
|
23245
|
+
function brush(ctx2, el, scope, isLast) {
|
|
23245
23246
|
const m2 = el.transform;
|
|
23246
23247
|
if (!el.shouldBePainted(scope.viewWidth, scope.viewHeight, false, false)) {
|
|
23247
23248
|
el.__dirty &= ~REDRAW_BIT;
|
|
@@ -23254,17 +23255,17 @@ function brush(ctx, el, scope, isLast) {
|
|
|
23254
23255
|
let forceSetStyle = false;
|
|
23255
23256
|
if (!prevElClipPaths || isClipPathChanged(clipPaths, prevElClipPaths)) {
|
|
23256
23257
|
if (prevElClipPaths && prevElClipPaths.length) {
|
|
23257
|
-
flushPathDrawn(
|
|
23258
|
-
|
|
23258
|
+
flushPathDrawn(ctx2, scope);
|
|
23259
|
+
ctx2.restore();
|
|
23259
23260
|
forceSetStyle = forceSetTransform = true;
|
|
23260
23261
|
scope.prevElClipPaths = null;
|
|
23261
23262
|
scope.allClipped = false;
|
|
23262
23263
|
scope.prevEl = null;
|
|
23263
23264
|
}
|
|
23264
23265
|
if (clipPaths && clipPaths.length) {
|
|
23265
|
-
flushPathDrawn(
|
|
23266
|
-
|
|
23267
|
-
updateClipStatus(clipPaths,
|
|
23266
|
+
flushPathDrawn(ctx2, scope);
|
|
23267
|
+
ctx2.save();
|
|
23268
|
+
updateClipStatus(clipPaths, ctx2, scope);
|
|
23268
23269
|
forceSetTransform = true;
|
|
23269
23270
|
}
|
|
23270
23271
|
scope.prevElClipPaths = clipPaths;
|
|
@@ -23281,10 +23282,10 @@ function brush(ctx, el, scope, isLast) {
|
|
|
23281
23282
|
}
|
|
23282
23283
|
let canBatchPath = el instanceof Path_default && el.autoBatch && canPathBatch(el.style);
|
|
23283
23284
|
if (forceSetTransform || isTransformChanged(m2, prevEl.transform)) {
|
|
23284
|
-
flushPathDrawn(
|
|
23285
|
-
setContextTransform(
|
|
23285
|
+
flushPathDrawn(ctx2, scope);
|
|
23286
|
+
setContextTransform(ctx2, el);
|
|
23286
23287
|
} else if (!canBatchPath) {
|
|
23287
|
-
flushPathDrawn(
|
|
23288
|
+
flushPathDrawn(ctx2, scope);
|
|
23288
23289
|
}
|
|
23289
23290
|
const style = getStyle(el, scope.inHover);
|
|
23290
23291
|
if (el instanceof Path_default) {
|
|
@@ -23292,11 +23293,11 @@ function brush(ctx, el, scope, isLast) {
|
|
|
23292
23293
|
forceSetStyle = true;
|
|
23293
23294
|
scope.lastDrawType = DRAW_TYPE_PATH;
|
|
23294
23295
|
}
|
|
23295
|
-
bindPathAndTextCommonStyle(
|
|
23296
|
+
bindPathAndTextCommonStyle(ctx2, el, prevEl, forceSetStyle, scope);
|
|
23296
23297
|
if (!canBatchPath || !scope.batchFill && !scope.batchStroke) {
|
|
23297
|
-
|
|
23298
|
+
ctx2.beginPath();
|
|
23298
23299
|
}
|
|
23299
|
-
brushPath(
|
|
23300
|
+
brushPath(ctx2, el, style, canBatchPath);
|
|
23300
23301
|
if (canBatchPath) {
|
|
23301
23302
|
scope.batchFill = style.fill || "";
|
|
23302
23303
|
scope.batchStroke = style.stroke || "";
|
|
@@ -23307,25 +23308,25 @@ function brush(ctx, el, scope, isLast) {
|
|
|
23307
23308
|
forceSetStyle = true;
|
|
23308
23309
|
scope.lastDrawType = DRAW_TYPE_TEXT;
|
|
23309
23310
|
}
|
|
23310
|
-
bindPathAndTextCommonStyle(
|
|
23311
|
-
brushText(
|
|
23311
|
+
bindPathAndTextCommonStyle(ctx2, el, prevEl, forceSetStyle, scope);
|
|
23312
|
+
brushText(ctx2, el, style);
|
|
23312
23313
|
} else if (el instanceof Image_default) {
|
|
23313
23314
|
if (scope.lastDrawType !== DRAW_TYPE_IMAGE) {
|
|
23314
23315
|
forceSetStyle = true;
|
|
23315
23316
|
scope.lastDrawType = DRAW_TYPE_IMAGE;
|
|
23316
23317
|
}
|
|
23317
|
-
bindImageStyle(
|
|
23318
|
-
brushImage(
|
|
23318
|
+
bindImageStyle(ctx2, el, prevEl, forceSetStyle, scope);
|
|
23319
|
+
brushImage(ctx2, el, style);
|
|
23319
23320
|
} else if (el.getTemporalDisplayables) {
|
|
23320
23321
|
if (scope.lastDrawType !== DRAW_TYPE_INCREMENTAL) {
|
|
23321
23322
|
forceSetStyle = true;
|
|
23322
23323
|
scope.lastDrawType = DRAW_TYPE_INCREMENTAL;
|
|
23323
23324
|
}
|
|
23324
|
-
brushIncremental(
|
|
23325
|
+
brushIncremental(ctx2, el, scope);
|
|
23325
23326
|
}
|
|
23326
23327
|
}
|
|
23327
23328
|
if (canBatchPath && isLast) {
|
|
23328
|
-
flushPathDrawn(
|
|
23329
|
+
flushPathDrawn(ctx2, scope);
|
|
23329
23330
|
}
|
|
23330
23331
|
el.innerAfterBrush();
|
|
23331
23332
|
el.afterBrush && el.afterBrush();
|
|
@@ -23333,10 +23334,10 @@ function brush(ctx, el, scope, isLast) {
|
|
|
23333
23334
|
el.__dirty = 0;
|
|
23334
23335
|
el.__isRendered = true;
|
|
23335
23336
|
}
|
|
23336
|
-
function brushIncremental(
|
|
23337
|
+
function brushIncremental(ctx2, el, scope) {
|
|
23337
23338
|
let displayables = el.getDisplayables();
|
|
23338
23339
|
let temporalDisplayables = el.getTemporalDisplayables();
|
|
23339
|
-
|
|
23340
|
+
ctx2.save();
|
|
23340
23341
|
let innerScope = {
|
|
23341
23342
|
prevElClipPaths: null,
|
|
23342
23343
|
prevEl: null,
|
|
@@ -23351,7 +23352,7 @@ function brushIncremental(ctx, el, scope) {
|
|
|
23351
23352
|
const displayable = displayables[i];
|
|
23352
23353
|
displayable.beforeBrush && displayable.beforeBrush();
|
|
23353
23354
|
displayable.innerBeforeBrush();
|
|
23354
|
-
brush(
|
|
23355
|
+
brush(ctx2, displayable, innerScope, i === len2 - 1);
|
|
23355
23356
|
displayable.innerAfterBrush();
|
|
23356
23357
|
displayable.afterBrush && displayable.afterBrush();
|
|
23357
23358
|
innerScope.prevEl = displayable;
|
|
@@ -23360,14 +23361,14 @@ function brushIncremental(ctx, el, scope) {
|
|
|
23360
23361
|
const displayable = temporalDisplayables[i2];
|
|
23361
23362
|
displayable.beforeBrush && displayable.beforeBrush();
|
|
23362
23363
|
displayable.innerBeforeBrush();
|
|
23363
|
-
brush(
|
|
23364
|
+
brush(ctx2, displayable, innerScope, i2 === len3 - 1);
|
|
23364
23365
|
displayable.innerAfterBrush();
|
|
23365
23366
|
displayable.afterBrush && displayable.afterBrush();
|
|
23366
23367
|
innerScope.prevEl = displayable;
|
|
23367
23368
|
}
|
|
23368
23369
|
el.clearTemporalDisplayables();
|
|
23369
23370
|
el.notClear = true;
|
|
23370
|
-
|
|
23371
|
+
ctx2.restore();
|
|
23371
23372
|
}
|
|
23372
23373
|
|
|
23373
23374
|
// src/util/decal.ts
|
|
@@ -23444,7 +23445,7 @@ function createOrUpdatePatternFromDecal(decalObject, api2) {
|
|
|
23444
23445
|
const symbolArray = normalizeSymbolArray(decalOpt.symbol);
|
|
23445
23446
|
const lineBlockLengthsX = getLineBlockLengthX(dashArrayX);
|
|
23446
23447
|
const lineBlockLengthY = getLineBlockLengthY(dashArrayY);
|
|
23447
|
-
const
|
|
23448
|
+
const canvas2 = !isSVG && platformApi.createCanvas();
|
|
23448
23449
|
const svgRoot = isSVG && {
|
|
23449
23450
|
tag: "g",
|
|
23450
23451
|
attrs: {},
|
|
@@ -23452,17 +23453,17 @@ function createOrUpdatePatternFromDecal(decalObject, api2) {
|
|
|
23452
23453
|
children: []
|
|
23453
23454
|
};
|
|
23454
23455
|
const pSize = getPatternSize();
|
|
23455
|
-
let
|
|
23456
|
-
if (
|
|
23457
|
-
|
|
23458
|
-
|
|
23459
|
-
|
|
23456
|
+
let ctx2;
|
|
23457
|
+
if (canvas2) {
|
|
23458
|
+
canvas2.width = pSize.width * dpr2;
|
|
23459
|
+
canvas2.height = pSize.height * dpr2;
|
|
23460
|
+
ctx2 = canvas2.getContext("2d");
|
|
23460
23461
|
}
|
|
23461
23462
|
brushDecal();
|
|
23462
23463
|
if (isValidKey) {
|
|
23463
|
-
decalCache.put(cacheKey,
|
|
23464
|
+
decalCache.put(cacheKey, canvas2 || svgRoot);
|
|
23464
23465
|
}
|
|
23465
|
-
pattern2.image =
|
|
23466
|
+
pattern2.image = canvas2;
|
|
23466
23467
|
pattern2.svgElement = svgRoot;
|
|
23467
23468
|
pattern2.svgWidth = pSize.width;
|
|
23468
23469
|
pattern2.svgHeight = pSize.height;
|
|
@@ -23494,11 +23495,11 @@ function createOrUpdatePatternFromDecal(decalObject, api2) {
|
|
|
23494
23495
|
};
|
|
23495
23496
|
}
|
|
23496
23497
|
function brushDecal() {
|
|
23497
|
-
if (
|
|
23498
|
-
|
|
23498
|
+
if (ctx2) {
|
|
23499
|
+
ctx2.clearRect(0, 0, canvas2.width, canvas2.height);
|
|
23499
23500
|
if (decalOpt.backgroundColor) {
|
|
23500
|
-
|
|
23501
|
-
|
|
23501
|
+
ctx2.fillStyle = decalOpt.backgroundColor;
|
|
23502
|
+
ctx2.fillRect(0, 0, canvas2.width, canvas2.height);
|
|
23502
23503
|
}
|
|
23503
23504
|
}
|
|
23504
23505
|
let ySum = 0;
|
|
@@ -23563,7 +23564,7 @@ function createOrUpdatePatternFromDecal(decalObject, api2) {
|
|
|
23563
23564
|
svgRoot.children.push(symbolVNode);
|
|
23564
23565
|
}
|
|
23565
23566
|
} else {
|
|
23566
|
-
brushSingle(
|
|
23567
|
+
brushSingle(ctx2, symbol);
|
|
23567
23568
|
}
|
|
23568
23569
|
}
|
|
23569
23570
|
}
|
|
@@ -24134,14 +24135,14 @@ var ECharts = class extends Eventful_default {
|
|
|
24134
24135
|
const dpr2 = opts && opts.pixelRatio || this.getDevicePixelRatio();
|
|
24135
24136
|
each(instances2, function(chart, id) {
|
|
24136
24137
|
if (chart.group === groupId) {
|
|
24137
|
-
const
|
|
24138
|
+
const canvas2 = isSvg ? chart.getZr().painter.getSvgDom().innerHTML : chart.renderToCanvas(clone(opts));
|
|
24138
24139
|
const boundingRect = chart.getDom().getBoundingClientRect();
|
|
24139
24140
|
left = mathMin12(boundingRect.left, left);
|
|
24140
24141
|
top = mathMin12(boundingRect.top, top);
|
|
24141
24142
|
right = mathMax12(boundingRect.right, right);
|
|
24142
24143
|
bottom = mathMax12(boundingRect.bottom, bottom);
|
|
24143
24144
|
canvasList.push({
|
|
24144
|
-
dom:
|
|
24145
|
+
dom: canvas2,
|
|
24145
24146
|
left: boundingRect.left,
|
|
24146
24147
|
top: boundingRect.top
|
|
24147
24148
|
});
|
|
@@ -25467,7 +25468,7 @@ ECharts.internalField = function() {
|
|
|
25467
25468
|
var echartsProto = ECharts.prototype;
|
|
25468
25469
|
echartsProto.on = createRegisterEventWithLowercaseECharts("on");
|
|
25469
25470
|
echartsProto.off = createRegisterEventWithLowercaseECharts("off");
|
|
25470
|
-
echartsProto.one = function(eventName, cb,
|
|
25471
|
+
echartsProto.one = function(eventName, cb, ctx2) {
|
|
25471
25472
|
const self2 = this;
|
|
25472
25473
|
deprecateLog("ECharts#one is deprecated.");
|
|
25473
25474
|
function wrapped(...args2) {
|
|
@@ -25475,7 +25476,7 @@ echartsProto.one = function(eventName, cb, ctx) {
|
|
|
25475
25476
|
self2.off(eventName, wrapped);
|
|
25476
25477
|
}
|
|
25477
25478
|
;
|
|
25478
|
-
this.on.call(this, eventName, wrapped,
|
|
25479
|
+
this.on.call(this, eventName, wrapped, ctx2);
|
|
25479
25480
|
};
|
|
25480
25481
|
var MOUSE_EVENT_NAMES = [
|
|
25481
25482
|
"click",
|
|
@@ -26537,25 +26538,25 @@ var SeriesData2 = class {
|
|
|
26537
26538
|
indicesOfNearest(dim, value, maxDistance) {
|
|
26538
26539
|
return this._store.indicesOfNearest(this._getStoreDimIndex(dim), value, maxDistance);
|
|
26539
26540
|
}
|
|
26540
|
-
each(dims, cb,
|
|
26541
|
+
each(dims, cb, ctx2) {
|
|
26541
26542
|
"use strict";
|
|
26542
26543
|
if (isFunction(dims)) {
|
|
26543
|
-
|
|
26544
|
+
ctx2 = cb;
|
|
26544
26545
|
cb = dims;
|
|
26545
26546
|
dims = [];
|
|
26546
26547
|
}
|
|
26547
|
-
const fCtx =
|
|
26548
|
+
const fCtx = ctx2 || this;
|
|
26548
26549
|
const dimIndices = map2(normalizeDimensions(dims), this._getStoreDimIndex, this);
|
|
26549
26550
|
this._store.each(dimIndices, fCtx ? bind(cb, fCtx) : cb);
|
|
26550
26551
|
}
|
|
26551
|
-
filterSelf(dims, cb,
|
|
26552
|
+
filterSelf(dims, cb, ctx2) {
|
|
26552
26553
|
"use strict";
|
|
26553
26554
|
if (isFunction(dims)) {
|
|
26554
|
-
|
|
26555
|
+
ctx2 = cb;
|
|
26555
26556
|
cb = dims;
|
|
26556
26557
|
dims = [];
|
|
26557
26558
|
}
|
|
26558
|
-
const fCtx =
|
|
26559
|
+
const fCtx = ctx2 || this;
|
|
26559
26560
|
const dimIndices = map2(normalizeDimensions(dims), this._getStoreDimIndex, this);
|
|
26560
26561
|
this._store = this._store.filter(dimIndices, fCtx ? bind(cb, fCtx) : cb);
|
|
26561
26562
|
return this;
|
|
@@ -26573,30 +26574,30 @@ var SeriesData2 = class {
|
|
|
26573
26574
|
this._store = this._store.selectRange(innerRange, contrastFn);
|
|
26574
26575
|
return this;
|
|
26575
26576
|
}
|
|
26576
|
-
mapArray(dims, cb,
|
|
26577
|
+
mapArray(dims, cb, ctx2) {
|
|
26577
26578
|
"use strict";
|
|
26578
26579
|
if (isFunction(dims)) {
|
|
26579
|
-
|
|
26580
|
+
ctx2 = cb;
|
|
26580
26581
|
cb = dims;
|
|
26581
26582
|
dims = [];
|
|
26582
26583
|
}
|
|
26583
|
-
|
|
26584
|
+
ctx2 = ctx2 || this;
|
|
26584
26585
|
const result = [];
|
|
26585
26586
|
this.each(dims, function() {
|
|
26586
26587
|
result.push(cb && cb.apply(this, arguments));
|
|
26587
|
-
},
|
|
26588
|
+
}, ctx2);
|
|
26588
26589
|
return result;
|
|
26589
26590
|
}
|
|
26590
|
-
map(dims, cb,
|
|
26591
|
+
map(dims, cb, ctx2, ctxCompat) {
|
|
26591
26592
|
"use strict";
|
|
26592
|
-
const fCtx =
|
|
26593
|
+
const fCtx = ctx2 || ctxCompat || this;
|
|
26593
26594
|
const dimIndices = map2(normalizeDimensions(dims), this._getStoreDimIndex, this);
|
|
26594
26595
|
const list = cloneListForMapAndSample(this);
|
|
26595
26596
|
list._store = this._store.map(dimIndices, fCtx ? bind(cb, fCtx) : cb);
|
|
26596
26597
|
return list;
|
|
26597
26598
|
}
|
|
26598
|
-
modify(dims, cb,
|
|
26599
|
-
const fCtx =
|
|
26599
|
+
modify(dims, cb, ctx2, ctxCompat) {
|
|
26600
|
+
const fCtx = ctx2 || ctxCompat || this;
|
|
26600
26601
|
if (true) {
|
|
26601
26602
|
each(normalizeDimensions(dims), (dim) => {
|
|
26602
26603
|
const dimInfo = this.getDimensionInfo(dim);
|
|
@@ -33000,7 +33001,7 @@ var Layer = class extends Eventful_default {
|
|
|
33000
33001
|
}
|
|
33001
33002
|
clear(clearAll, clearColor, repaintRects) {
|
|
33002
33003
|
const dom = this.dom;
|
|
33003
|
-
const
|
|
33004
|
+
const ctx2 = this.ctx;
|
|
33004
33005
|
const width = dom.width;
|
|
33005
33006
|
const height = dom.height;
|
|
33006
33007
|
clearColor = clearColor || this.clearColor;
|
|
@@ -33017,12 +33018,12 @@ var Layer = class extends Eventful_default {
|
|
|
33017
33018
|
}
|
|
33018
33019
|
const domBack = this.domBack;
|
|
33019
33020
|
function doClear(x, y, width2, height2) {
|
|
33020
|
-
|
|
33021
|
+
ctx2.clearRect(x, y, width2, height2);
|
|
33021
33022
|
if (clearColor && clearColor !== "transparent") {
|
|
33022
33023
|
let clearColorGradientOrPattern;
|
|
33023
33024
|
if (isGradientObject(clearColor)) {
|
|
33024
33025
|
const shouldCache = clearColor.global || clearColor.__width === width2 && clearColor.__height === height2;
|
|
33025
|
-
clearColorGradientOrPattern = shouldCache && clearColor.__canvasGradient || getCanvasGradient(
|
|
33026
|
+
clearColorGradientOrPattern = shouldCache && clearColor.__canvasGradient || getCanvasGradient(ctx2, clearColor, {
|
|
33026
33027
|
x: 0,
|
|
33027
33028
|
y: 0,
|
|
33028
33029
|
width: width2,
|
|
@@ -33034,23 +33035,23 @@ var Layer = class extends Eventful_default {
|
|
|
33034
33035
|
} else if (isImagePatternObject(clearColor)) {
|
|
33035
33036
|
clearColor.scaleX = clearColor.scaleX || dpr2;
|
|
33036
33037
|
clearColor.scaleY = clearColor.scaleY || dpr2;
|
|
33037
|
-
clearColorGradientOrPattern = createCanvasPattern(
|
|
33038
|
+
clearColorGradientOrPattern = createCanvasPattern(ctx2, clearColor, {
|
|
33038
33039
|
dirty() {
|
|
33039
33040
|
self2.setUnpainted();
|
|
33040
33041
|
self2.painter.refresh();
|
|
33041
33042
|
}
|
|
33042
33043
|
});
|
|
33043
33044
|
}
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33045
|
+
ctx2.save();
|
|
33046
|
+
ctx2.fillStyle = clearColorGradientOrPattern || clearColor;
|
|
33047
|
+
ctx2.fillRect(x, y, width2, height2);
|
|
33048
|
+
ctx2.restore();
|
|
33048
33049
|
}
|
|
33049
33050
|
if (haveMotionBLur) {
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
|
|
33053
|
-
|
|
33051
|
+
ctx2.save();
|
|
33052
|
+
ctx2.globalAlpha = lastFrameAlpha;
|
|
33053
|
+
ctx2.drawImage(domBack, x, y, width2, height2);
|
|
33054
|
+
ctx2.restore();
|
|
33054
33055
|
}
|
|
33055
33056
|
}
|
|
33056
33057
|
;
|
|
@@ -33198,29 +33199,29 @@ var CanvasPainter = class {
|
|
|
33198
33199
|
viewWidth: this._width,
|
|
33199
33200
|
viewHeight: this._height
|
|
33200
33201
|
};
|
|
33201
|
-
let
|
|
33202
|
+
let ctx2;
|
|
33202
33203
|
for (let i = 0; i < len2; i++) {
|
|
33203
33204
|
const el = list[i];
|
|
33204
33205
|
if (el.__inHover) {
|
|
33205
33206
|
if (!hoverLayer) {
|
|
33206
33207
|
hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL);
|
|
33207
33208
|
}
|
|
33208
|
-
if (!
|
|
33209
|
-
|
|
33210
|
-
|
|
33209
|
+
if (!ctx2) {
|
|
33210
|
+
ctx2 = hoverLayer.ctx;
|
|
33211
|
+
ctx2.save();
|
|
33211
33212
|
}
|
|
33212
|
-
brush(
|
|
33213
|
+
brush(ctx2, el, scope, i === len2 - 1);
|
|
33213
33214
|
}
|
|
33214
33215
|
}
|
|
33215
|
-
if (
|
|
33216
|
-
|
|
33216
|
+
if (ctx2) {
|
|
33217
|
+
ctx2.restore();
|
|
33217
33218
|
}
|
|
33218
33219
|
}
|
|
33219
33220
|
getHoverLayer() {
|
|
33220
33221
|
return this.getLayer(HOVER_LAYER_ZLEVEL);
|
|
33221
33222
|
}
|
|
33222
|
-
paintOne(
|
|
33223
|
-
brushSingle(
|
|
33223
|
+
paintOne(ctx2, el) {
|
|
33224
|
+
brushSingle(ctx2, el);
|
|
33224
33225
|
}
|
|
33225
33226
|
_paintList(list, prevList, paintAll, redrawId) {
|
|
33226
33227
|
if (this._redrawId !== redrawId) {
|
|
@@ -33247,13 +33248,13 @@ var CanvasPainter = class {
|
|
|
33247
33248
|
}
|
|
33248
33249
|
}
|
|
33249
33250
|
_compositeManually() {
|
|
33250
|
-
const
|
|
33251
|
+
const ctx2 = this.getLayer(CANVAS_ZLEVEL).ctx;
|
|
33251
33252
|
const width = this._domRoot.width;
|
|
33252
33253
|
const height = this._domRoot.height;
|
|
33253
|
-
|
|
33254
|
+
ctx2.clearRect(0, 0, width, height);
|
|
33254
33255
|
this.eachBuiltinLayer(function(layer) {
|
|
33255
33256
|
if (layer.virtual) {
|
|
33256
|
-
|
|
33257
|
+
ctx2.drawImage(layer.dom, 0, 0, width, height);
|
|
33257
33258
|
}
|
|
33258
33259
|
});
|
|
33259
33260
|
}
|
|
@@ -33271,7 +33272,7 @@ var CanvasPainter = class {
|
|
|
33271
33272
|
let needsRefreshHover = false;
|
|
33272
33273
|
for (let k = 0; k < layerList.length; k++) {
|
|
33273
33274
|
const layer = layerList[k];
|
|
33274
|
-
const
|
|
33275
|
+
const ctx2 = layer.ctx;
|
|
33275
33276
|
const repaintRects = useDirtyRect && layer.createRepaintRects(list, prevList, this._width, this._height);
|
|
33276
33277
|
let start2 = paintAll ? layer.__startIndex : layer.__drawIndex;
|
|
33277
33278
|
const useTimer = !paintAll && layer.incremental && Date.now;
|
|
@@ -33312,7 +33313,7 @@ var CanvasPainter = class {
|
|
|
33312
33313
|
}
|
|
33313
33314
|
}
|
|
33314
33315
|
if (scope.prevElClipPaths) {
|
|
33315
|
-
|
|
33316
|
+
ctx2.restore();
|
|
33316
33317
|
}
|
|
33317
33318
|
};
|
|
33318
33319
|
if (repaintRects) {
|
|
@@ -33322,18 +33323,18 @@ var CanvasPainter = class {
|
|
|
33322
33323
|
const dpr2 = this.dpr;
|
|
33323
33324
|
for (var r = 0; r < repaintRects.length; ++r) {
|
|
33324
33325
|
const rect = repaintRects[r];
|
|
33325
|
-
|
|
33326
|
-
|
|
33327
|
-
|
|
33328
|
-
|
|
33326
|
+
ctx2.save();
|
|
33327
|
+
ctx2.beginPath();
|
|
33328
|
+
ctx2.rect(rect.x * dpr2, rect.y * dpr2, rect.width * dpr2, rect.height * dpr2);
|
|
33329
|
+
ctx2.clip();
|
|
33329
33330
|
repaint(rect);
|
|
33330
|
-
|
|
33331
|
+
ctx2.restore();
|
|
33331
33332
|
}
|
|
33332
33333
|
}
|
|
33333
33334
|
} else {
|
|
33334
|
-
|
|
33335
|
+
ctx2.save();
|
|
33335
33336
|
repaint();
|
|
33336
|
-
|
|
33337
|
+
ctx2.restore();
|
|
33337
33338
|
}
|
|
33338
33339
|
layer.__drawIndex = i;
|
|
33339
33340
|
if (layer.__drawIndex < layer.__endIndex) {
|
|
@@ -33353,15 +33354,15 @@ var CanvasPainter = class {
|
|
|
33353
33354
|
};
|
|
33354
33355
|
}
|
|
33355
33356
|
_doPaintEl(el, currentLayer, useDirtyRect, repaintRect, scope, isLast) {
|
|
33356
|
-
const
|
|
33357
|
+
const ctx2 = currentLayer.ctx;
|
|
33357
33358
|
if (useDirtyRect) {
|
|
33358
33359
|
const paintRect = el.getPaintRect();
|
|
33359
33360
|
if (!repaintRect || paintRect && paintRect.intersect(repaintRect)) {
|
|
33360
|
-
brush(
|
|
33361
|
+
brush(ctx2, el, scope, isLast);
|
|
33361
33362
|
el.setPrevPaintRect(paintRect);
|
|
33362
33363
|
}
|
|
33363
33364
|
} else {
|
|
33364
|
-
brush(
|
|
33365
|
+
brush(ctx2, el, scope, isLast);
|
|
33365
33366
|
}
|
|
33366
33367
|
}
|
|
33367
33368
|
getLayer(zlevel, virtual) {
|
|
@@ -33630,18 +33631,18 @@ var CanvasPainter = class {
|
|
|
33630
33631
|
const imageLayer = new Layer_default("image", this, opts.pixelRatio || this.dpr);
|
|
33631
33632
|
imageLayer.initContext();
|
|
33632
33633
|
imageLayer.clear(false, opts.backgroundColor || this._backgroundColor);
|
|
33633
|
-
const
|
|
33634
|
+
const ctx2 = imageLayer.ctx;
|
|
33634
33635
|
if (opts.pixelRatio <= this.dpr) {
|
|
33635
33636
|
this.refresh();
|
|
33636
33637
|
const width = imageLayer.dom.width;
|
|
33637
33638
|
const height = imageLayer.dom.height;
|
|
33638
33639
|
this.eachLayer(function(layer) {
|
|
33639
33640
|
if (layer.__builtin__) {
|
|
33640
|
-
|
|
33641
|
+
ctx2.drawImage(layer.dom, 0, 0, width, height);
|
|
33641
33642
|
} else if (layer.renderToCanvas) {
|
|
33642
|
-
|
|
33643
|
-
layer.renderToCanvas(
|
|
33644
|
-
|
|
33643
|
+
ctx2.save();
|
|
33644
|
+
layer.renderToCanvas(ctx2);
|
|
33645
|
+
ctx2.restore();
|
|
33645
33646
|
}
|
|
33646
33647
|
});
|
|
33647
33648
|
} else {
|
|
@@ -33653,7 +33654,7 @@ var CanvasPainter = class {
|
|
|
33653
33654
|
const displayList = this.storage.getDisplayList(true);
|
|
33654
33655
|
for (let i = 0, len2 = displayList.length; i < len2; i++) {
|
|
33655
33656
|
const el = displayList[i];
|
|
33656
|
-
brush(
|
|
33657
|
+
brush(ctx2, el, scope, i === len2 - 1);
|
|
33657
33658
|
}
|
|
33658
33659
|
}
|
|
33659
33660
|
return imageLayer.dom;
|
|
@@ -34386,7 +34387,7 @@ var mathMax6 = Math.max;
|
|
|
34386
34387
|
function isPointNull(x, y) {
|
|
34387
34388
|
return isNaN(x) || isNaN(y);
|
|
34388
34389
|
}
|
|
34389
|
-
function drawSegment(
|
|
34390
|
+
function drawSegment(ctx2, points4, start2, segLen, allLen, dir3, smooth, smoothMonotone, connectNulls) {
|
|
34390
34391
|
let prevX;
|
|
34391
34392
|
let prevY;
|
|
34392
34393
|
let cpx0;
|
|
@@ -34409,7 +34410,7 @@ function drawSegment(ctx, points4, start2, segLen, allLen, dir3, smooth, smoothM
|
|
|
34409
34410
|
break;
|
|
34410
34411
|
}
|
|
34411
34412
|
if (idx === start2) {
|
|
34412
|
-
|
|
34413
|
+
ctx2[dir3 > 0 ? "moveTo" : "lineTo"](x, y);
|
|
34413
34414
|
cpx0 = x;
|
|
34414
34415
|
cpy0 = y;
|
|
34415
34416
|
} else {
|
|
@@ -34502,11 +34503,11 @@ function drawSegment(ctx, points4, start2, segLen, allLen, dir3, smooth, smoothM
|
|
|
34502
34503
|
nextCpy0 = y + vy * lenNextSeg / lenPrevSeg;
|
|
34503
34504
|
}
|
|
34504
34505
|
}
|
|
34505
|
-
|
|
34506
|
+
ctx2.bezierCurveTo(cpx0, cpy0, cpx1, cpy1, x, y);
|
|
34506
34507
|
cpx0 = nextCpx0;
|
|
34507
34508
|
cpy0 = nextCpy0;
|
|
34508
34509
|
} else {
|
|
34509
|
-
|
|
34510
|
+
ctx2.lineTo(x, y);
|
|
34510
34511
|
}
|
|
34511
34512
|
}
|
|
34512
34513
|
prevX = x;
|
|
@@ -34535,7 +34536,7 @@ var ECPolyline = class extends Path_default {
|
|
|
34535
34536
|
getDefaultShape() {
|
|
34536
34537
|
return new ECPolylineShape();
|
|
34537
34538
|
}
|
|
34538
|
-
buildPath(
|
|
34539
|
+
buildPath(ctx2, shape) {
|
|
34539
34540
|
const points4 = shape.points;
|
|
34540
34541
|
let i = 0;
|
|
34541
34542
|
let len2 = points4.length / 2;
|
|
@@ -34552,7 +34553,7 @@ var ECPolyline = class extends Path_default {
|
|
|
34552
34553
|
}
|
|
34553
34554
|
}
|
|
34554
34555
|
while (i < len2) {
|
|
34555
|
-
i += drawSegment(
|
|
34556
|
+
i += drawSegment(ctx2, points4, i, len2, len2, 1, shape.smooth, shape.smoothMonotone, shape.connectNulls) + 1;
|
|
34556
34557
|
}
|
|
34557
34558
|
}
|
|
34558
34559
|
getPointOn(xOrY, dim) {
|
|
@@ -34626,7 +34627,7 @@ var ECPolygon = class extends Path_default {
|
|
|
34626
34627
|
getDefaultShape() {
|
|
34627
34628
|
return new ECPolygonShape();
|
|
34628
34629
|
}
|
|
34629
|
-
buildPath(
|
|
34630
|
+
buildPath(ctx2, shape) {
|
|
34630
34631
|
const points4 = shape.points;
|
|
34631
34632
|
const stackedOnPoints = shape.stackedOnPoints;
|
|
34632
34633
|
let i = 0;
|
|
@@ -34645,10 +34646,10 @@ var ECPolygon = class extends Path_default {
|
|
|
34645
34646
|
}
|
|
34646
34647
|
}
|
|
34647
34648
|
while (i < len2) {
|
|
34648
|
-
const k = drawSegment(
|
|
34649
|
-
drawSegment(
|
|
34649
|
+
const k = drawSegment(ctx2, points4, i, len2, len2, 1, shape.smooth, smoothMonotone, shape.connectNulls);
|
|
34650
|
+
drawSegment(ctx2, stackedOnPoints, i + k - 1, k, len2, -1, shape.stackedOnSmooth, smoothMonotone, shape.connectNulls);
|
|
34650
34651
|
i += k + 1;
|
|
34651
|
-
|
|
34652
|
+
ctx2.closePath();
|
|
34652
34653
|
}
|
|
34653
34654
|
}
|
|
34654
34655
|
};
|
|
@@ -36010,7 +36011,7 @@ var SausagePath = class extends Path_default {
|
|
|
36010
36011
|
getDefaultShape() {
|
|
36011
36012
|
return new SausageShape();
|
|
36012
36013
|
}
|
|
36013
|
-
buildPath(
|
|
36014
|
+
buildPath(ctx2, shape) {
|
|
36014
36015
|
const cx = shape.cx;
|
|
36015
36016
|
const cy = shape.cy;
|
|
36016
36017
|
const r0 = Math.max(shape.r0 || 0, 0);
|
|
@@ -36030,15 +36031,15 @@ var SausagePath = class extends Path_default {
|
|
|
36030
36031
|
const unitEndX = Math.cos(endAngle);
|
|
36031
36032
|
const unitEndY = Math.sin(endAngle);
|
|
36032
36033
|
if (lessThanCircle) {
|
|
36033
|
-
|
|
36034
|
-
|
|
36034
|
+
ctx2.moveTo(unitStartX * r0 + cx, unitStartY * r0 + cy);
|
|
36035
|
+
ctx2.arc(unitStartX * rCenter + cx, unitStartY * rCenter + cy, dr, -Math.PI + startAngle, startAngle, !clockwise);
|
|
36035
36036
|
} else {
|
|
36036
|
-
|
|
36037
|
+
ctx2.moveTo(unitStartX * r + cx, unitStartY * r + cy);
|
|
36037
36038
|
}
|
|
36038
|
-
|
|
36039
|
-
|
|
36039
|
+
ctx2.arc(cx, cy, r, startAngle, endAngle, !clockwise);
|
|
36040
|
+
ctx2.arc(unitEndX * rCenter + cx, unitEndY * rCenter + cy, dr, endAngle - Math.PI * 2, endAngle - Math.PI, !clockwise);
|
|
36040
36041
|
if (r0 !== 0) {
|
|
36041
|
-
|
|
36042
|
+
ctx2.arc(cx, cy, r0, endAngle, startAngle, clockwise);
|
|
36042
36043
|
}
|
|
36043
36044
|
}
|
|
36044
36045
|
};
|
|
@@ -36824,7 +36825,7 @@ var LargePath = class extends Path_default {
|
|
|
36824
36825
|
getDefaultShape() {
|
|
36825
36826
|
return new LagePathShape();
|
|
36826
36827
|
}
|
|
36827
|
-
buildPath(
|
|
36828
|
+
buildPath(ctx2, shape) {
|
|
36828
36829
|
const points4 = shape.points;
|
|
36829
36830
|
const baseDimIdx = this.baseDimIdx;
|
|
36830
36831
|
const valueDimIdx = 1 - this.baseDimIdx;
|
|
@@ -36836,7 +36837,7 @@ var LargePath = class extends Path_default {
|
|
|
36836
36837
|
size[valueDimIdx] = points4[i + 2];
|
|
36837
36838
|
startPoint[baseDimIdx] = points4[i + baseDimIdx];
|
|
36838
36839
|
startPoint[valueDimIdx] = points4[i + valueDimIdx];
|
|
36839
|
-
|
|
36840
|
+
ctx2.rect(startPoint[0], startPoint[1], size[0], size[1]);
|
|
36840
36841
|
}
|
|
36841
36842
|
}
|
|
36842
36843
|
};
|
|
@@ -37990,12 +37991,12 @@ var LargeSymbolPath = class extends Path_default {
|
|
|
37990
37991
|
const size = shape.size;
|
|
37991
37992
|
const symbolProxy = this.symbolProxy;
|
|
37992
37993
|
const symbolProxyShape = symbolProxy.shape;
|
|
37993
|
-
const
|
|
37994
|
-
const canBoost =
|
|
37994
|
+
const ctx2 = path.getContext ? path.getContext() : path;
|
|
37995
|
+
const canBoost = ctx2 && size[0] < BOOST_SIZE_THRESHOLD;
|
|
37995
37996
|
const softClipShape = this.softClipShape;
|
|
37996
37997
|
let i;
|
|
37997
37998
|
if (canBoost) {
|
|
37998
|
-
this._ctx =
|
|
37999
|
+
this._ctx = ctx2;
|
|
37999
38000
|
return;
|
|
38000
38001
|
}
|
|
38001
38002
|
this._ctx = null;
|
|
@@ -38023,10 +38024,10 @@ var LargeSymbolPath = class extends Path_default {
|
|
|
38023
38024
|
const shape = this.shape;
|
|
38024
38025
|
const points4 = shape.points;
|
|
38025
38026
|
const size = shape.size;
|
|
38026
|
-
const
|
|
38027
|
+
const ctx2 = this._ctx;
|
|
38027
38028
|
const softClipShape = this.softClipShape;
|
|
38028
38029
|
let i;
|
|
38029
|
-
if (!
|
|
38030
|
+
if (!ctx2) {
|
|
38030
38031
|
return;
|
|
38031
38032
|
}
|
|
38032
38033
|
for (i = this._off; i < points4.length; ) {
|
|
@@ -38038,7 +38039,7 @@ var LargeSymbolPath = class extends Path_default {
|
|
|
38038
38039
|
if (softClipShape && !softClipShape.contain(x, y)) {
|
|
38039
38040
|
continue;
|
|
38040
38041
|
}
|
|
38041
|
-
|
|
38042
|
+
ctx2.fillRect(x - size[0] / 2, y - size[1] / 2, size[0], size[1]);
|
|
38042
38043
|
}
|
|
38043
38044
|
if (this.incremental) {
|
|
38044
38045
|
this._off = i;
|
|
@@ -43980,15 +43981,15 @@ var TreePath = class extends Path_default {
|
|
|
43980
43981
|
getDefaultShape() {
|
|
43981
43982
|
return new TreeEdgeShape();
|
|
43982
43983
|
}
|
|
43983
|
-
buildPath(
|
|
43984
|
+
buildPath(ctx2, shape) {
|
|
43984
43985
|
const childPoints = shape.childPoints;
|
|
43985
43986
|
const childLen = childPoints.length;
|
|
43986
43987
|
const parentPoint = shape.parentPoint;
|
|
43987
43988
|
const firstChildPos = childPoints[0];
|
|
43988
43989
|
const lastChildPos = childPoints[childLen - 1];
|
|
43989
43990
|
if (childLen === 1) {
|
|
43990
|
-
|
|
43991
|
-
|
|
43991
|
+
ctx2.moveTo(parentPoint[0], parentPoint[1]);
|
|
43992
|
+
ctx2.lineTo(firstChildPos[0], firstChildPos[1]);
|
|
43992
43993
|
return;
|
|
43993
43994
|
}
|
|
43994
43995
|
const orient = shape.orient;
|
|
@@ -43998,19 +43999,19 @@ var TreePath = class extends Path_default {
|
|
|
43998
43999
|
const tmpPoint = [];
|
|
43999
44000
|
tmpPoint[forkDim] = parentPoint[forkDim];
|
|
44000
44001
|
tmpPoint[otherDim] = parentPoint[otherDim] + (lastChildPos[otherDim] - parentPoint[otherDim]) * forkPosition;
|
|
44001
|
-
|
|
44002
|
-
|
|
44003
|
-
|
|
44002
|
+
ctx2.moveTo(parentPoint[0], parentPoint[1]);
|
|
44003
|
+
ctx2.lineTo(tmpPoint[0], tmpPoint[1]);
|
|
44004
|
+
ctx2.moveTo(firstChildPos[0], firstChildPos[1]);
|
|
44004
44005
|
tmpPoint[forkDim] = firstChildPos[forkDim];
|
|
44005
|
-
|
|
44006
|
+
ctx2.lineTo(tmpPoint[0], tmpPoint[1]);
|
|
44006
44007
|
tmpPoint[forkDim] = lastChildPos[forkDim];
|
|
44007
|
-
|
|
44008
|
-
|
|
44008
|
+
ctx2.lineTo(tmpPoint[0], tmpPoint[1]);
|
|
44009
|
+
ctx2.lineTo(lastChildPos[0], lastChildPos[1]);
|
|
44009
44010
|
for (let i = 1; i < childLen - 1; i++) {
|
|
44010
44011
|
const point = childPoints[i];
|
|
44011
|
-
|
|
44012
|
+
ctx2.moveTo(point[0], point[1]);
|
|
44012
44013
|
tmpPoint[forkDim] = point[forkDim];
|
|
44013
|
-
|
|
44014
|
+
ctx2.lineTo(tmpPoint[0], tmpPoint[1]);
|
|
44014
44015
|
}
|
|
44015
44016
|
}
|
|
44016
44017
|
};
|
|
@@ -47761,11 +47762,11 @@ var ECLinePath = class extends Path_default {
|
|
|
47761
47762
|
getDefaultShape() {
|
|
47762
47763
|
return new StraightLineShape();
|
|
47763
47764
|
}
|
|
47764
|
-
buildPath(
|
|
47765
|
+
buildPath(ctx2, shape) {
|
|
47765
47766
|
if (isStraightLine(shape)) {
|
|
47766
|
-
straightLineProto.buildPath.call(this,
|
|
47767
|
+
straightLineProto.buildPath.call(this, ctx2, shape);
|
|
47767
47768
|
} else {
|
|
47768
|
-
bezierCurveProto.buildPath.call(this,
|
|
47769
|
+
bezierCurveProto.buildPath.call(this, ctx2, shape);
|
|
47769
47770
|
}
|
|
47770
47771
|
}
|
|
47771
47772
|
pointAt(t) {
|
|
@@ -49188,7 +49189,7 @@ var PointerPath = class extends Path_default {
|
|
|
49188
49189
|
getDefaultShape() {
|
|
49189
49190
|
return new PointerShape();
|
|
49190
49191
|
}
|
|
49191
|
-
buildPath(
|
|
49192
|
+
buildPath(ctx2, shape) {
|
|
49192
49193
|
const mathCos6 = Math.cos;
|
|
49193
49194
|
const mathSin6 = Math.sin;
|
|
49194
49195
|
const r = shape.r;
|
|
@@ -49197,11 +49198,11 @@ var PointerPath = class extends Path_default {
|
|
|
49197
49198
|
const x = shape.x - mathCos6(angle) * width * (width >= r / 3 ? 1 : 2);
|
|
49198
49199
|
const y = shape.y - mathSin6(angle) * width * (width >= r / 3 ? 1 : 2);
|
|
49199
49200
|
angle = shape.angle - Math.PI / 2;
|
|
49200
|
-
|
|
49201
|
-
|
|
49202
|
-
|
|
49203
|
-
|
|
49204
|
-
|
|
49201
|
+
ctx2.moveTo(x, y);
|
|
49202
|
+
ctx2.lineTo(shape.x + mathCos6(angle) * width, shape.y + mathSin6(angle) * width);
|
|
49203
|
+
ctx2.lineTo(shape.x + mathCos6(shape.angle) * r, shape.y + mathSin6(shape.angle) * r);
|
|
49204
|
+
ctx2.lineTo(shape.x - mathCos6(angle) * width, shape.y - mathSin6(angle) * width);
|
|
49205
|
+
ctx2.lineTo(x, y);
|
|
49205
49206
|
}
|
|
49206
49207
|
};
|
|
49207
49208
|
var PointerPath_default = PointerPath;
|
|
@@ -51984,18 +51985,18 @@ var SankeyPath = class extends Path_default {
|
|
|
51984
51985
|
getDefaultShape() {
|
|
51985
51986
|
return new SankeyPathShape();
|
|
51986
51987
|
}
|
|
51987
|
-
buildPath(
|
|
51988
|
+
buildPath(ctx2, shape) {
|
|
51988
51989
|
const extent3 = shape.extent;
|
|
51989
|
-
|
|
51990
|
-
|
|
51990
|
+
ctx2.moveTo(shape.x1, shape.y1);
|
|
51991
|
+
ctx2.bezierCurveTo(shape.cpx1, shape.cpy1, shape.cpx2, shape.cpy2, shape.x2, shape.y2);
|
|
51991
51992
|
if (shape.orient === "vertical") {
|
|
51992
|
-
|
|
51993
|
-
|
|
51993
|
+
ctx2.lineTo(shape.x2 + extent3, shape.y2);
|
|
51994
|
+
ctx2.bezierCurveTo(shape.cpx2 + extent3, shape.cpy2, shape.cpx1 + extent3, shape.cpy1, shape.x1 + extent3, shape.y1);
|
|
51994
51995
|
} else {
|
|
51995
|
-
|
|
51996
|
-
|
|
51996
|
+
ctx2.lineTo(shape.x2, shape.y2 + extent3);
|
|
51997
|
+
ctx2.bezierCurveTo(shape.cpx2, shape.cpy2 + extent3, shape.cpx1, shape.cpy1 + extent3, shape.x1, shape.y1 + extent3);
|
|
51997
51998
|
}
|
|
51998
|
-
|
|
51999
|
+
ctx2.closePath();
|
|
51999
52000
|
}
|
|
52000
52001
|
highlight() {
|
|
52001
52002
|
enterEmphasis(this);
|
|
@@ -52943,19 +52944,19 @@ var BoxPath = class extends Path_default {
|
|
|
52943
52944
|
getDefaultShape() {
|
|
52944
52945
|
return new BoxPathShape();
|
|
52945
52946
|
}
|
|
52946
|
-
buildPath(
|
|
52947
|
+
buildPath(ctx2, shape) {
|
|
52947
52948
|
const ends = shape.points;
|
|
52948
52949
|
let i = 0;
|
|
52949
|
-
|
|
52950
|
+
ctx2.moveTo(ends[i][0], ends[i][1]);
|
|
52950
52951
|
i++;
|
|
52951
52952
|
for (; i < 4; i++) {
|
|
52952
|
-
|
|
52953
|
+
ctx2.lineTo(ends[i][0], ends[i][1]);
|
|
52953
52954
|
}
|
|
52954
|
-
|
|
52955
|
+
ctx2.closePath();
|
|
52955
52956
|
for (; i < ends.length; i++) {
|
|
52956
|
-
|
|
52957
|
+
ctx2.moveTo(ends[i][0], ends[i][1]);
|
|
52957
52958
|
i++;
|
|
52958
|
-
|
|
52959
|
+
ctx2.lineTo(ends[i][0], ends[i][1]);
|
|
52959
52960
|
}
|
|
52960
52961
|
}
|
|
52961
52962
|
};
|
|
@@ -53316,21 +53317,21 @@ var NormalBoxPath = class extends Path_default {
|
|
|
53316
53317
|
getDefaultShape() {
|
|
53317
53318
|
return new NormalBoxPathShape();
|
|
53318
53319
|
}
|
|
53319
|
-
buildPath(
|
|
53320
|
+
buildPath(ctx2, shape) {
|
|
53320
53321
|
const ends = shape.points;
|
|
53321
53322
|
if (this.__simpleBox) {
|
|
53322
|
-
|
|
53323
|
-
|
|
53323
|
+
ctx2.moveTo(ends[4][0], ends[4][1]);
|
|
53324
|
+
ctx2.lineTo(ends[6][0], ends[6][1]);
|
|
53324
53325
|
} else {
|
|
53325
|
-
|
|
53326
|
-
|
|
53327
|
-
|
|
53328
|
-
|
|
53329
|
-
|
|
53330
|
-
|
|
53331
|
-
|
|
53332
|
-
|
|
53333
|
-
|
|
53326
|
+
ctx2.moveTo(ends[0][0], ends[0][1]);
|
|
53327
|
+
ctx2.lineTo(ends[1][0], ends[1][1]);
|
|
53328
|
+
ctx2.lineTo(ends[2][0], ends[2][1]);
|
|
53329
|
+
ctx2.lineTo(ends[3][0], ends[3][1]);
|
|
53330
|
+
ctx2.closePath();
|
|
53331
|
+
ctx2.moveTo(ends[4][0], ends[4][1]);
|
|
53332
|
+
ctx2.lineTo(ends[5][0], ends[5][1]);
|
|
53333
|
+
ctx2.moveTo(ends[6][0], ends[6][1]);
|
|
53334
|
+
ctx2.lineTo(ends[7][0], ends[7][1]);
|
|
53334
53335
|
}
|
|
53335
53336
|
}
|
|
53336
53337
|
};
|
|
@@ -53377,13 +53378,13 @@ var LargeBoxPath = class extends Path_default {
|
|
|
53377
53378
|
getDefaultShape() {
|
|
53378
53379
|
return new LargeBoxPathShape();
|
|
53379
53380
|
}
|
|
53380
|
-
buildPath(
|
|
53381
|
+
buildPath(ctx2, shape) {
|
|
53381
53382
|
const points4 = shape.points;
|
|
53382
53383
|
for (let i = 0; i < points4.length; ) {
|
|
53383
53384
|
if (this.__sign === points4[i++]) {
|
|
53384
53385
|
const x = points4[i++];
|
|
53385
|
-
|
|
53386
|
-
|
|
53386
|
+
ctx2.moveTo(x, points4[i++]);
|
|
53387
|
+
ctx2.lineTo(x, points4[i++]);
|
|
53387
53388
|
} else {
|
|
53388
53389
|
i += 3;
|
|
53389
53390
|
}
|
|
@@ -54218,7 +54219,7 @@ var LargeLinesPath = class extends Path_default {
|
|
|
54218
54219
|
getDefaultShape() {
|
|
54219
54220
|
return new LargeLinesPathShape();
|
|
54220
54221
|
}
|
|
54221
|
-
buildPath(
|
|
54222
|
+
buildPath(ctx2, shape) {
|
|
54222
54223
|
const segs = shape.segs;
|
|
54223
54224
|
const curveness = shape.curveness;
|
|
54224
54225
|
let i;
|
|
@@ -54226,9 +54227,9 @@ var LargeLinesPath = class extends Path_default {
|
|
|
54226
54227
|
for (i = this._off; i < segs.length; ) {
|
|
54227
54228
|
const count2 = segs[i++];
|
|
54228
54229
|
if (count2 > 0) {
|
|
54229
|
-
|
|
54230
|
+
ctx2.moveTo(segs[i++], segs[i++]);
|
|
54230
54231
|
for (let k = 1; k < count2; k++) {
|
|
54231
|
-
|
|
54232
|
+
ctx2.lineTo(segs[i++], segs[i++]);
|
|
54232
54233
|
}
|
|
54233
54234
|
}
|
|
54234
54235
|
}
|
|
@@ -54238,13 +54239,13 @@ var LargeLinesPath = class extends Path_default {
|
|
|
54238
54239
|
const y0 = segs[i++];
|
|
54239
54240
|
const x1 = segs[i++];
|
|
54240
54241
|
const y1 = segs[i++];
|
|
54241
|
-
|
|
54242
|
+
ctx2.moveTo(x0, y0);
|
|
54242
54243
|
if (curveness > 0) {
|
|
54243
54244
|
const x2 = (x0 + x1) / 2 - (y0 - y1) * curveness;
|
|
54244
54245
|
const y2 = (y0 + y1) / 2 - (x1 - x0) * curveness;
|
|
54245
|
-
|
|
54246
|
+
ctx2.quadraticCurveTo(x2, y2, x1, y1);
|
|
54246
54247
|
} else {
|
|
54247
|
-
|
|
54248
|
+
ctx2.lineTo(x1, y1);
|
|
54248
54249
|
}
|
|
54249
54250
|
}
|
|
54250
54251
|
}
|
|
@@ -54921,7 +54922,7 @@ var LinePlotPath = class extends Path_default {
|
|
|
54921
54922
|
getDefaultShape() {
|
|
54922
54923
|
return new LinePlotShape();
|
|
54923
54924
|
}
|
|
54924
|
-
buildPath(
|
|
54925
|
+
buildPath(ctx2, shape) {
|
|
54925
54926
|
const {points: points4} = shape;
|
|
54926
54927
|
for (let index = 0; index < points4.length; index++) {
|
|
54927
54928
|
const point = points4[index];
|
|
@@ -54934,11 +54935,11 @@ var LinePlotPath = class extends Path_default {
|
|
|
54934
54935
|
continue;
|
|
54935
54936
|
}
|
|
54936
54937
|
const [x2, y2] = nextPoint;
|
|
54937
|
-
|
|
54938
|
+
ctx2.moveTo(x2, y2);
|
|
54938
54939
|
continue;
|
|
54939
54940
|
}
|
|
54940
54941
|
const [x, y] = point;
|
|
54941
|
-
|
|
54942
|
+
ctx2.lineTo(x, y);
|
|
54942
54943
|
}
|
|
54943
54944
|
}
|
|
54944
54945
|
};
|
|
@@ -54970,17 +54971,17 @@ var PolyPlotPath = class extends Path_default {
|
|
|
54970
54971
|
getDefaultShape() {
|
|
54971
54972
|
return new PolyPlotShape();
|
|
54972
54973
|
}
|
|
54973
|
-
buildPath(
|
|
54974
|
+
buildPath(ctx2, shape) {
|
|
54974
54975
|
const {points: points4, baseY} = shape;
|
|
54975
54976
|
let startIndex = 0;
|
|
54976
54977
|
for (let index = 0; index < points4.length; index++) {
|
|
54977
54978
|
const point = points4[index];
|
|
54978
54979
|
if (point === 0 || isPointNull4(point)) {
|
|
54979
54980
|
if (startIndex) {
|
|
54980
|
-
|
|
54981
|
+
ctx2.lineTo(points4[index - 1][0], baseY);
|
|
54981
54982
|
const startPoint = points4[startIndex];
|
|
54982
|
-
|
|
54983
|
-
|
|
54983
|
+
ctx2.lineTo(startPoint[0], baseY);
|
|
54984
|
+
ctx2.lineTo(startPoint[0], startPoint[1]);
|
|
54984
54985
|
}
|
|
54985
54986
|
let nextPoint = points4[++index];
|
|
54986
54987
|
while ((nextPoint === 0 || isPointNull4(nextPoint)) && index < points4.length) {
|
|
@@ -54990,17 +54991,17 @@ var PolyPlotPath = class extends Path_default {
|
|
|
54990
54991
|
continue;
|
|
54991
54992
|
}
|
|
54992
54993
|
const [x2, y2] = nextPoint;
|
|
54993
|
-
|
|
54994
|
+
ctx2.moveTo(x2, y2);
|
|
54994
54995
|
startIndex = index;
|
|
54995
54996
|
continue;
|
|
54996
54997
|
}
|
|
54997
54998
|
const [x, y] = point;
|
|
54998
|
-
|
|
54999
|
+
ctx2.lineTo(x, y);
|
|
54999
55000
|
if (index === points4.length - 1) {
|
|
55000
|
-
|
|
55001
|
+
ctx2.lineTo(points4[index][0], baseY);
|
|
55001
55002
|
const startPoint = points4[startIndex];
|
|
55002
|
-
|
|
55003
|
-
|
|
55003
|
+
ctx2.lineTo(startPoint[0], baseY);
|
|
55004
|
+
ctx2.lineTo(startPoint[0], startPoint[1]);
|
|
55004
55005
|
}
|
|
55005
55006
|
}
|
|
55006
55007
|
}
|
|
@@ -55034,7 +55035,7 @@ var HistogramPlotPath = class extends Path_default {
|
|
|
55034
55035
|
getDefaultShape() {
|
|
55035
55036
|
return new HistogramPlotShape();
|
|
55036
55037
|
}
|
|
55037
|
-
buildPath(
|
|
55038
|
+
buildPath(ctx2, shape) {
|
|
55038
55039
|
const {points: points4, baseY} = shape;
|
|
55039
55040
|
for (let index = 0; index < points4.length; index++) {
|
|
55040
55041
|
const point = points4[index];
|
|
@@ -55042,8 +55043,8 @@ var HistogramPlotPath = class extends Path_default {
|
|
|
55042
55043
|
continue;
|
|
55043
55044
|
}
|
|
55044
55045
|
const [x, y] = point;
|
|
55045
|
-
|
|
55046
|
-
|
|
55046
|
+
ctx2.moveTo(x, y);
|
|
55047
|
+
ctx2.lineTo(x, baseY);
|
|
55047
55048
|
}
|
|
55048
55049
|
}
|
|
55049
55050
|
};
|
|
@@ -55077,7 +55078,7 @@ var BarPlotPath = class extends Path_default {
|
|
|
55077
55078
|
getDefaultShape() {
|
|
55078
55079
|
return new BarPlotShape();
|
|
55079
55080
|
}
|
|
55080
|
-
buildPath(
|
|
55081
|
+
buildPath(ctx2, shape) {
|
|
55081
55082
|
const {points: points4, baseY, width} = shape;
|
|
55082
55083
|
const offset = width / 2;
|
|
55083
55084
|
for (let index = 0; index < points4.length; index++) {
|
|
@@ -55089,11 +55090,11 @@ var BarPlotPath = class extends Path_default {
|
|
|
55089
55090
|
const leftX = Math.floor(x - offset);
|
|
55090
55091
|
const rightX = Math.floor(x + offset);
|
|
55091
55092
|
const dataY = Math.floor(y);
|
|
55092
|
-
|
|
55093
|
-
|
|
55094
|
-
|
|
55095
|
-
|
|
55096
|
-
|
|
55093
|
+
ctx2.moveTo(leftX, dataY);
|
|
55094
|
+
ctx2.lineTo(rightX, dataY);
|
|
55095
|
+
ctx2.lineTo(rightX, baseY);
|
|
55096
|
+
ctx2.lineTo(leftX, baseY);
|
|
55097
|
+
ctx2.lineTo(leftX, dataY);
|
|
55097
55098
|
}
|
|
55098
55099
|
}
|
|
55099
55100
|
};
|
|
@@ -56741,7 +56742,7 @@ function getLineDashByLineStyle2(lineStyle) {
|
|
|
56741
56742
|
if (lineStyle === "style_dashed") {
|
|
56742
56743
|
return [8, 8];
|
|
56743
56744
|
} else if (lineStyle === "style_dotted") {
|
|
56744
|
-
return [
|
|
56745
|
+
return [2, 2];
|
|
56745
56746
|
}
|
|
56746
56747
|
return "solid";
|
|
56747
56748
|
}
|
|
@@ -56795,6 +56796,36 @@ var BoxesView2 = class extends Chart_default {
|
|
|
56795
56796
|
});
|
|
56796
56797
|
linesGroup.add(el);
|
|
56797
56798
|
});
|
|
56799
|
+
const textList = data.getLayout("textList");
|
|
56800
|
+
each(textList, function(item) {
|
|
56801
|
+
const width = item.width - 8;
|
|
56802
|
+
const textStyle = {
|
|
56803
|
+
width,
|
|
56804
|
+
text: item.text,
|
|
56805
|
+
align: item.align,
|
|
56806
|
+
fill: item.text_color ?? "#fff",
|
|
56807
|
+
fontSize: item.text_size,
|
|
56808
|
+
overflow: item.text_wrap === "wrap_auto" ? "breakAll" : "none"
|
|
56809
|
+
};
|
|
56810
|
+
const el = new Text_default({
|
|
56811
|
+
style: {
|
|
56812
|
+
...textStyle
|
|
56813
|
+
},
|
|
56814
|
+
x: item.align === "center" ? item.x : item.x + 4,
|
|
56815
|
+
y: item.y + 2
|
|
56816
|
+
});
|
|
56817
|
+
if (item.v_align === "middle") {
|
|
56818
|
+
el.y = item.y - Math.min(el.getBoundingRect().height, item.height) / 2;
|
|
56819
|
+
} else if (item.v_align === "bottom") {
|
|
56820
|
+
el.y = item.y - Math.min(el.getBoundingRect().height, item.height) - 2;
|
|
56821
|
+
}
|
|
56822
|
+
if (item.text_wrap === "wrap_auto") {
|
|
56823
|
+
el.useStyle({...textStyle, height: item.height, lineOverflow: "truncate", ellipsis: "..."});
|
|
56824
|
+
} else {
|
|
56825
|
+
el.useStyle({...textStyle, height: item.height});
|
|
56826
|
+
}
|
|
56827
|
+
linesGroup.add(el);
|
|
56828
|
+
});
|
|
56798
56829
|
}
|
|
56799
56830
|
remove(ecModel, api2) {
|
|
56800
56831
|
this._linesGroup && this._linesGroup.removeAll();
|
|
@@ -56874,14 +56905,69 @@ BoxesSeriesModel.defaultOption = {
|
|
|
56874
56905
|
};
|
|
56875
56906
|
var BoxesSeries_default = BoxesSeriesModel;
|
|
56876
56907
|
|
|
56908
|
+
// src/chart/boxes/util.ts
|
|
56909
|
+
var canvas = document.createElement("canvas");
|
|
56910
|
+
var ctx = canvas.getContext("2d");
|
|
56911
|
+
function findFontSize(text, maxWidth, font = "sans-serif", minSize = 2, maxSize = 50, tolerance = 8) {
|
|
56912
|
+
let low = minSize;
|
|
56913
|
+
let high = maxSize;
|
|
56914
|
+
while (low <= high) {
|
|
56915
|
+
const size = Math.floor((low + high) / 2);
|
|
56916
|
+
ctx.font = `${size}px ${font}`;
|
|
56917
|
+
const width = ctx.measureText(text).width;
|
|
56918
|
+
if (Math.abs(width - maxWidth) <= tolerance) {
|
|
56919
|
+
return size;
|
|
56920
|
+
} else if (width < maxWidth) {
|
|
56921
|
+
low = size + 1;
|
|
56922
|
+
} else {
|
|
56923
|
+
high = size - 1;
|
|
56924
|
+
}
|
|
56925
|
+
}
|
|
56926
|
+
return high;
|
|
56927
|
+
}
|
|
56928
|
+
var boxFontSizeMapping = {
|
|
56929
|
+
huge: 24,
|
|
56930
|
+
large: 18,
|
|
56931
|
+
normal: 14,
|
|
56932
|
+
small: 10,
|
|
56933
|
+
tiny: 6
|
|
56934
|
+
};
|
|
56935
|
+
function getFontSize(size, text, maxWidth, font) {
|
|
56936
|
+
return boxFontSizeMapping[size] || findFontSize(text, maxWidth, font);
|
|
56937
|
+
}
|
|
56938
|
+
|
|
56877
56939
|
// src/chart/boxes/BoxesLayout.ts
|
|
56878
56940
|
function optimizePoint3(point1, point2, lineWidth) {
|
|
56879
|
-
|
|
56880
|
-
|
|
56881
|
-
|
|
56882
|
-
}
|
|
56883
|
-
|
|
56884
|
-
|
|
56941
|
+
if (lineWidth % 2 === 0) {
|
|
56942
|
+
point1[1] = Math.floor(point1[1]);
|
|
56943
|
+
point2[1] = Math.floor(point2[1]);
|
|
56944
|
+
} else {
|
|
56945
|
+
point1[0] = Math.floor(point1[0]) + 0.5;
|
|
56946
|
+
point1[1] = Math.floor(point1[1]) + 0.5;
|
|
56947
|
+
point2[0] = Math.floor(point2[0]) + 0.5;
|
|
56948
|
+
point2[1] = Math.floor(point2[1]) + 0.5;
|
|
56949
|
+
}
|
|
56950
|
+
}
|
|
56951
|
+
function getBoxPoint(startPoint, endPoint, text_halign, text_valign) {
|
|
56952
|
+
let x = startPoint[0];
|
|
56953
|
+
let y = startPoint[1];
|
|
56954
|
+
let align = "left";
|
|
56955
|
+
let v_align = "top";
|
|
56956
|
+
if (text_halign === "align_center") {
|
|
56957
|
+
x = (startPoint[0] + endPoint[0]) / 2;
|
|
56958
|
+
align = "center";
|
|
56959
|
+
} else if (text_halign === "align_right") {
|
|
56960
|
+
x = endPoint[0];
|
|
56961
|
+
align = "right";
|
|
56962
|
+
}
|
|
56963
|
+
if (text_valign === "align_center") {
|
|
56964
|
+
y = (startPoint[1] + endPoint[1]) / 2;
|
|
56965
|
+
v_align = "middle";
|
|
56966
|
+
} else if (text_valign === "align_bottom") {
|
|
56967
|
+
y = endPoint[1];
|
|
56968
|
+
v_align = "bottom";
|
|
56969
|
+
}
|
|
56970
|
+
return {x, y, align, v_align};
|
|
56885
56971
|
}
|
|
56886
56972
|
var BoxesLayout = {
|
|
56887
56973
|
seriesType: "boxes",
|
|
@@ -56921,10 +57007,13 @@ var BoxesLayout = {
|
|
|
56921
57007
|
}
|
|
56922
57008
|
return [left, right];
|
|
56923
57009
|
}
|
|
57010
|
+
const gTextStyleModel = ecModel && ecModel.getModel("textStyle");
|
|
57011
|
+
const font = gTextStyleModel && gTextStyleModel.getShallow("fontFamily");
|
|
56924
57012
|
return {
|
|
56925
57013
|
progress(params, boxesData) {
|
|
56926
57014
|
const store = boxesData.getStore();
|
|
56927
57015
|
const linesPointById = {};
|
|
57016
|
+
const textList = [];
|
|
56928
57017
|
for (let i = params.start; i < params.end; i++) {
|
|
56929
57018
|
const x1Val = store.get(x1DimI, i);
|
|
56930
57019
|
const x2Val = store.get(x2DimI, i);
|
|
@@ -56933,7 +57022,19 @@ var BoxesLayout = {
|
|
|
56933
57022
|
const startPoint = coordSys.dataToPoint([x1Val, y1Val]);
|
|
56934
57023
|
const endPoint = coordSys.dataToPoint([x2Val, y2Val]);
|
|
56935
57024
|
const itemModel = data.getItemModel(i);
|
|
56936
|
-
const {
|
|
57025
|
+
const {
|
|
57026
|
+
border_width,
|
|
57027
|
+
border_color,
|
|
57028
|
+
style,
|
|
57029
|
+
extend: extend2,
|
|
57030
|
+
bgcolor,
|
|
57031
|
+
text,
|
|
57032
|
+
text_color,
|
|
57033
|
+
text_halign,
|
|
57034
|
+
text_size,
|
|
57035
|
+
text_valign,
|
|
57036
|
+
text_wrap
|
|
57037
|
+
} = itemModel.get("itemStyle");
|
|
56937
57038
|
if (!border_color) {
|
|
56938
57039
|
continue;
|
|
56939
57040
|
}
|
|
@@ -56943,9 +57044,26 @@ var BoxesLayout = {
|
|
|
56943
57044
|
const [left, right] = getHExtend(startPoint[0], endPoint[0], extend2);
|
|
56944
57045
|
points4.push(left, right, startPoint[1], endPoint[1]);
|
|
56945
57046
|
linesPointById[key] = points4;
|
|
57047
|
+
if (text) {
|
|
57048
|
+
const width2 = endPoint[0] - startPoint[0];
|
|
57049
|
+
const {x, y, align, v_align} = getBoxPoint(startPoint, endPoint, text_halign, text_valign);
|
|
57050
|
+
textList.push({
|
|
57051
|
+
text,
|
|
57052
|
+
text_color,
|
|
57053
|
+
text_wrap,
|
|
57054
|
+
text_size: getFontSize(text_size, text, width2 - 10, font),
|
|
57055
|
+
align,
|
|
57056
|
+
v_align,
|
|
57057
|
+
width: width2,
|
|
57058
|
+
height: Math.abs(endPoint[1] - startPoint[1]),
|
|
57059
|
+
x,
|
|
57060
|
+
y
|
|
57061
|
+
});
|
|
57062
|
+
}
|
|
56946
57063
|
}
|
|
56947
57064
|
data.setLayout({
|
|
56948
|
-
linesPointById
|
|
57065
|
+
linesPointById,
|
|
57066
|
+
textList
|
|
56949
57067
|
});
|
|
56950
57068
|
}
|
|
56951
57069
|
};
|
|
@@ -56960,6 +57078,244 @@ function install28(registers) {
|
|
|
56960
57078
|
registers.registerLayout(BoxesLayout_default);
|
|
56961
57079
|
}
|
|
56962
57080
|
|
|
57081
|
+
// src/chart/charPlot/CharPlotSeries.ts
|
|
57082
|
+
var CharPlotSeriesModel2 = class extends Series_default {
|
|
57083
|
+
constructor() {
|
|
57084
|
+
super(...arguments);
|
|
57085
|
+
this.type = CharPlotSeriesModel2.type;
|
|
57086
|
+
}
|
|
57087
|
+
getInitialData(option, ecModel) {
|
|
57088
|
+
return createSeriesData_default(null, this, {
|
|
57089
|
+
useEncodeDefaulter: true
|
|
57090
|
+
});
|
|
57091
|
+
}
|
|
57092
|
+
getProgressive() {
|
|
57093
|
+
const progressive = this.option.progressive;
|
|
57094
|
+
if (progressive == null) {
|
|
57095
|
+
return this.option.large ? 5e3 : this.get("progressive");
|
|
57096
|
+
}
|
|
57097
|
+
return progressive;
|
|
57098
|
+
}
|
|
57099
|
+
getProgressiveThreshold() {
|
|
57100
|
+
const progressiveThreshold = this.option.progressiveThreshold;
|
|
57101
|
+
if (progressiveThreshold == null) {
|
|
57102
|
+
return this.option.large ? 1e4 : this.get("progressiveThreshold");
|
|
57103
|
+
}
|
|
57104
|
+
return progressiveThreshold;
|
|
57105
|
+
}
|
|
57106
|
+
brushSelector(dataIndex, data, selectors) {
|
|
57107
|
+
return selectors.point(data.getItemLayout(dataIndex));
|
|
57108
|
+
}
|
|
57109
|
+
getZLevelKey() {
|
|
57110
|
+
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
|
|
57111
|
+
}
|
|
57112
|
+
};
|
|
57113
|
+
var CharPlotSeriesModel = CharPlotSeriesModel2;
|
|
57114
|
+
CharPlotSeriesModel.type = "series.charPlot";
|
|
57115
|
+
CharPlotSeriesModel.dependencies = ["grid", "polar"];
|
|
57116
|
+
CharPlotSeriesModel.defaultOption = {
|
|
57117
|
+
coordinateSystem: "cartesian2d",
|
|
57118
|
+
z: 2,
|
|
57119
|
+
large: false,
|
|
57120
|
+
largeThreshold: 2e3,
|
|
57121
|
+
emphasis: {
|
|
57122
|
+
scale: true
|
|
57123
|
+
},
|
|
57124
|
+
clip: true
|
|
57125
|
+
};
|
|
57126
|
+
var CharPlotSeries_default = CharPlotSeriesModel;
|
|
57127
|
+
|
|
57128
|
+
// src/chart/charPlot/CharPlotView.ts
|
|
57129
|
+
var CharPlotView2 = class extends Chart_default {
|
|
57130
|
+
constructor() {
|
|
57131
|
+
super(...arguments);
|
|
57132
|
+
this.type = CharPlotView2.type;
|
|
57133
|
+
}
|
|
57134
|
+
render(seriesModel, ecModel, api2) {
|
|
57135
|
+
const data = seriesModel.getData();
|
|
57136
|
+
this._renderText(data, seriesModel);
|
|
57137
|
+
this._finished = true;
|
|
57138
|
+
}
|
|
57139
|
+
_renderText(data, seriesModel) {
|
|
57140
|
+
if (!this._textGroup) {
|
|
57141
|
+
this._textGroup = new Group_default();
|
|
57142
|
+
this.group.add(this._textGroup);
|
|
57143
|
+
} else {
|
|
57144
|
+
this._textGroup.removeAll();
|
|
57145
|
+
}
|
|
57146
|
+
const textGroup = this._textGroup;
|
|
57147
|
+
const charList = data.getLayout("charList");
|
|
57148
|
+
const fontSize = data.getLayout("fontSize");
|
|
57149
|
+
const textList = data.getLayout("textList");
|
|
57150
|
+
const char = seriesModel.get("char");
|
|
57151
|
+
const text = seriesModel.get("text");
|
|
57152
|
+
each(charList, function(item) {
|
|
57153
|
+
const el = new Text_default({
|
|
57154
|
+
style: {
|
|
57155
|
+
text: char,
|
|
57156
|
+
verticalAlign: "middle",
|
|
57157
|
+
align: "center",
|
|
57158
|
+
fill: item.textColor,
|
|
57159
|
+
fontSize
|
|
57160
|
+
},
|
|
57161
|
+
x: item.x,
|
|
57162
|
+
y: item.y
|
|
57163
|
+
});
|
|
57164
|
+
textGroup.add(el);
|
|
57165
|
+
});
|
|
57166
|
+
const location = seriesModel.get("location");
|
|
57167
|
+
let vAlign = "top";
|
|
57168
|
+
if (["abovebar", "bottom", "absolute"].includes(location)) {
|
|
57169
|
+
vAlign = "bottom";
|
|
57170
|
+
} else if (location === "belowbar" || location === "top") {
|
|
57171
|
+
return fontSize;
|
|
57172
|
+
}
|
|
57173
|
+
each(textList, function(item) {
|
|
57174
|
+
const el = new Text_default({
|
|
57175
|
+
style: {
|
|
57176
|
+
text,
|
|
57177
|
+
verticalAlign: vAlign,
|
|
57178
|
+
align: "center",
|
|
57179
|
+
fill: item.textColor,
|
|
57180
|
+
fontSize: 12
|
|
57181
|
+
},
|
|
57182
|
+
x: item.x,
|
|
57183
|
+
y: item.y
|
|
57184
|
+
});
|
|
57185
|
+
textGroup.add(el);
|
|
57186
|
+
});
|
|
57187
|
+
}
|
|
57188
|
+
_getClipShape(seriesModel) {
|
|
57189
|
+
if (!seriesModel.get("clip", true)) {
|
|
57190
|
+
return;
|
|
57191
|
+
}
|
|
57192
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
57193
|
+
return coordSys && coordSys.getArea && coordSys.getArea(0.1);
|
|
57194
|
+
}
|
|
57195
|
+
remove(ecModel, api2) {
|
|
57196
|
+
this._textGroup && this._textGroup.removeAll();
|
|
57197
|
+
this._textGroup = null;
|
|
57198
|
+
}
|
|
57199
|
+
dispose() {
|
|
57200
|
+
}
|
|
57201
|
+
};
|
|
57202
|
+
var CharPlotView = CharPlotView2;
|
|
57203
|
+
CharPlotView.type = "charPlot";
|
|
57204
|
+
var CharPlotView_default = CharPlotView;
|
|
57205
|
+
|
|
57206
|
+
// src/chart/charPlot/util.ts
|
|
57207
|
+
var charFontSizeMapping = {
|
|
57208
|
+
huge: 100,
|
|
57209
|
+
large: 74,
|
|
57210
|
+
normal: 49,
|
|
57211
|
+
small: 30,
|
|
57212
|
+
tiny: 14
|
|
57213
|
+
};
|
|
57214
|
+
function getFontSizeByBarWidth(barWidth) {
|
|
57215
|
+
return Math.round(barWidth);
|
|
57216
|
+
}
|
|
57217
|
+
function getFontSize2(size, barWidth) {
|
|
57218
|
+
return charFontSizeMapping[size] || getFontSizeByBarWidth(barWidth);
|
|
57219
|
+
}
|
|
57220
|
+
function getDistance(location, fontSize) {
|
|
57221
|
+
if (location === "abovebar" || location === "bottom" || location === "absolute") {
|
|
57222
|
+
return -fontSize;
|
|
57223
|
+
} else {
|
|
57224
|
+
return fontSize;
|
|
57225
|
+
}
|
|
57226
|
+
}
|
|
57227
|
+
|
|
57228
|
+
// src/chart/charPlot/CharPlotLayout.ts
|
|
57229
|
+
function getYByLocation(seriesModel) {
|
|
57230
|
+
const location = seriesModel.get("location");
|
|
57231
|
+
if (!["bottom", "top"].includes(location)) {
|
|
57232
|
+
return null;
|
|
57233
|
+
}
|
|
57234
|
+
const yAxis = seriesModel.coordinateSystem.getAxis("y");
|
|
57235
|
+
const scale4 = yAxis.scale;
|
|
57236
|
+
const [, end2] = yAxis.getExtent();
|
|
57237
|
+
const [boundaryGapX, boundaryGapY] = scale4.rawExtentInfo.getBoundaryGapInner();
|
|
57238
|
+
return Math.floor(location === "top" ? end2 * boundaryGapX + 30 : end2 * (1 - boundaryGapY) + 30);
|
|
57239
|
+
}
|
|
57240
|
+
var CharPlotLayout = {
|
|
57241
|
+
seriesType: "charPlot",
|
|
57242
|
+
plan: createRenderPlanner(),
|
|
57243
|
+
reset: function(seriesModel) {
|
|
57244
|
+
const data = seriesModel.getData();
|
|
57245
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
57246
|
+
if (!coordSys) {
|
|
57247
|
+
return;
|
|
57248
|
+
}
|
|
57249
|
+
const bandWidth = coordSys.getAxesByScale("ordinal")[0].scale.barSpace;
|
|
57250
|
+
const location = seriesModel.get("location");
|
|
57251
|
+
const size = seriesModel.get("size");
|
|
57252
|
+
const fontSize = getFontSize2(size, bandWidth);
|
|
57253
|
+
const distance2 = getDistance(location, fontSize);
|
|
57254
|
+
const dims = map(coordSys.dimensions, function(dim) {
|
|
57255
|
+
return data.mapDimension(dim);
|
|
57256
|
+
}).slice(0, 2);
|
|
57257
|
+
const store = data.getStore();
|
|
57258
|
+
const dimIdx0 = data.getDimensionIndex(dims[0]);
|
|
57259
|
+
const dimIdx1 = data.getDimensionIndex(dims[1]);
|
|
57260
|
+
const xOffset = seriesModel.get("offset") || 0;
|
|
57261
|
+
const char = seriesModel.get("char");
|
|
57262
|
+
const text = seriesModel.get("text");
|
|
57263
|
+
const price = getYByLocation(seriesModel);
|
|
57264
|
+
const showLast = seriesModel.get("showLast");
|
|
57265
|
+
return {
|
|
57266
|
+
progress(params, charPlotData) {
|
|
57267
|
+
const charList = [];
|
|
57268
|
+
const textList = [];
|
|
57269
|
+
const lastIndex = data.count(true) - 1;
|
|
57270
|
+
const tmpIn = [];
|
|
57271
|
+
for (let i = params.start; i < params.end; i++) {
|
|
57272
|
+
if (showLast && lastIndex - data.getRawIndex(i) >= showLast) {
|
|
57273
|
+
continue;
|
|
57274
|
+
}
|
|
57275
|
+
tmpIn[0] = store.get(dimIdx0, i) + xOffset;
|
|
57276
|
+
tmpIn[1] = store.get(dimIdx1, i);
|
|
57277
|
+
if (isNaN(tmpIn[1])) {
|
|
57278
|
+
continue;
|
|
57279
|
+
}
|
|
57280
|
+
const itemModel = data.getItemModel(i);
|
|
57281
|
+
const {color: color2, text_color} = itemModel.get("itemStyle");
|
|
57282
|
+
const point = coordSys.dataToPoint(tmpIn);
|
|
57283
|
+
const x = point[0];
|
|
57284
|
+
const y = price ?? point[1] + distance2;
|
|
57285
|
+
if (char && color2) {
|
|
57286
|
+
charList.push({
|
|
57287
|
+
x,
|
|
57288
|
+
y,
|
|
57289
|
+
textColor: color2
|
|
57290
|
+
});
|
|
57291
|
+
}
|
|
57292
|
+
const textColor = text_color || color2;
|
|
57293
|
+
if (text && textColor) {
|
|
57294
|
+
textList.push({
|
|
57295
|
+
x,
|
|
57296
|
+
y: y + distance2,
|
|
57297
|
+
textColor
|
|
57298
|
+
});
|
|
57299
|
+
}
|
|
57300
|
+
}
|
|
57301
|
+
charPlotData.setLayout({
|
|
57302
|
+
charList,
|
|
57303
|
+
fontSize,
|
|
57304
|
+
textList
|
|
57305
|
+
});
|
|
57306
|
+
}
|
|
57307
|
+
};
|
|
57308
|
+
}
|
|
57309
|
+
};
|
|
57310
|
+
var CharPlotLayout_default = CharPlotLayout;
|
|
57311
|
+
|
|
57312
|
+
// src/chart/charPlot/install.ts
|
|
57313
|
+
function install29(registers) {
|
|
57314
|
+
registers.registerSeriesModel(CharPlotSeries_default);
|
|
57315
|
+
registers.registerChartView(CharPlotView_default);
|
|
57316
|
+
registers.registerLayout(CharPlotLayout_default);
|
|
57317
|
+
}
|
|
57318
|
+
|
|
56963
57319
|
// src/chart/labels/LabelsSeries.ts
|
|
56964
57320
|
var LabelsSeriesModel2 = class extends Series_default {
|
|
56965
57321
|
constructor() {
|
|
@@ -57405,7 +57761,7 @@ function getSymbolLabelFontSize(size, width) {
|
|
|
57405
57761
|
}
|
|
57406
57762
|
|
|
57407
57763
|
// src/chart/labels/labelsLayout.ts
|
|
57408
|
-
function
|
|
57764
|
+
function getYByLocation2(seriesModel) {
|
|
57409
57765
|
const location = seriesModel.get("location");
|
|
57410
57766
|
if (!["bottom", "top"].includes(location)) {
|
|
57411
57767
|
return null;
|
|
@@ -57474,7 +57830,7 @@ var labelsLayout = {
|
|
|
57474
57830
|
const dimIdx0 = data.getDimensionIndex(dims[0]);
|
|
57475
57831
|
const dimIdx1 = data.getDimensionIndex(dims[1]);
|
|
57476
57832
|
const xOffset = seriesModel.get("offset") || 0;
|
|
57477
|
-
const price =
|
|
57833
|
+
const price = getYByLocation2(seriesModel);
|
|
57478
57834
|
const showLast = seriesModel.get("showLast");
|
|
57479
57835
|
return {
|
|
57480
57836
|
progress(params, labelsData) {
|
|
@@ -57592,7 +57948,7 @@ var labelsLayout = {
|
|
|
57592
57948
|
var labelsLayout_default = labelsLayout;
|
|
57593
57949
|
|
|
57594
57950
|
// src/chart/labels/install.ts
|
|
57595
|
-
function
|
|
57951
|
+
function install30(registers) {
|
|
57596
57952
|
registers.registerSeriesModel(LabelsSeries_default);
|
|
57597
57953
|
registers.registerChartView(LabelsView_default);
|
|
57598
57954
|
registers.registerLayout(labelsLayout_default);
|
|
@@ -57727,7 +58083,7 @@ var hLinesLayout = {
|
|
|
57727
58083
|
var hLinesLayout_default = hLinesLayout;
|
|
57728
58084
|
|
|
57729
58085
|
// src/chart/hlines/install.ts
|
|
57730
|
-
function
|
|
58086
|
+
function install31(registers) {
|
|
57731
58087
|
registers.registerChartView(HLinesView_default);
|
|
57732
58088
|
registers.registerSeriesModel(HLinesSeries_default);
|
|
57733
58089
|
registers.registerLayout(hLinesLayout_default);
|
|
@@ -57799,20 +58155,20 @@ var FillPolyPath = class extends Path_default {
|
|
|
57799
58155
|
getDefaultShape() {
|
|
57800
58156
|
return new FillPolyShape();
|
|
57801
58157
|
}
|
|
57802
|
-
buildPath(
|
|
58158
|
+
buildPath(ctx2, shape) {
|
|
57803
58159
|
const {points: points4} = shape;
|
|
57804
58160
|
for (let index = 0; index < points4.length; index++) {
|
|
57805
58161
|
const polyPoints = points4[index];
|
|
57806
58162
|
for (let i = 0; i < polyPoints.length; i++) {
|
|
57807
58163
|
const [x, y] = polyPoints[i];
|
|
57808
58164
|
if (i === 0) {
|
|
57809
|
-
|
|
58165
|
+
ctx2.moveTo(x, y);
|
|
57810
58166
|
continue;
|
|
57811
58167
|
}
|
|
57812
|
-
|
|
58168
|
+
ctx2.lineTo(x, y);
|
|
57813
58169
|
if (i + 1 === polyPoints.length) {
|
|
57814
58170
|
const [fx, fy] = polyPoints[0];
|
|
57815
|
-
|
|
58171
|
+
ctx2.lineTo(fx, fy);
|
|
57816
58172
|
}
|
|
57817
58173
|
}
|
|
57818
58174
|
}
|
|
@@ -58010,7 +58366,7 @@ var fillsLayout = {
|
|
|
58010
58366
|
var fillsLayout_default = fillsLayout;
|
|
58011
58367
|
|
|
58012
58368
|
// src/chart/fills/install.ts
|
|
58013
|
-
function
|
|
58369
|
+
function install32(registers) {
|
|
58014
58370
|
registers.registerChartView(FillsView_default);
|
|
58015
58371
|
registers.registerSeriesModel(FillsSeries_default);
|
|
58016
58372
|
registers.registerLayout(fillsLayout_default);
|
|
@@ -58074,20 +58430,20 @@ var BgColorPath = class extends Path_default {
|
|
|
58074
58430
|
getDefaultShape() {
|
|
58075
58431
|
return new BgColorShape();
|
|
58076
58432
|
}
|
|
58077
|
-
buildPath(
|
|
58433
|
+
buildPath(ctx2, shape) {
|
|
58078
58434
|
const {points: points4, isLine} = shape;
|
|
58079
58435
|
if (isLine) {
|
|
58080
58436
|
for (let index = 0; index < points4.length; index++) {
|
|
58081
58437
|
const point = points4[index];
|
|
58082
58438
|
const {x, y, height} = point;
|
|
58083
|
-
|
|
58084
|
-
|
|
58439
|
+
ctx2.moveTo(x, y);
|
|
58440
|
+
ctx2.lineTo(x, y + height);
|
|
58085
58441
|
}
|
|
58086
58442
|
} else {
|
|
58087
58443
|
for (let index = 0; index < points4.length; index++) {
|
|
58088
58444
|
const point = points4[index];
|
|
58089
58445
|
const {x, y, width, height} = point;
|
|
58090
|
-
|
|
58446
|
+
ctx2.rect(x, y, width, height);
|
|
58091
58447
|
}
|
|
58092
58448
|
}
|
|
58093
58449
|
}
|
|
@@ -58214,7 +58570,7 @@ var bgColorLayout = {
|
|
|
58214
58570
|
var BgColorLayout_default = bgColorLayout;
|
|
58215
58571
|
|
|
58216
58572
|
// src/chart/bgColor/install.ts
|
|
58217
|
-
function
|
|
58573
|
+
function install33(registers) {
|
|
58218
58574
|
registers.registerChartView(BgColorView_default);
|
|
58219
58575
|
registers.registerSeriesModel(BgColorSeries_default);
|
|
58220
58576
|
registers.registerLayout(BgColorLayout_default);
|
|
@@ -58232,32 +58588,32 @@ var HeatmapLayer = class {
|
|
|
58232
58588
|
inRange: null,
|
|
58233
58589
|
outOfRange: null
|
|
58234
58590
|
};
|
|
58235
|
-
const
|
|
58236
|
-
this.canvas =
|
|
58591
|
+
const canvas2 = platformApi.createCanvas();
|
|
58592
|
+
this.canvas = canvas2;
|
|
58237
58593
|
}
|
|
58238
58594
|
update(data, width, height, normalize5, colorFunc, isInRange) {
|
|
58239
58595
|
const brush3 = this._getBrush();
|
|
58240
58596
|
const gradientInRange = this._getGradient(colorFunc, "inRange");
|
|
58241
58597
|
const gradientOutOfRange = this._getGradient(colorFunc, "outOfRange");
|
|
58242
58598
|
const r = this.pointSize + this.blurSize;
|
|
58243
|
-
const
|
|
58244
|
-
const
|
|
58599
|
+
const canvas2 = this.canvas;
|
|
58600
|
+
const ctx2 = canvas2.getContext("2d");
|
|
58245
58601
|
const len2 = data.length;
|
|
58246
|
-
|
|
58247
|
-
|
|
58602
|
+
canvas2.width = width;
|
|
58603
|
+
canvas2.height = height;
|
|
58248
58604
|
for (let i = 0; i < len2; ++i) {
|
|
58249
58605
|
const p = data[i];
|
|
58250
58606
|
const x = p[0];
|
|
58251
58607
|
const y = p[1];
|
|
58252
58608
|
const value = p[2];
|
|
58253
58609
|
const alpha = normalize5(value);
|
|
58254
|
-
|
|
58255
|
-
|
|
58610
|
+
ctx2.globalAlpha = alpha;
|
|
58611
|
+
ctx2.drawImage(brush3, x - r, y - r);
|
|
58256
58612
|
}
|
|
58257
|
-
if (!
|
|
58258
|
-
return
|
|
58613
|
+
if (!canvas2.width || !canvas2.height) {
|
|
58614
|
+
return canvas2;
|
|
58259
58615
|
}
|
|
58260
|
-
const imageData =
|
|
58616
|
+
const imageData = ctx2.getImageData(0, 0, canvas2.width, canvas2.height);
|
|
58261
58617
|
const pixels = imageData.data;
|
|
58262
58618
|
let offset = 0;
|
|
58263
58619
|
const pixelLen = pixels.length;
|
|
@@ -58278,8 +58634,8 @@ var HeatmapLayer = class {
|
|
|
58278
58634
|
offset += 4;
|
|
58279
58635
|
}
|
|
58280
58636
|
}
|
|
58281
|
-
|
|
58282
|
-
return
|
|
58637
|
+
ctx2.putImageData(imageData, 0, 0);
|
|
58638
|
+
return canvas2;
|
|
58283
58639
|
}
|
|
58284
58640
|
_getBrush() {
|
|
58285
58641
|
const brushCanvas = this._brushCanvas || (this._brushCanvas = platformApi.createCanvas());
|
|
@@ -58287,15 +58643,15 @@ var HeatmapLayer = class {
|
|
|
58287
58643
|
const d = r * 2;
|
|
58288
58644
|
brushCanvas.width = d;
|
|
58289
58645
|
brushCanvas.height = d;
|
|
58290
|
-
const
|
|
58291
|
-
|
|
58292
|
-
|
|
58293
|
-
|
|
58294
|
-
|
|
58295
|
-
|
|
58296
|
-
|
|
58297
|
-
|
|
58298
|
-
|
|
58646
|
+
const ctx2 = brushCanvas.getContext("2d");
|
|
58647
|
+
ctx2.clearRect(0, 0, d, d);
|
|
58648
|
+
ctx2.shadowOffsetX = d;
|
|
58649
|
+
ctx2.shadowBlur = this.blurSize;
|
|
58650
|
+
ctx2.shadowColor = "#000";
|
|
58651
|
+
ctx2.beginPath();
|
|
58652
|
+
ctx2.arc(-r, r, this.pointSize, 0, Math.PI * 2, true);
|
|
58653
|
+
ctx2.closePath();
|
|
58654
|
+
ctx2.fill();
|
|
58299
58655
|
return brushCanvas;
|
|
58300
58656
|
}
|
|
58301
58657
|
_getGradient(colorFunc, state) {
|
|
@@ -58612,7 +58968,7 @@ HeatmapSeriesModel.defaultOption = {
|
|
|
58612
58968
|
var HeatmapSeries_default = HeatmapSeriesModel;
|
|
58613
58969
|
|
|
58614
58970
|
// src/chart/heatmap/install.ts
|
|
58615
|
-
function
|
|
58971
|
+
function install34(registers) {
|
|
58616
58972
|
registers.registerChartView(HeatmapView_default);
|
|
58617
58973
|
registers.registerSeriesModel(HeatmapSeries_default);
|
|
58618
58974
|
}
|
|
@@ -59175,7 +59531,7 @@ PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries_defau
|
|
|
59175
59531
|
var PictorialBarSeries_default = PictorialBarSeriesModel;
|
|
59176
59532
|
|
|
59177
59533
|
// src/chart/bar/installPictorialBar.ts
|
|
59178
|
-
function
|
|
59534
|
+
function install35(registers) {
|
|
59179
59535
|
registers.registerChartView(PictorialBarView_default);
|
|
59180
59536
|
registers.registerSeriesModel(PictorialBarSeries_default);
|
|
59181
59537
|
registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout2, "pictorialBar"));
|
|
@@ -59576,7 +59932,7 @@ function computeBaseline(data) {
|
|
|
59576
59932
|
}
|
|
59577
59933
|
|
|
59578
59934
|
// src/chart/themeRiver/install.ts
|
|
59579
|
-
function
|
|
59935
|
+
function install36(registers) {
|
|
59580
59936
|
registers.registerChartView(ThemeRiverView_default);
|
|
59581
59937
|
registers.registerSeriesModel(ThemeRiverSeries_default);
|
|
59582
59938
|
registers.registerLayout(themeRiverLayout);
|
|
@@ -60214,7 +60570,7 @@ function sunburstVisual(ecModel) {
|
|
|
60214
60570
|
}
|
|
60215
60571
|
|
|
60216
60572
|
// src/chart/sunburst/install.ts
|
|
60217
|
-
function
|
|
60573
|
+
function install37(registers) {
|
|
60218
60574
|
registers.registerChartView(SunburstView_default);
|
|
60219
60575
|
registers.registerSeriesModel(SunburstSeries_default);
|
|
60220
60576
|
registers.registerLayout(curry(sunburstLayout, "sunburst"));
|
|
@@ -61662,7 +62018,7 @@ function hasOwnPathData(shape) {
|
|
|
61662
62018
|
}
|
|
61663
62019
|
|
|
61664
62020
|
// src/chart/custom/install.ts
|
|
61665
|
-
function
|
|
62021
|
+
function install38(registers) {
|
|
61666
62022
|
registers.registerChartView(CustomView_default);
|
|
61667
62023
|
registers.registerSeriesModel(CustomSeries_default);
|
|
61668
62024
|
}
|
|
@@ -62883,7 +63239,7 @@ function illegalPoint(point) {
|
|
|
62883
63239
|
}
|
|
62884
63240
|
|
|
62885
63241
|
// src/component/axisPointer/install.ts
|
|
62886
|
-
function
|
|
63242
|
+
function install39(registers) {
|
|
62887
63243
|
AxisView_default.registerAxisPointerClass("CartesianAxisPointer", CartesianAxisPointer_default);
|
|
62888
63244
|
registers.registerComponentModel(AxisPointerModel_default);
|
|
62889
63245
|
registers.registerComponentView(AxisPointerView_default);
|
|
@@ -62912,9 +63268,9 @@ function install38(registers) {
|
|
|
62912
63268
|
}
|
|
62913
63269
|
|
|
62914
63270
|
// src/component/grid/install.ts
|
|
62915
|
-
function
|
|
63271
|
+
function install40(registers) {
|
|
62916
63272
|
use(install6);
|
|
62917
|
-
use(
|
|
63273
|
+
use(install39);
|
|
62918
63274
|
}
|
|
62919
63275
|
|
|
62920
63276
|
// src/component/axisPointer/PolarAxisPointer.ts
|
|
@@ -63968,8 +64324,8 @@ var PolarView2 = class extends Component_default2 {
|
|
|
63968
64324
|
};
|
|
63969
64325
|
var PolarView = PolarView2;
|
|
63970
64326
|
PolarView.type = "polar";
|
|
63971
|
-
function
|
|
63972
|
-
use(
|
|
64327
|
+
function install41(registers) {
|
|
64328
|
+
use(install39);
|
|
63973
64329
|
AxisView_default.registerAxisPointerClass("PolarAxisPointer", PolarAxisPointer_default);
|
|
63974
64330
|
registers.registerCoordinateSystem("polar", polarCreator_default);
|
|
63975
64331
|
registers.registerComponentModel(PolarModel_default);
|
|
@@ -64432,8 +64788,8 @@ var SingleView2 = class extends Component_default2 {
|
|
|
64432
64788
|
};
|
|
64433
64789
|
var SingleView = SingleView2;
|
|
64434
64790
|
SingleView.type = "single";
|
|
64435
|
-
function
|
|
64436
|
-
use(
|
|
64791
|
+
function install42(registers) {
|
|
64792
|
+
use(install39);
|
|
64437
64793
|
AxisView_default.registerAxisPointerClass("SingleAxisPointer", SingleAxisPointer_default);
|
|
64438
64794
|
registers.registerComponentView(SingleView);
|
|
64439
64795
|
registers.registerComponentView(SingleAxisView_default);
|
|
@@ -65123,7 +65479,7 @@ function getCoordSys5(finder) {
|
|
|
65123
65479
|
var Calendar_default = Calendar;
|
|
65124
65480
|
|
|
65125
65481
|
// src/component/calendar/install.ts
|
|
65126
|
-
function
|
|
65482
|
+
function install43(registers) {
|
|
65127
65483
|
registers.registerComponentModel(CalendarModel_default);
|
|
65128
65484
|
registers.registerComponentView(CalendarView_default);
|
|
65129
65485
|
registers.registerCoordinateSystem("calendar", Calendar_default);
|
|
@@ -65512,7 +65868,7 @@ function setEventData(el, graphicModel, elOption) {
|
|
|
65512
65868
|
}
|
|
65513
65869
|
|
|
65514
65870
|
// src/component/graphic/install.ts
|
|
65515
|
-
function
|
|
65871
|
+
function install44(registers) {
|
|
65516
65872
|
registers.registerComponentModel(GraphicComponentModel);
|
|
65517
65873
|
registers.registerComponentView(GraphicComponentView);
|
|
65518
65874
|
registers.registerPreprocessor(function(option) {
|
|
@@ -65668,6 +66024,9 @@ var DataZoomModel2 = class extends Component_default {
|
|
|
65668
66024
|
this.settledOption = inputRawOption;
|
|
65669
66025
|
this.mergeDefaultAndTheme(option, ecModel);
|
|
65670
66026
|
this._doInit(inputRawOption);
|
|
66027
|
+
if (option.barSpace && option.lastBarRightSideDiffBarCount !== void 0) {
|
|
66028
|
+
this.setDistanceRange([option.barSpace, option.lastBarRightSideDiffBarCount]);
|
|
66029
|
+
}
|
|
65671
66030
|
}
|
|
65672
66031
|
mergeOption(newOption) {
|
|
65673
66032
|
const inputRawOption = retrieveRawOption(newOption);
|
|
@@ -66392,7 +66751,7 @@ function installCommon(registers) {
|
|
|
66392
66751
|
}
|
|
66393
66752
|
|
|
66394
66753
|
// src/component/dataZoom/installDataZoomSelect.ts
|
|
66395
|
-
function
|
|
66754
|
+
function install45(registers) {
|
|
66396
66755
|
registers.registerComponentModel(SelectZoomModel_default);
|
|
66397
66756
|
registers.registerComponentView(SelectZoomView_default);
|
|
66398
66757
|
installCommon(registers);
|
|
@@ -67792,7 +68151,7 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
67792
68151
|
var DataZoom_default = DataZoomFeature;
|
|
67793
68152
|
|
|
67794
68153
|
// src/component/toolbox/install.ts
|
|
67795
|
-
function
|
|
68154
|
+
function install46(registers) {
|
|
67796
68155
|
registers.registerComponentModel(ToolboxModel_default);
|
|
67797
68156
|
registers.registerComponentView(ToolboxView_default);
|
|
67798
68157
|
registerFeature("saveAsImage", SaveAsImage_default);
|
|
@@ -67800,7 +68159,7 @@ function install45(registers) {
|
|
|
67800
68159
|
registerFeature("dataView", DataView_default);
|
|
67801
68160
|
registerFeature("dataZoom", DataZoom_default);
|
|
67802
68161
|
registerFeature("restore", Restore_default);
|
|
67803
|
-
use(
|
|
68162
|
+
use(install45);
|
|
67804
68163
|
}
|
|
67805
68164
|
|
|
67806
68165
|
// src/component/tooltip/TooltipModel.ts
|
|
@@ -68968,8 +69327,8 @@ function findComponentReference(payload, ecModel, api2) {
|
|
|
68968
69327
|
var TooltipView_default = TooltipView;
|
|
68969
69328
|
|
|
68970
69329
|
// src/component/tooltip/install.ts
|
|
68971
|
-
function
|
|
68972
|
-
use(
|
|
69330
|
+
function install47(registers) {
|
|
69331
|
+
use(install39);
|
|
68973
69332
|
registers.registerComponentModel(TooltipModel_default);
|
|
68974
69333
|
registers.registerComponentView(TooltipView_default);
|
|
68975
69334
|
registers.registerAction({
|
|
@@ -69585,7 +69944,7 @@ var BrushFeature = class extends ToolboxFeature {
|
|
|
69585
69944
|
var Brush_default = BrushFeature;
|
|
69586
69945
|
|
|
69587
69946
|
// src/component/brush/install.ts
|
|
69588
|
-
function
|
|
69947
|
+
function install48(registers) {
|
|
69589
69948
|
registers.registerComponentView(BrushView_default);
|
|
69590
69949
|
registers.registerComponentModel(BrushModel_default);
|
|
69591
69950
|
registers.registerPreprocessor(brushPreprocessor);
|
|
@@ -69732,7 +70091,7 @@ var TitleView2 = class extends Component_default2 {
|
|
|
69732
70091
|
};
|
|
69733
70092
|
var TitleView = TitleView2;
|
|
69734
70093
|
TitleView.type = "title";
|
|
69735
|
-
function
|
|
70094
|
+
function install49(registers) {
|
|
69736
70095
|
registers.registerComponentModel(TitleModel);
|
|
69737
70096
|
registers.registerComponentView(TitleView);
|
|
69738
70097
|
}
|
|
@@ -70097,7 +70456,7 @@ TableView.type = "table";
|
|
|
70097
70456
|
var TableView_default = TableView;
|
|
70098
70457
|
|
|
70099
70458
|
// src/component/table/install.ts
|
|
70100
|
-
function
|
|
70459
|
+
function install50(registers) {
|
|
70101
70460
|
registers.registerComponentModel(TableModel_default);
|
|
70102
70461
|
registers.registerComponentView(TableView_default);
|
|
70103
70462
|
}
|
|
@@ -70951,7 +71310,7 @@ function has(obj, attr) {
|
|
|
70951
71310
|
}
|
|
70952
71311
|
|
|
70953
71312
|
// src/component/timeline/install.ts
|
|
70954
|
-
function
|
|
71313
|
+
function install51(registers) {
|
|
70955
71314
|
registers.registerComponentModel(SliderTimelineModel_default);
|
|
70956
71315
|
registers.registerComponentView(SliderTimelineView_default);
|
|
70957
71316
|
registers.registerSubTypeDefaulter("timeline", function() {
|
|
@@ -71392,7 +71751,7 @@ function createData(coordSys, seriesModel, mpModel) {
|
|
|
71392
71751
|
var MarkPointView_default = MarkPointView;
|
|
71393
71752
|
|
|
71394
71753
|
// src/component/marker/installMarkPoint.ts
|
|
71395
|
-
function
|
|
71754
|
+
function install52(registers) {
|
|
71396
71755
|
registers.registerComponentModel(MarkPointModel_default);
|
|
71397
71756
|
registers.registerComponentView(MarkPointView_default);
|
|
71398
71757
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -71710,7 +72069,7 @@ function createList2(coordSys, seriesModel, mlModel) {
|
|
|
71710
72069
|
var MarkLineView_default = MarkLineView;
|
|
71711
72070
|
|
|
71712
72071
|
// src/component/marker/installMarkLine.ts
|
|
71713
|
-
function
|
|
72072
|
+
function install53(registers) {
|
|
71714
72073
|
registers.registerComponentModel(MarkLineModel_default);
|
|
71715
72074
|
registers.registerComponentView(MarkLineView_default);
|
|
71716
72075
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -72024,7 +72383,7 @@ function createList3(coordSys, seriesModel, maModel) {
|
|
|
72024
72383
|
var MarkAreaView_default = MarkAreaView;
|
|
72025
72384
|
|
|
72026
72385
|
// src/component/marker/installMarkArea.ts
|
|
72027
|
-
function
|
|
72386
|
+
function install54(registers) {
|
|
72028
72387
|
registers.registerComponentModel(MarkAreaModel_default);
|
|
72029
72388
|
registers.registerComponentView(MarkAreaView_default);
|
|
72030
72389
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -72667,7 +73026,7 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
72667
73026
|
var MarkLabelView_default = MarkLabelView;
|
|
72668
73027
|
|
|
72669
73028
|
// src/component/marker/installMarkLabel.ts
|
|
72670
|
-
function
|
|
73029
|
+
function install55(registers) {
|
|
72671
73030
|
registers.registerComponentModel(MarkLabelModal_default);
|
|
72672
73031
|
registers.registerComponentView(MarkLabelView_default);
|
|
72673
73032
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -73349,7 +73708,7 @@ function installLegendAction(registers) {
|
|
|
73349
73708
|
}
|
|
73350
73709
|
|
|
73351
73710
|
// src/component/legend/installLegendPlain.ts
|
|
73352
|
-
function
|
|
73711
|
+
function install56(registers) {
|
|
73353
73712
|
registers.registerComponentModel(LegendModel_default);
|
|
73354
73713
|
registers.registerComponentView(LegendView_default);
|
|
73355
73714
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);
|
|
@@ -73679,17 +74038,17 @@ function installScrollableLegendAction(registers) {
|
|
|
73679
74038
|
}
|
|
73680
74039
|
|
|
73681
74040
|
// src/component/legend/installLegendScroll.ts
|
|
73682
|
-
function
|
|
73683
|
-
use(
|
|
74041
|
+
function install57(registers) {
|
|
74042
|
+
use(install56);
|
|
73684
74043
|
registers.registerComponentModel(ScrollableLegendModel_default);
|
|
73685
74044
|
registers.registerComponentView(ScrollableLegendView_default);
|
|
73686
74045
|
installScrollableLegendAction(registers);
|
|
73687
74046
|
}
|
|
73688
74047
|
|
|
73689
74048
|
// src/component/legend/install.ts
|
|
73690
|
-
function
|
|
73691
|
-
use(install55);
|
|
74049
|
+
function install58(registers) {
|
|
73692
74050
|
use(install56);
|
|
74051
|
+
use(install57);
|
|
73693
74052
|
}
|
|
73694
74053
|
|
|
73695
74054
|
// src/component/dataZoom/InsideZoomModel.ts
|
|
@@ -74116,7 +74475,7 @@ var getDirectionInfo = {
|
|
|
74116
74475
|
var InsideZoomView_default = InsideZoomView;
|
|
74117
74476
|
|
|
74118
74477
|
// src/component/dataZoom/installDataZoomInside.ts
|
|
74119
|
-
function
|
|
74478
|
+
function install59(registers) {
|
|
74120
74479
|
installCommon(registers);
|
|
74121
74480
|
registers.registerComponentModel(InsideZoomModel_default);
|
|
74122
74481
|
registers.registerComponentView(InsideZoomView_default);
|
|
@@ -74872,16 +75231,16 @@ function getCursor(orient) {
|
|
|
74872
75231
|
var SliderZoomView_default = SliderZoomView;
|
|
74873
75232
|
|
|
74874
75233
|
// src/component/dataZoom/installDataZoomSlider.ts
|
|
74875
|
-
function
|
|
75234
|
+
function install60(registers) {
|
|
74876
75235
|
registers.registerComponentModel(SliderZoomModel_default);
|
|
74877
75236
|
registers.registerComponentView(SliderZoomView_default);
|
|
74878
75237
|
installCommon(registers);
|
|
74879
75238
|
}
|
|
74880
75239
|
|
|
74881
75240
|
// src/component/dataZoom/install.ts
|
|
74882
|
-
function
|
|
74883
|
-
use(install58);
|
|
75241
|
+
function install61(registers) {
|
|
74884
75242
|
use(install59);
|
|
75243
|
+
use(install60);
|
|
74885
75244
|
}
|
|
74886
75245
|
|
|
74887
75246
|
// src/visual/visualDefault.ts
|
|
@@ -76146,7 +76505,7 @@ function installCommon2(registers) {
|
|
|
76146
76505
|
}
|
|
76147
76506
|
|
|
76148
76507
|
// src/component/visualMap/installVisualMapContinuous.ts
|
|
76149
|
-
function
|
|
76508
|
+
function install62(registers) {
|
|
76150
76509
|
registers.registerComponentModel(ContinuousModel_default);
|
|
76151
76510
|
registers.registerComponentView(ContinuousView_default);
|
|
76152
76511
|
installCommon2(registers);
|
|
@@ -76586,16 +76945,16 @@ PiecewiseVisualMapView.type = "visualMap.piecewise";
|
|
|
76586
76945
|
var PiecewiseView_default = PiecewiseVisualMapView;
|
|
76587
76946
|
|
|
76588
76947
|
// src/component/visualMap/installVisualMapPiecewise.ts
|
|
76589
|
-
function
|
|
76948
|
+
function install63(registers) {
|
|
76590
76949
|
registers.registerComponentModel(PiecewiseModel_default);
|
|
76591
76950
|
registers.registerComponentView(PiecewiseView_default);
|
|
76592
76951
|
installCommon2(registers);
|
|
76593
76952
|
}
|
|
76594
76953
|
|
|
76595
76954
|
// src/component/visualMap/install.ts
|
|
76596
|
-
function
|
|
76597
|
-
use(install61);
|
|
76955
|
+
function install64(registers) {
|
|
76598
76956
|
use(install62);
|
|
76957
|
+
use(install63);
|
|
76599
76958
|
}
|
|
76600
76959
|
|
|
76601
76960
|
// src/visual/aria.ts
|
|
@@ -76791,7 +77150,7 @@ function ariaPreprocessor(option) {
|
|
|
76791
77150
|
}
|
|
76792
77151
|
|
|
76793
77152
|
// src/component/aria/install.ts
|
|
76794
|
-
function
|
|
77153
|
+
function install65(registers) {
|
|
76795
77154
|
registers.registerPreprocessor(ariaPreprocessor);
|
|
76796
77155
|
registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);
|
|
76797
77156
|
}
|
|
@@ -77129,7 +77488,7 @@ var sortTransform = {
|
|
|
77129
77488
|
};
|
|
77130
77489
|
|
|
77131
77490
|
// src/component/transform/install.ts
|
|
77132
|
-
function
|
|
77491
|
+
function install66(registers) {
|
|
77133
77492
|
registers.registerTransform(filterTransform);
|
|
77134
77493
|
registers.registerTransform(sortTransform);
|
|
77135
77494
|
}
|
|
@@ -77167,7 +77526,7 @@ var DatasetView = class extends Component_default2 {
|
|
|
77167
77526
|
}
|
|
77168
77527
|
};
|
|
77169
77528
|
DatasetView.type = "dataset";
|
|
77170
|
-
function
|
|
77529
|
+
function install67(registers) {
|
|
77171
77530
|
registers.registerComponentModel(DatasetModel);
|
|
77172
77531
|
registers.registerComponentView(DatasetView);
|
|
77173
77532
|
}
|
|
@@ -78885,6 +79244,7 @@ use([
|
|
|
78885
79244
|
install18,
|
|
78886
79245
|
install19,
|
|
78887
79246
|
install20,
|
|
79247
|
+
install29,
|
|
78888
79248
|
install21,
|
|
78889
79249
|
install22,
|
|
78890
79250
|
install23,
|
|
@@ -78893,27 +79253,26 @@ use([
|
|
|
78893
79253
|
install26,
|
|
78894
79254
|
install27,
|
|
78895
79255
|
install28,
|
|
78896
|
-
install29,
|
|
78897
79256
|
install30,
|
|
78898
|
-
install32,
|
|
78899
79257
|
install31,
|
|
78900
79258
|
install33,
|
|
79259
|
+
install32,
|
|
78901
79260
|
install34,
|
|
78902
79261
|
install35,
|
|
78903
79262
|
install36,
|
|
78904
|
-
install37
|
|
79263
|
+
install37,
|
|
79264
|
+
install38
|
|
78905
79265
|
]);
|
|
78906
|
-
use(install39);
|
|
78907
79266
|
use(install40);
|
|
78908
|
-
use(install10);
|
|
78909
79267
|
use(install41);
|
|
78910
|
-
use(
|
|
79268
|
+
use(install10);
|
|
78911
79269
|
use(install42);
|
|
79270
|
+
use(install17);
|
|
78912
79271
|
use(install43);
|
|
78913
|
-
use(
|
|
79272
|
+
use(install44);
|
|
78914
79273
|
use(install46);
|
|
78915
|
-
use(install38);
|
|
78916
79274
|
use(install47);
|
|
79275
|
+
use(install39);
|
|
78917
79276
|
use(install48);
|
|
78918
79277
|
use(install49);
|
|
78919
79278
|
use(install50);
|
|
@@ -78921,16 +79280,17 @@ use(install51);
|
|
|
78921
79280
|
use(install52);
|
|
78922
79281
|
use(install53);
|
|
78923
79282
|
use(install54);
|
|
78924
|
-
use(
|
|
78925
|
-
use(install60);
|
|
79283
|
+
use(install55);
|
|
78926
79284
|
use(install58);
|
|
78927
|
-
use(install59);
|
|
78928
|
-
use(install63);
|
|
78929
79285
|
use(install61);
|
|
78930
|
-
use(
|
|
79286
|
+
use(install59);
|
|
79287
|
+
use(install60);
|
|
78931
79288
|
use(install64);
|
|
79289
|
+
use(install62);
|
|
79290
|
+
use(install63);
|
|
78932
79291
|
use(install65);
|
|
78933
79292
|
use(install66);
|
|
79293
|
+
use(install67);
|
|
78934
79294
|
use(installUniversalTransition);
|
|
78935
79295
|
use(installLabelLayout);
|
|
78936
79296
|
|