tvcharts 0.6.12 → 0.6.13
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 +868 -114
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -2
- package/lib/chart/helper/Symbol.js +55 -12
- package/lib/chart/helper/SymbolDraw.js +2 -1
- package/lib/chart/labels/LabelsSeries.js +109 -0
- package/lib/chart/labels/LabelsView.js +133 -0
- package/lib/chart/labels/install.js +55 -0
- package/lib/chart/labels/labelsVisual.js +128 -0
- package/lib/chart/labels.js +46 -0
- package/lib/chart/linesPlot/LinesPlotSeries.js +2 -26
- package/lib/chart/linesPlot/LinesPlotView.js +52 -34
- package/lib/chart/linesPlot/SymbolPath.js +88 -0
- package/lib/chart/linesPlot/linesPlotLayout.js +58 -32
- package/lib/chart/scatter/ScatterView.js +2 -1
- package/lib/export/charts.js +1 -0
- package/lib/model/Global.js +1 -0
- package/lib/util/symbol.js +597 -1
- package/package.json +1 -1
- package/types/dist/charts.d.ts +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/echarts.d.ts +5 -6
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +11 -10
- package/types/src/chart/helper/Symbol.d.ts +1 -0
- package/types/src/chart/helper/SymbolDraw.d.ts +1 -0
- package/types/src/chart/labels/LabelsSeries.d.ts +37 -0
- package/types/src/chart/labels/LabelsView.d.ts +28 -0
- package/types/src/chart/labels/install.d.ts +2 -0
- package/types/src/chart/labels/labelsVisual.d.ts +3 -0
- package/types/src/chart/labels.d.ts +1 -0
- package/types/src/chart/linesPlot/LinesPlotSeries.d.ts +6 -7
- package/types/src/chart/linesPlot/SymbolPath.d.ts +24 -0
- package/types/src/chart/linesPlot/linesPlotLayout.d.ts +1 -1
- package/types/src/export/charts.d.ts +1 -0
package/dist/echarts.js
CHANGED
|
@@ -8278,7 +8278,7 @@ function estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) {
|
|
|
8278
8278
|
function parsePlainText(text, style) {
|
|
8279
8279
|
text != null && (text += "");
|
|
8280
8280
|
const overflow = style.overflow;
|
|
8281
|
-
const
|
|
8281
|
+
const padding2 = style.padding;
|
|
8282
8282
|
const font = style.font;
|
|
8283
8283
|
const truncate = overflow === "truncate";
|
|
8284
8284
|
const calculatedLineHeight = getLineHeight(font);
|
|
@@ -8316,10 +8316,10 @@ function parsePlainText(text, style) {
|
|
|
8316
8316
|
width = contentWidth;
|
|
8317
8317
|
}
|
|
8318
8318
|
let outerWidth = contentWidth;
|
|
8319
|
-
if (
|
|
8320
|
-
outerHeight +=
|
|
8321
|
-
outerWidth +=
|
|
8322
|
-
width +=
|
|
8319
|
+
if (padding2) {
|
|
8320
|
+
outerHeight += padding2[0] + padding2[2];
|
|
8321
|
+
outerWidth += padding2[1] + padding2[3];
|
|
8322
|
+
width += padding2[1] + padding2[3];
|
|
8323
8323
|
}
|
|
8324
8324
|
if (bgColorDrawn) {
|
|
8325
8325
|
outerWidth = width;
|
|
@@ -15150,14 +15150,14 @@ function millisecondsSetterName(isUTC) {
|
|
|
15150
15150
|
}
|
|
15151
15151
|
|
|
15152
15152
|
// src/legacy/getTextRect.ts
|
|
15153
|
-
function getTextRect(text, font, align, verticalAlign,
|
|
15153
|
+
function getTextRect(text, font, align, verticalAlign, padding2, rich, truncate, lineHeight) {
|
|
15154
15154
|
const textEl = new Text_default({
|
|
15155
15155
|
style: {
|
|
15156
15156
|
text,
|
|
15157
15157
|
font,
|
|
15158
15158
|
align,
|
|
15159
15159
|
verticalAlign,
|
|
15160
|
-
padding,
|
|
15160
|
+
padding: padding2,
|
|
15161
15161
|
rich,
|
|
15162
15162
|
overflow: truncate ? "truncate" : null,
|
|
15163
15163
|
lineHeight
|
|
@@ -16125,6 +16125,7 @@ var BUILTIN_CHARTS_MAP = {
|
|
|
16125
16125
|
effectScatter: "EffectScatterChart",
|
|
16126
16126
|
lines: "LinesChart",
|
|
16127
16127
|
linesPlot: "LinesPlotChart",
|
|
16128
|
+
labels: "LabelsChart",
|
|
16128
16129
|
hlines: "HLinesChart",
|
|
16129
16130
|
bgcolor: "BgColorChart",
|
|
16130
16131
|
heatmap: "HeatmapChart",
|
|
@@ -19717,8 +19718,8 @@ function retrieveVisualColorForTooltipMarker(series, dataIndex) {
|
|
|
19717
19718
|
return convertToColorString(color2);
|
|
19718
19719
|
}
|
|
19719
19720
|
function getPaddingFromTooltipModel(model, renderMode) {
|
|
19720
|
-
const
|
|
19721
|
-
return
|
|
19721
|
+
const padding2 = model.get("padding");
|
|
19722
|
+
return padding2 != null ? padding2 : renderMode === "richText" ? [8, 10] : 10;
|
|
19722
19723
|
}
|
|
19723
19724
|
var TooltipMarkupStyleCreator = class {
|
|
19724
19725
|
constructor() {
|
|
@@ -21677,6 +21678,378 @@ var Cross = Path_default.extend({
|
|
|
21677
21678
|
ctx.closePath();
|
|
21678
21679
|
}
|
|
21679
21680
|
});
|
|
21681
|
+
var LabelDown = Path_default.extend({
|
|
21682
|
+
type: "labelDown",
|
|
21683
|
+
shape: {
|
|
21684
|
+
x: 0,
|
|
21685
|
+
y: 0,
|
|
21686
|
+
width: 0,
|
|
21687
|
+
height: 0,
|
|
21688
|
+
r: 0
|
|
21689
|
+
},
|
|
21690
|
+
buildPath: function(ctx, shape) {
|
|
21691
|
+
const {x, y, width, height, r} = shape;
|
|
21692
|
+
const triangleHeight = 6;
|
|
21693
|
+
const triangleWidth = 6;
|
|
21694
|
+
ctx.moveTo(x + r, y);
|
|
21695
|
+
ctx.lineTo(x + width - r, y);
|
|
21696
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21697
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21698
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21699
|
+
ctx.lineTo(x + width / 2 + triangleWidth, y + height);
|
|
21700
|
+
ctx.lineTo(x + width / 2, y + height + triangleHeight);
|
|
21701
|
+
ctx.lineTo(x + width / 2 - triangleWidth, y + height);
|
|
21702
|
+
ctx.lineTo(x + r, y + height);
|
|
21703
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21704
|
+
ctx.lineTo(x, y + r);
|
|
21705
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21706
|
+
}
|
|
21707
|
+
});
|
|
21708
|
+
var LabelUp = Path_default.extend({
|
|
21709
|
+
type: "labelUp",
|
|
21710
|
+
shape: {
|
|
21711
|
+
x: 0,
|
|
21712
|
+
y: 0,
|
|
21713
|
+
width: 0,
|
|
21714
|
+
height: 0,
|
|
21715
|
+
r: 0
|
|
21716
|
+
},
|
|
21717
|
+
buildPath: function(ctx, shape) {
|
|
21718
|
+
const {x, y, width, height, r} = shape;
|
|
21719
|
+
const triangleHeight = 6;
|
|
21720
|
+
const triangleWidth = 6;
|
|
21721
|
+
ctx.moveTo(x + r, y);
|
|
21722
|
+
ctx.lineTo(x + width / 2 - triangleWidth, y);
|
|
21723
|
+
ctx.lineTo(x + width / 2, y - triangleHeight);
|
|
21724
|
+
ctx.lineTo(x + width / 2 + triangleWidth, y);
|
|
21725
|
+
ctx.lineTo(x + width - r, y);
|
|
21726
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21727
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21728
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21729
|
+
ctx.lineTo(x + r, y + height);
|
|
21730
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21731
|
+
ctx.lineTo(x, y + r);
|
|
21732
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21733
|
+
}
|
|
21734
|
+
});
|
|
21735
|
+
var LabelLeft = Path_default.extend({
|
|
21736
|
+
type: "labelLeft",
|
|
21737
|
+
shape: {
|
|
21738
|
+
x: 0,
|
|
21739
|
+
y: 0,
|
|
21740
|
+
width: 0,
|
|
21741
|
+
height: 0,
|
|
21742
|
+
r: 0
|
|
21743
|
+
},
|
|
21744
|
+
buildPath: function(ctx, shape) {
|
|
21745
|
+
const {x, y, width, height, r} = shape;
|
|
21746
|
+
const triangleHeight = 6;
|
|
21747
|
+
const triangleWidth = 6;
|
|
21748
|
+
ctx.moveTo(x + r, y);
|
|
21749
|
+
ctx.lineTo(x + width - r, y);
|
|
21750
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21751
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21752
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21753
|
+
ctx.lineTo(x + r, y + height);
|
|
21754
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21755
|
+
ctx.lineTo(x, y + height / 2 + triangleWidth);
|
|
21756
|
+
ctx.lineTo(x - triangleHeight, y + height / 2);
|
|
21757
|
+
ctx.lineTo(x, y + height / 2 - triangleWidth);
|
|
21758
|
+
ctx.lineTo(x, y + r);
|
|
21759
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21760
|
+
}
|
|
21761
|
+
});
|
|
21762
|
+
var LabelRight = Path_default.extend({
|
|
21763
|
+
type: "labelRight",
|
|
21764
|
+
shape: {
|
|
21765
|
+
x: 0,
|
|
21766
|
+
y: 0,
|
|
21767
|
+
width: 0,
|
|
21768
|
+
height: 0,
|
|
21769
|
+
r: 0
|
|
21770
|
+
},
|
|
21771
|
+
buildPath: function(ctx, shape) {
|
|
21772
|
+
const {x, y, width, height, r} = shape;
|
|
21773
|
+
const triangleHeight = 6;
|
|
21774
|
+
const triangleWidth = 6;
|
|
21775
|
+
ctx.moveTo(x + r, y);
|
|
21776
|
+
ctx.lineTo(x + width - r, y);
|
|
21777
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21778
|
+
ctx.lineTo(x + width, y + height / 2 - triangleWidth);
|
|
21779
|
+
ctx.lineTo(x + width + triangleHeight, y + height / 2);
|
|
21780
|
+
ctx.lineTo(x + width, y + height / 2 + triangleWidth);
|
|
21781
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21782
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21783
|
+
ctx.lineTo(x + r, y + height);
|
|
21784
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21785
|
+
ctx.lineTo(x, y + r);
|
|
21786
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21787
|
+
}
|
|
21788
|
+
});
|
|
21789
|
+
var LabelLowerLeft = Path_default.extend({
|
|
21790
|
+
type: "labelLowerLeft",
|
|
21791
|
+
shape: {
|
|
21792
|
+
x: 0,
|
|
21793
|
+
y: 0,
|
|
21794
|
+
width: 0,
|
|
21795
|
+
height: 0,
|
|
21796
|
+
r: 0,
|
|
21797
|
+
offsetY: 0,
|
|
21798
|
+
offsetX: 0,
|
|
21799
|
+
offsetWidth: 0
|
|
21800
|
+
},
|
|
21801
|
+
buildPath: function(ctx, shape) {
|
|
21802
|
+
const height = shape.height;
|
|
21803
|
+
const width = shape.width;
|
|
21804
|
+
const x = shape.x;
|
|
21805
|
+
const y = shape.y;
|
|
21806
|
+
const r = shape.r;
|
|
21807
|
+
const offsetY = shape.offsetY;
|
|
21808
|
+
const offsetX = shape.offsetX;
|
|
21809
|
+
const offsetWidth = shape.offsetWidth;
|
|
21810
|
+
ctx.moveTo(x + r, y);
|
|
21811
|
+
ctx.lineTo(x + width - r, y);
|
|
21812
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21813
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21814
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21815
|
+
ctx.lineTo(x + r, y + height);
|
|
21816
|
+
ctx.lineTo(x - offsetWidth, y + height + offsetY);
|
|
21817
|
+
ctx.lineTo(x, y + height - offsetX);
|
|
21818
|
+
ctx.lineTo(x, y + r);
|
|
21819
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21820
|
+
}
|
|
21821
|
+
});
|
|
21822
|
+
var LabelLowerRight = Path_default.extend({
|
|
21823
|
+
type: "labelLowerRight",
|
|
21824
|
+
shape: {
|
|
21825
|
+
x: 0,
|
|
21826
|
+
y: 0,
|
|
21827
|
+
width: 0,
|
|
21828
|
+
height: 0,
|
|
21829
|
+
r: 0,
|
|
21830
|
+
offsetY: 0,
|
|
21831
|
+
offsetX: 0,
|
|
21832
|
+
offsetWidth: 0
|
|
21833
|
+
},
|
|
21834
|
+
buildPath: function(ctx, shape) {
|
|
21835
|
+
const offsetY = shape.offsetY;
|
|
21836
|
+
const offsetX = shape.offsetX;
|
|
21837
|
+
const offsetWidth = shape.offsetWidth;
|
|
21838
|
+
const height = shape.height;
|
|
21839
|
+
const width = shape.width;
|
|
21840
|
+
const x = shape.x;
|
|
21841
|
+
const y = shape.y;
|
|
21842
|
+
const r = shape.r;
|
|
21843
|
+
ctx.moveTo(x + r, y);
|
|
21844
|
+
ctx.lineTo(x + width - r, y);
|
|
21845
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21846
|
+
ctx.lineTo(x + width, y + height - offsetWidth);
|
|
21847
|
+
ctx.lineTo(x + width + offsetX, y + height + offsetY);
|
|
21848
|
+
ctx.lineTo(x + width - r, y + height);
|
|
21849
|
+
ctx.lineTo(x + r, y + height);
|
|
21850
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21851
|
+
ctx.lineTo(x, y + r);
|
|
21852
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21853
|
+
}
|
|
21854
|
+
});
|
|
21855
|
+
var LabelUpperLeft = Path_default.extend({
|
|
21856
|
+
type: "labelUpperLeft",
|
|
21857
|
+
shape: {
|
|
21858
|
+
x: 0,
|
|
21859
|
+
y: 0,
|
|
21860
|
+
width: 0,
|
|
21861
|
+
height: 0,
|
|
21862
|
+
r: 0,
|
|
21863
|
+
offsetY: 0,
|
|
21864
|
+
offsetX: 0,
|
|
21865
|
+
offsetWidth: 0
|
|
21866
|
+
},
|
|
21867
|
+
buildPath: function(ctx, shape) {
|
|
21868
|
+
const height = shape.height;
|
|
21869
|
+
const width = shape.width;
|
|
21870
|
+
const x = shape.x;
|
|
21871
|
+
const y = shape.y;
|
|
21872
|
+
const r = shape.r;
|
|
21873
|
+
const offsetY = shape.offsetY;
|
|
21874
|
+
const offsetX = shape.offsetX;
|
|
21875
|
+
const offsetWidth = shape.offsetWidth;
|
|
21876
|
+
ctx.moveTo(x + r, y);
|
|
21877
|
+
ctx.lineTo(x + width - r, y);
|
|
21878
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21879
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21880
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21881
|
+
ctx.lineTo(x + r, y + height);
|
|
21882
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21883
|
+
ctx.lineTo(x, y + offsetWidth);
|
|
21884
|
+
ctx.lineTo(x - offsetX, y - offsetY);
|
|
21885
|
+
ctx.lineTo(x + r, y);
|
|
21886
|
+
}
|
|
21887
|
+
});
|
|
21888
|
+
var LabelUpperRight = Path_default.extend({
|
|
21889
|
+
type: "labelUpperRight",
|
|
21890
|
+
shape: {
|
|
21891
|
+
x: 0,
|
|
21892
|
+
y: 0,
|
|
21893
|
+
width: 0,
|
|
21894
|
+
height: 0,
|
|
21895
|
+
r: 0,
|
|
21896
|
+
offsetY: 0,
|
|
21897
|
+
offsetX: 0,
|
|
21898
|
+
offsetWidth: 0
|
|
21899
|
+
},
|
|
21900
|
+
buildPath: function(ctx, shape) {
|
|
21901
|
+
const height = shape.height;
|
|
21902
|
+
const width = shape.width;
|
|
21903
|
+
const x = shape.x;
|
|
21904
|
+
const y = shape.y;
|
|
21905
|
+
const r = shape.r;
|
|
21906
|
+
const offsetY = shape.offsetY;
|
|
21907
|
+
const offsetX = shape.offsetX;
|
|
21908
|
+
const offsetWidth = shape.offsetWidth;
|
|
21909
|
+
ctx.moveTo(x + r, y);
|
|
21910
|
+
ctx.lineTo(x + width - r, y);
|
|
21911
|
+
ctx.lineTo(x + width + offsetX, y - offsetY);
|
|
21912
|
+
ctx.lineTo(x + width, y + offsetWidth);
|
|
21913
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21914
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21915
|
+
ctx.lineTo(x + r, y + height);
|
|
21916
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21917
|
+
ctx.lineTo(x, y);
|
|
21918
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21919
|
+
}
|
|
21920
|
+
});
|
|
21921
|
+
var XCross = Path_default.extend({
|
|
21922
|
+
type: "xCross",
|
|
21923
|
+
shape: {
|
|
21924
|
+
x: 0,
|
|
21925
|
+
y: 0,
|
|
21926
|
+
width: 0,
|
|
21927
|
+
height: 0
|
|
21928
|
+
},
|
|
21929
|
+
buildPath: function(ctx, shape) {
|
|
21930
|
+
const {x, y} = shape;
|
|
21931
|
+
const width = shape.width / 2;
|
|
21932
|
+
const height = shape.height / 2;
|
|
21933
|
+
ctx.moveTo(x + width, y - height);
|
|
21934
|
+
ctx.lineTo(x - width, y + height);
|
|
21935
|
+
ctx.moveTo(x - width, y - height);
|
|
21936
|
+
ctx.lineTo(x + width, y + height);
|
|
21937
|
+
}
|
|
21938
|
+
});
|
|
21939
|
+
var LCross = Path_default.extend({
|
|
21940
|
+
type: "lCross",
|
|
21941
|
+
shape: {
|
|
21942
|
+
x: 0,
|
|
21943
|
+
y: 0,
|
|
21944
|
+
width: 0,
|
|
21945
|
+
height: 0
|
|
21946
|
+
},
|
|
21947
|
+
buildPath: function(ctx, shape) {
|
|
21948
|
+
const {x, y} = shape;
|
|
21949
|
+
const width = shape.width / 2;
|
|
21950
|
+
const height = shape.height / 2;
|
|
21951
|
+
ctx.moveTo(x, y - height);
|
|
21952
|
+
ctx.lineTo(x, y + height);
|
|
21953
|
+
ctx.moveTo(x - width, y);
|
|
21954
|
+
ctx.lineTo(x + width, y);
|
|
21955
|
+
}
|
|
21956
|
+
});
|
|
21957
|
+
var Flag = Path_default.extend({
|
|
21958
|
+
type: "flag",
|
|
21959
|
+
shape: {
|
|
21960
|
+
x: 0,
|
|
21961
|
+
y: 0,
|
|
21962
|
+
width: 0,
|
|
21963
|
+
height: 0
|
|
21964
|
+
},
|
|
21965
|
+
buildPath: function(ctx, shape) {
|
|
21966
|
+
const {x, y} = shape;
|
|
21967
|
+
const width = shape.width / 2;
|
|
21968
|
+
const height = shape.height / 2;
|
|
21969
|
+
const rectWidth = 0.2;
|
|
21970
|
+
const range = 0.4;
|
|
21971
|
+
const rangeHeight = 0.8;
|
|
21972
|
+
const startX = x - width + rectWidth;
|
|
21973
|
+
const endX = x + width;
|
|
21974
|
+
const topY = y - height;
|
|
21975
|
+
const bottomY = y + height;
|
|
21976
|
+
ctx.moveTo(x - width, topY);
|
|
21977
|
+
ctx.lineTo(startX, topY);
|
|
21978
|
+
ctx.bezierCurveTo(startX + 1 / 3 * shape.width, topY - range, startX + 2 / 3 * shape.width, topY + range, endX, topY);
|
|
21979
|
+
ctx.lineTo(endX, topY + rangeHeight);
|
|
21980
|
+
ctx.bezierCurveTo(startX + 2 / 3 * shape.width, topY + range + rangeHeight, startX + 1 / 3 * shape.width, topY - range + rangeHeight, startX, topY + rangeHeight);
|
|
21981
|
+
ctx.lineTo(startX, bottomY);
|
|
21982
|
+
ctx.lineTo(x - width, bottomY);
|
|
21983
|
+
ctx.lineTo(x - width, topY);
|
|
21984
|
+
}
|
|
21985
|
+
});
|
|
21986
|
+
var TriangleDown = Path_default.extend({
|
|
21987
|
+
type: "triangleDown",
|
|
21988
|
+
shape: {
|
|
21989
|
+
cx: 0,
|
|
21990
|
+
cy: 0,
|
|
21991
|
+
width: 0,
|
|
21992
|
+
height: 0
|
|
21993
|
+
},
|
|
21994
|
+
buildPath: function(path, shape) {
|
|
21995
|
+
const cx = shape.cx;
|
|
21996
|
+
const cy = shape.cy;
|
|
21997
|
+
const width = shape.width / 2;
|
|
21998
|
+
const height = shape.height / 2;
|
|
21999
|
+
path.moveTo(cx, cy + height);
|
|
22000
|
+
path.lineTo(cx + width, cy - height);
|
|
22001
|
+
path.lineTo(cx - width, cy - height);
|
|
22002
|
+
path.closePath();
|
|
22003
|
+
}
|
|
22004
|
+
});
|
|
22005
|
+
var ArrowUp = Path_default.extend({
|
|
22006
|
+
type: "arrowUp",
|
|
22007
|
+
shape: {
|
|
22008
|
+
cx: 0,
|
|
22009
|
+
cy: 0,
|
|
22010
|
+
width: 0,
|
|
22011
|
+
height: 0
|
|
22012
|
+
},
|
|
22013
|
+
buildPath: function(ctx, shape) {
|
|
22014
|
+
const {cx, cy} = shape;
|
|
22015
|
+
const rectWidth = 8;
|
|
22016
|
+
const width = shape.width / 2;
|
|
22017
|
+
const height = shape.height / 2;
|
|
22018
|
+
const triangleY = cy - 2;
|
|
22019
|
+
ctx.moveTo(cx, cy - height);
|
|
22020
|
+
ctx.lineTo(cx + width, triangleY);
|
|
22021
|
+
ctx.lineTo(cx + width - rectWidth, triangleY);
|
|
22022
|
+
ctx.lineTo(cx + width - rectWidth, cy + height);
|
|
22023
|
+
ctx.lineTo(cx - width + rectWidth, cy + height);
|
|
22024
|
+
ctx.lineTo(cx - width + rectWidth, triangleY);
|
|
22025
|
+
ctx.lineTo(cx - width, triangleY);
|
|
22026
|
+
ctx.closePath();
|
|
22027
|
+
}
|
|
22028
|
+
});
|
|
22029
|
+
var ArrowDown = Path_default.extend({
|
|
22030
|
+
type: "arrowDown",
|
|
22031
|
+
shape: {
|
|
22032
|
+
cx: 0,
|
|
22033
|
+
cy: 0,
|
|
22034
|
+
width: 0,
|
|
22035
|
+
height: 0
|
|
22036
|
+
},
|
|
22037
|
+
buildPath: function(ctx, shape) {
|
|
22038
|
+
const {cx, cy} = shape;
|
|
22039
|
+
const rectWidth = 8;
|
|
22040
|
+
const width = shape.width / 2;
|
|
22041
|
+
const height = shape.height / 2;
|
|
22042
|
+
const triangleY = cy + 2;
|
|
22043
|
+
ctx.moveTo(cx, cy + height);
|
|
22044
|
+
ctx.lineTo(cx + width, triangleY);
|
|
22045
|
+
ctx.lineTo(cx + width - rectWidth, triangleY);
|
|
22046
|
+
ctx.lineTo(cx + width - rectWidth, cy - height);
|
|
22047
|
+
ctx.lineTo(cx - width + rectWidth, cy - height);
|
|
22048
|
+
ctx.lineTo(cx - width + rectWidth, triangleY);
|
|
22049
|
+
ctx.lineTo(cx - width, triangleY);
|
|
22050
|
+
ctx.closePath();
|
|
22051
|
+
}
|
|
22052
|
+
});
|
|
21680
22053
|
var symbolCtors = {
|
|
21681
22054
|
line: Line_default,
|
|
21682
22055
|
rect: Rect_default,
|
|
@@ -21687,7 +22060,21 @@ var symbolCtors = {
|
|
|
21687
22060
|
pin: Pin,
|
|
21688
22061
|
arrow: Arrow,
|
|
21689
22062
|
triangle: Triangle,
|
|
21690
|
-
cross: Cross
|
|
22063
|
+
cross: Cross,
|
|
22064
|
+
labelDown: LabelDown,
|
|
22065
|
+
labelUp: LabelUp,
|
|
22066
|
+
labelLeft: LabelLeft,
|
|
22067
|
+
labelRight: LabelRight,
|
|
22068
|
+
labelLowerLeft: LabelLowerLeft,
|
|
22069
|
+
labelLowerRight: LabelLowerRight,
|
|
22070
|
+
labelUpperLeft: LabelUpperLeft,
|
|
22071
|
+
labelUpperRight: LabelUpperRight,
|
|
22072
|
+
xCross: XCross,
|
|
22073
|
+
lCross: LCross,
|
|
22074
|
+
arrowUp: ArrowUp,
|
|
22075
|
+
flag: Flag,
|
|
22076
|
+
triangleDown: TriangleDown,
|
|
22077
|
+
arrowDown: ArrowDown
|
|
21691
22078
|
};
|
|
21692
22079
|
var symbolShapeMakers = {
|
|
21693
22080
|
line: function(x, y, w, h, shape) {
|
|
@@ -21750,6 +22137,133 @@ var symbolShapeMakers = {
|
|
|
21750
22137
|
shape.y = y + h / 2;
|
|
21751
22138
|
shape.width = w;
|
|
21752
22139
|
shape.height = h;
|
|
22140
|
+
},
|
|
22141
|
+
labelDown: function(x, y, w, h, shape) {
|
|
22142
|
+
const triangleWidth = 6;
|
|
22143
|
+
const r = 2;
|
|
22144
|
+
const offset = 1;
|
|
22145
|
+
shape.x = x - w / 2 + offset;
|
|
22146
|
+
shape.y = y - h - triangleWidth;
|
|
22147
|
+
shape.width = w;
|
|
22148
|
+
shape.height = h;
|
|
22149
|
+
shape.r = r;
|
|
22150
|
+
},
|
|
22151
|
+
labelUp: function(x, y, w, h, shape) {
|
|
22152
|
+
const triangleWidth = 6;
|
|
22153
|
+
const r = 2;
|
|
22154
|
+
const offset = 1;
|
|
22155
|
+
shape.x = x - w / 2 + offset;
|
|
22156
|
+
shape.y = y - h;
|
|
22157
|
+
shape.width = w;
|
|
22158
|
+
shape.height = h;
|
|
22159
|
+
shape.r = r;
|
|
22160
|
+
},
|
|
22161
|
+
labelLeft: function(x, y, w, h, shape) {
|
|
22162
|
+
const triangleWidth = 6;
|
|
22163
|
+
const r = 2;
|
|
22164
|
+
shape.x = x + triangleWidth;
|
|
22165
|
+
shape.y = y - h;
|
|
22166
|
+
shape.width = w;
|
|
22167
|
+
shape.height = h;
|
|
22168
|
+
shape.r = r;
|
|
22169
|
+
},
|
|
22170
|
+
labelRight: function(x, y, w, h, shape) {
|
|
22171
|
+
const triangleWidth = 6;
|
|
22172
|
+
const r = 2;
|
|
22173
|
+
shape.x = x - w - triangleWidth;
|
|
22174
|
+
shape.y = y - h;
|
|
22175
|
+
shape.width = w;
|
|
22176
|
+
shape.height = h;
|
|
22177
|
+
shape.r = r;
|
|
22178
|
+
},
|
|
22179
|
+
labelLowerLeft: function(x, y, w, h, shape) {
|
|
22180
|
+
const offsetY = 8;
|
|
22181
|
+
const offsetX = 8;
|
|
22182
|
+
const offsetWidth = 6;
|
|
22183
|
+
shape.x = x + offsetX;
|
|
22184
|
+
shape.y = y - h - offsetY;
|
|
22185
|
+
shape.width = w;
|
|
22186
|
+
shape.height = h;
|
|
22187
|
+
shape.r = 2;
|
|
22188
|
+
shape.offsetY = offsetY;
|
|
22189
|
+
shape.offsetX = offsetX;
|
|
22190
|
+
shape.offsetWidth = offsetWidth;
|
|
22191
|
+
},
|
|
22192
|
+
labelLowerRight: function(x, y, w, h, shape) {
|
|
22193
|
+
const offsetY = 8;
|
|
22194
|
+
const offsetX = 8;
|
|
22195
|
+
const offsetWidth = 6;
|
|
22196
|
+
shape.x = x - w - offsetX;
|
|
22197
|
+
shape.y = y - h - offsetY;
|
|
22198
|
+
shape.width = w;
|
|
22199
|
+
shape.height = h;
|
|
22200
|
+
shape.r = 2;
|
|
22201
|
+
shape.offsetY = offsetY;
|
|
22202
|
+
shape.offsetX = offsetX;
|
|
22203
|
+
shape.offsetWidth = offsetWidth;
|
|
22204
|
+
},
|
|
22205
|
+
labelUpperLeft: function(x, y, w, h, shape) {
|
|
22206
|
+
const offsetY = 8;
|
|
22207
|
+
const offsetX = 8;
|
|
22208
|
+
const offsetWidth = 6;
|
|
22209
|
+
shape.x = x + offsetX;
|
|
22210
|
+
shape.y = y - h - offsetY;
|
|
22211
|
+
shape.width = w;
|
|
22212
|
+
shape.height = h;
|
|
22213
|
+
shape.r = 2;
|
|
22214
|
+
shape.offsetY = offsetY;
|
|
22215
|
+
shape.offsetX = offsetX;
|
|
22216
|
+
shape.offsetWidth = offsetWidth;
|
|
22217
|
+
},
|
|
22218
|
+
labelUpperRight: function(x, y, w, h, shape) {
|
|
22219
|
+
const offsetY = 8;
|
|
22220
|
+
const offsetX = 8;
|
|
22221
|
+
const offsetWidth = 6;
|
|
22222
|
+
shape.x = x - w - offsetX;
|
|
22223
|
+
shape.y = y - h;
|
|
22224
|
+
shape.width = w;
|
|
22225
|
+
shape.height = h;
|
|
22226
|
+
shape.r = 2;
|
|
22227
|
+
shape.offsetY = offsetY;
|
|
22228
|
+
shape.offsetX = offsetX;
|
|
22229
|
+
shape.offsetWidth = offsetWidth;
|
|
22230
|
+
},
|
|
22231
|
+
xCross: function(x, y, w, h, shape) {
|
|
22232
|
+
shape.x = x + w / 2;
|
|
22233
|
+
;
|
|
22234
|
+
shape.y = y;
|
|
22235
|
+
shape.width = w;
|
|
22236
|
+
shape.height = h;
|
|
22237
|
+
},
|
|
22238
|
+
lCross: function(x, y, w, h, shape) {
|
|
22239
|
+
shape.x = x + w / 2;
|
|
22240
|
+
shape.y = y;
|
|
22241
|
+
shape.width = w;
|
|
22242
|
+
shape.height = h;
|
|
22243
|
+
},
|
|
22244
|
+
flag: function(x, y, w, h, shape) {
|
|
22245
|
+
shape.x = x + w / 2;
|
|
22246
|
+
shape.y = y;
|
|
22247
|
+
shape.width = w;
|
|
22248
|
+
shape.height = h;
|
|
22249
|
+
},
|
|
22250
|
+
triangleDown: function(x, y, w, h, shape) {
|
|
22251
|
+
shape.cx = x + w / 2;
|
|
22252
|
+
shape.cy = y + h / 2;
|
|
22253
|
+
shape.width = w;
|
|
22254
|
+
shape.height = h;
|
|
22255
|
+
},
|
|
22256
|
+
arrowUp: function(x, y, w, h, shape) {
|
|
22257
|
+
shape.cx = x;
|
|
22258
|
+
shape.cy = y - h / 2;
|
|
22259
|
+
shape.width = w;
|
|
22260
|
+
shape.height = h;
|
|
22261
|
+
},
|
|
22262
|
+
arrowDown: function(x, y, w, h, shape) {
|
|
22263
|
+
shape.cx = x;
|
|
22264
|
+
shape.cy = y - h / 2;
|
|
22265
|
+
shape.width = w;
|
|
22266
|
+
shape.height = h;
|
|
21753
22267
|
}
|
|
21754
22268
|
};
|
|
21755
22269
|
var symbolBuildProxies = {};
|
|
@@ -32768,6 +33282,7 @@ function getDefaultInterpolatedLabel(data, interpolatedValue) {
|
|
|
32768
33282
|
}
|
|
32769
33283
|
|
|
32770
33284
|
// src/chart/helper/Symbol.ts
|
|
33285
|
+
var variableTypes = ["labelDown", "labelUp", "labelLeft", "labelRight", "labelLowerLeft", "labelLowerRight", "labelUpperLeft", "labelUpperRight", "arrowUp", "arrowDown"];
|
|
32771
33286
|
var Symbol = class extends Group_default {
|
|
32772
33287
|
constructor(data, idx, seriesScope, opts) {
|
|
32773
33288
|
super();
|
|
@@ -32775,15 +33290,28 @@ var Symbol = class extends Group_default {
|
|
|
32775
33290
|
}
|
|
32776
33291
|
_createSymbol(symbolType, data, idx, symbolSize, keepAspect) {
|
|
32777
33292
|
this.removeAll();
|
|
33293
|
+
const isVariable = variableTypes.includes(symbolType);
|
|
32778
33294
|
const symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);
|
|
32779
|
-
|
|
32780
|
-
|
|
32781
|
-
|
|
32782
|
-
|
|
32783
|
-
|
|
32784
|
-
|
|
33295
|
+
if (isVariable) {
|
|
33296
|
+
symbolPath.attr({
|
|
33297
|
+
z2: 100,
|
|
33298
|
+
culling: true,
|
|
33299
|
+
shape: {
|
|
33300
|
+
width: symbolSize[0],
|
|
33301
|
+
height: symbolSize[1]
|
|
33302
|
+
}
|
|
33303
|
+
});
|
|
33304
|
+
} else {
|
|
33305
|
+
symbolPath.attr({
|
|
33306
|
+
z2: 100,
|
|
33307
|
+
culling: true,
|
|
33308
|
+
scaleX: symbolSize[0] / 2,
|
|
33309
|
+
scaleY: symbolSize[1] / 2
|
|
33310
|
+
});
|
|
33311
|
+
}
|
|
32785
33312
|
symbolPath.drift = driftSymbol;
|
|
32786
33313
|
this._symbolType = symbolType;
|
|
33314
|
+
this._isVariable = isVariable;
|
|
32787
33315
|
this.add(symbolPath);
|
|
32788
33316
|
}
|
|
32789
33317
|
stopSymbolAnimation(toLastFrame) {
|
|
@@ -32824,10 +33352,18 @@ var Symbol = class extends Group_default {
|
|
|
32824
33352
|
} else {
|
|
32825
33353
|
const symbolPath = this.childAt(0);
|
|
32826
33354
|
symbolPath.silent = false;
|
|
32827
|
-
|
|
33355
|
+
let target = {
|
|
32828
33356
|
scaleX: symbolSize[0] / 2,
|
|
32829
33357
|
scaleY: symbolSize[1] / 2
|
|
32830
33358
|
};
|
|
33359
|
+
if (this._isVariable) {
|
|
33360
|
+
target = {
|
|
33361
|
+
shape: {
|
|
33362
|
+
width: symbolSize[0],
|
|
33363
|
+
height: symbolSize[1]
|
|
33364
|
+
}
|
|
33365
|
+
};
|
|
33366
|
+
}
|
|
32831
33367
|
disableAnimation ? symbolPath.attr(target) : updateProps(symbolPath, target, seriesModel, idx);
|
|
32832
33368
|
saveOldStyle(symbolPath);
|
|
32833
33369
|
}
|
|
@@ -32835,15 +33371,28 @@ var Symbol = class extends Group_default {
|
|
|
32835
33371
|
if (isInit) {
|
|
32836
33372
|
const symbolPath = this.childAt(0);
|
|
32837
33373
|
if (!disableAnimation) {
|
|
32838
|
-
|
|
33374
|
+
let target = {
|
|
32839
33375
|
scaleX: this._sizeX,
|
|
32840
33376
|
scaleY: this._sizeY,
|
|
32841
33377
|
style: {
|
|
32842
33378
|
opacity: symbolPath.style.opacity
|
|
32843
33379
|
}
|
|
32844
33380
|
};
|
|
32845
|
-
|
|
32846
|
-
|
|
33381
|
+
if (this._isVariable) {
|
|
33382
|
+
target = {
|
|
33383
|
+
shape: {
|
|
33384
|
+
width: this._sizeX * 2,
|
|
33385
|
+
height: this._sizeY * 2
|
|
33386
|
+
},
|
|
33387
|
+
style: {
|
|
33388
|
+
opacity: symbolPath.style.opacity
|
|
33389
|
+
}
|
|
33390
|
+
};
|
|
33391
|
+
symbolPath.style.opacity = 0;
|
|
33392
|
+
} else {
|
|
33393
|
+
symbolPath.scaleX = symbolPath.scaleY = 0;
|
|
33394
|
+
symbolPath.style.opacity = 0;
|
|
33395
|
+
}
|
|
32847
33396
|
initProps(symbolPath, target, seriesModel, idx);
|
|
32848
33397
|
}
|
|
32849
33398
|
}
|
|
@@ -32945,8 +33494,13 @@ var Symbol = class extends Group_default {
|
|
|
32945
33494
|
symbolPath.ensureState("select").style = selectItemStyle;
|
|
32946
33495
|
symbolPath.ensureState("blur").style = blurItemStyle;
|
|
32947
33496
|
const scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY) : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;
|
|
32948
|
-
|
|
32949
|
-
|
|
33497
|
+
if (this._isVariable) {
|
|
33498
|
+
emphasisState.scaleX = scaleRatio;
|
|
33499
|
+
emphasisState.scaleY = scaleRatio;
|
|
33500
|
+
} else {
|
|
33501
|
+
emphasisState.scaleX = this._sizeX * scaleRatio;
|
|
33502
|
+
emphasisState.scaleY = this._sizeY * scaleRatio;
|
|
33503
|
+
}
|
|
32950
33504
|
this.setSymbolScale(1);
|
|
32951
33505
|
toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);
|
|
32952
33506
|
}
|
|
@@ -33032,7 +33586,7 @@ var SymbolDraw = class {
|
|
|
33032
33586
|
const SymbolCtor = this._SymbolCtor;
|
|
33033
33587
|
const disableAnimation = opt.disableAnimation;
|
|
33034
33588
|
const seriesScope = makeSeriesScope(data);
|
|
33035
|
-
const symbolUpdateOpt = {disableAnimation};
|
|
33589
|
+
const symbolUpdateOpt = {disableAnimation, useNameLabel: opt.useNameLabel};
|
|
33036
33590
|
const getSymbolPoint = opt.getSymbolPoint || function(idx) {
|
|
33037
33591
|
return data.getItemLayout(idx);
|
|
33038
33592
|
};
|
|
@@ -36202,8 +36756,8 @@ function avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLef
|
|
|
36202
36756
|
const label = layout18.label;
|
|
36203
36757
|
const linePoints = layout18.linePoints;
|
|
36204
36758
|
const isAlignToEdge = layout18.labelAlignTo === "edge";
|
|
36205
|
-
const
|
|
36206
|
-
const paddingH =
|
|
36759
|
+
const padding2 = label.style.padding;
|
|
36760
|
+
const paddingH = padding2 ? padding2[1] + padding2[3] : 0;
|
|
36207
36761
|
const extraPaddingH = label.style.backgroundColor ? 0 : paddingH;
|
|
36208
36762
|
const realTextWidth = layout18.rect.width + extraPaddingH;
|
|
36209
36763
|
const dist3 = linePoints[1][0] - linePoints[2][0];
|
|
@@ -36233,8 +36787,8 @@ function constrainTextWidth(layout18, availableWidth, forceRecalculate = false)
|
|
|
36233
36787
|
const style = label.style;
|
|
36234
36788
|
const textRect = layout18.rect;
|
|
36235
36789
|
const bgColor = style.backgroundColor;
|
|
36236
|
-
const
|
|
36237
|
-
const paddingH =
|
|
36790
|
+
const padding2 = style.padding;
|
|
36791
|
+
const paddingH = padding2 ? padding2[1] + padding2[3] : 0;
|
|
36238
36792
|
const overflow = style.overflow;
|
|
36239
36793
|
const oldOuterWidth = textRect.width + (bgColor ? 0 : paddingH);
|
|
36240
36794
|
if (availableWidth < oldOuterWidth || forceRecalculate) {
|
|
@@ -37129,7 +37683,8 @@ var ScatterView2 = class extends Chart_default {
|
|
|
37129
37683
|
const data = seriesModel.getData();
|
|
37130
37684
|
const symbolDraw = this._updateSymbolDraw(data, seriesModel);
|
|
37131
37685
|
symbolDraw.updateData(data, {
|
|
37132
|
-
clipShape: this._getClipShape(seriesModel)
|
|
37686
|
+
clipShape: this._getClipShape(seriesModel),
|
|
37687
|
+
useNameLabel: true
|
|
37133
37688
|
});
|
|
37134
37689
|
this._finished = true;
|
|
37135
37690
|
}
|
|
@@ -54264,8 +54819,6 @@ LinesPlotView.type = "linesPlot";
|
|
|
54264
54819
|
var LinesPlotView_default = LinesPlotView;
|
|
54265
54820
|
|
|
54266
54821
|
// src/chart/linesPlot/LinesPlotSeries.ts
|
|
54267
|
-
var Uint32Arr2 = typeof Uint32Array === "undefined" ? Array : Uint32Array;
|
|
54268
|
-
var Float64Arr2 = typeof Float64Array === "undefined" ? Array : Float64Array;
|
|
54269
54822
|
var LinesPlotSeriesModel2 = class extends Series_default {
|
|
54270
54823
|
constructor() {
|
|
54271
54824
|
super(...arguments);
|
|
@@ -54300,8 +54853,6 @@ LinesPlotSeriesModel.defaultOption = {
|
|
|
54300
54853
|
yAxisIndex: 0,
|
|
54301
54854
|
symbol: "emptyCircle",
|
|
54302
54855
|
symbolSize: 10,
|
|
54303
|
-
showSymbol: true,
|
|
54304
|
-
showAllSymbol: "auto",
|
|
54305
54856
|
geoIndex: 0,
|
|
54306
54857
|
large: true,
|
|
54307
54858
|
largeThreshold: 600,
|
|
@@ -54330,11 +54881,9 @@ var linesPlotLayout = {
|
|
|
54330
54881
|
}
|
|
54331
54882
|
const data = seriesModel.getData();
|
|
54332
54883
|
const pipelineContext = seriesModel.pipelineContext;
|
|
54333
|
-
const useTypedArray = pipelineContext.large;
|
|
54334
54884
|
const dims = map(coordSys.dimensions, function(dim) {
|
|
54335
54885
|
return data.mapDimension(dim);
|
|
54336
54886
|
}).slice(0, 2);
|
|
54337
|
-
const dimLen = dims.length;
|
|
54338
54887
|
const store = data.getStore();
|
|
54339
54888
|
const dimIdx0 = data.getDimensionIndex(dims[0]);
|
|
54340
54889
|
const dimIdx1 = data.getDimensionIndex(dims[1]);
|
|
@@ -54343,6 +54892,9 @@ var linesPlotLayout = {
|
|
|
54343
54892
|
const isSingle = seriesModel.get("histogramVisible") || seriesModel.get("barVisible");
|
|
54344
54893
|
const symbolByStep = seriesModel.get("symbolByStep");
|
|
54345
54894
|
const xOffset = seriesModel.get("offset") || 0;
|
|
54895
|
+
const symbolVisible = seriesModel.get("symbolVisible");
|
|
54896
|
+
const symbolSize = seriesModel.get("symbolSize");
|
|
54897
|
+
const globalSymbol = seriesModel.get("symbol");
|
|
54346
54898
|
return {
|
|
54347
54899
|
progress(params, lineData) {
|
|
54348
54900
|
const segCount = params.end - params.start;
|
|
@@ -54391,7 +54943,11 @@ var linesPlotLayout = {
|
|
|
54391
54943
|
nextPoint[0] = midX;
|
|
54392
54944
|
}
|
|
54393
54945
|
const itemModel = lineData.getItemModel(isSingle ? i : i + 1);
|
|
54394
|
-
const {
|
|
54946
|
+
const {
|
|
54947
|
+
color: color2 = defaultColor,
|
|
54948
|
+
type = "solid",
|
|
54949
|
+
width = "1"
|
|
54950
|
+
} = itemModel.get("lineStyle");
|
|
54395
54951
|
const key = `${color2}_${type}_${width}`;
|
|
54396
54952
|
const points4 = linePointsByKey[key] || [];
|
|
54397
54953
|
if (!isSingle && lastKey !== key) {
|
|
@@ -54402,21 +54958,18 @@ var linesPlotLayout = {
|
|
|
54402
54958
|
points4.push(0);
|
|
54403
54959
|
}
|
|
54404
54960
|
points4.push(point);
|
|
54405
|
-
allLinePoints.push(point);
|
|
54406
54961
|
if (isStep) {
|
|
54407
54962
|
points4.push(nextPoint);
|
|
54408
54963
|
if (symbolByStep) {
|
|
54409
54964
|
symbolPoints[offset++] = nextPoint[0];
|
|
54410
54965
|
symbolPoints[offset++] = nextPoint[1];
|
|
54411
54966
|
}
|
|
54412
|
-
allLinePoints.push(nextPoint);
|
|
54413
54967
|
}
|
|
54414
54968
|
linePointsByKey[key] = points4;
|
|
54415
54969
|
lastKey = key;
|
|
54416
54970
|
}
|
|
54417
54971
|
lineData.setLayout({
|
|
54418
54972
|
linePointsByKey,
|
|
54419
|
-
allLinePoints,
|
|
54420
54973
|
points: symbolPoints
|
|
54421
54974
|
});
|
|
54422
54975
|
}
|
|
@@ -54432,6 +54985,203 @@ function install24(registers) {
|
|
|
54432
54985
|
registers.registerLayout(linesPlotLayout_default);
|
|
54433
54986
|
}
|
|
54434
54987
|
|
|
54988
|
+
// src/chart/labels/LabelsSeries.ts
|
|
54989
|
+
var LabelsSeriesModel2 = class extends Series_default {
|
|
54990
|
+
constructor() {
|
|
54991
|
+
super(...arguments);
|
|
54992
|
+
this.type = LabelsSeriesModel2.type;
|
|
54993
|
+
}
|
|
54994
|
+
getInitialData(option, ecModel) {
|
|
54995
|
+
return createSeriesData_default(null, this, {
|
|
54996
|
+
useEncodeDefaulter: true
|
|
54997
|
+
});
|
|
54998
|
+
}
|
|
54999
|
+
getProgressive() {
|
|
55000
|
+
const progressive = this.option.progressive;
|
|
55001
|
+
if (progressive == null) {
|
|
55002
|
+
return this.option.large ? 5e3 : this.get("progressive");
|
|
55003
|
+
}
|
|
55004
|
+
return progressive;
|
|
55005
|
+
}
|
|
55006
|
+
getProgressiveThreshold() {
|
|
55007
|
+
const progressiveThreshold = this.option.progressiveThreshold;
|
|
55008
|
+
if (progressiveThreshold == null) {
|
|
55009
|
+
return this.option.large ? 1e4 : this.get("progressiveThreshold");
|
|
55010
|
+
}
|
|
55011
|
+
return progressiveThreshold;
|
|
55012
|
+
}
|
|
55013
|
+
brushSelector(dataIndex, data, selectors) {
|
|
55014
|
+
return selectors.point(data.getItemLayout(dataIndex));
|
|
55015
|
+
}
|
|
55016
|
+
getZLevelKey() {
|
|
55017
|
+
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
|
|
55018
|
+
}
|
|
55019
|
+
};
|
|
55020
|
+
var LabelsSeriesModel = LabelsSeriesModel2;
|
|
55021
|
+
LabelsSeriesModel.type = "series.labels";
|
|
55022
|
+
LabelsSeriesModel.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"];
|
|
55023
|
+
LabelsSeriesModel.defaultOption = {
|
|
55024
|
+
coordinateSystem: "cartesian2d",
|
|
55025
|
+
z: 2,
|
|
55026
|
+
legendHoverLink: true,
|
|
55027
|
+
symbolSize: 10,
|
|
55028
|
+
large: false,
|
|
55029
|
+
largeThreshold: 2e3,
|
|
55030
|
+
itemStyle: {},
|
|
55031
|
+
clip: true
|
|
55032
|
+
};
|
|
55033
|
+
var LabelsSeries_default = LabelsSeriesModel;
|
|
55034
|
+
|
|
55035
|
+
// src/chart/labels/LabelsView.ts
|
|
55036
|
+
var ScatterView4 = class extends Chart_default {
|
|
55037
|
+
constructor() {
|
|
55038
|
+
super(...arguments);
|
|
55039
|
+
this.type = ScatterView4.type;
|
|
55040
|
+
}
|
|
55041
|
+
render(seriesModel, ecModel, api2) {
|
|
55042
|
+
const data = seriesModel.getData();
|
|
55043
|
+
const symbolDraw = this._updateSymbolDraw(data, seriesModel);
|
|
55044
|
+
symbolDraw.updateData(data, {
|
|
55045
|
+
clipShape: this._getClipShape(seriesModel)
|
|
55046
|
+
});
|
|
55047
|
+
this._finished = true;
|
|
55048
|
+
}
|
|
55049
|
+
incrementalPrepareRender(seriesModel, ecModel, api2) {
|
|
55050
|
+
const data = seriesModel.getData();
|
|
55051
|
+
const symbolDraw = this._updateSymbolDraw(data, seriesModel);
|
|
55052
|
+
symbolDraw.incrementalPrepareUpdate(data);
|
|
55053
|
+
this._finished = false;
|
|
55054
|
+
}
|
|
55055
|
+
incrementalRender(taskParams, seriesModel, ecModel) {
|
|
55056
|
+
this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {
|
|
55057
|
+
clipShape: this._getClipShape(seriesModel)
|
|
55058
|
+
});
|
|
55059
|
+
this._finished = taskParams.end === seriesModel.getData().count();
|
|
55060
|
+
}
|
|
55061
|
+
updateTransform(seriesModel, ecModel, api2) {
|
|
55062
|
+
const data = seriesModel.getData();
|
|
55063
|
+
this.group.dirty();
|
|
55064
|
+
if (!this._finished || data.count() > 1e4) {
|
|
55065
|
+
return {
|
|
55066
|
+
update: true
|
|
55067
|
+
};
|
|
55068
|
+
} else {
|
|
55069
|
+
const res = pointsLayout("").reset(seriesModel, ecModel, api2);
|
|
55070
|
+
if (res.progress) {
|
|
55071
|
+
res.progress({start: 0, end: data.count(), count: data.count()}, data);
|
|
55072
|
+
}
|
|
55073
|
+
this._symbolDraw.updateLayout(data);
|
|
55074
|
+
}
|
|
55075
|
+
}
|
|
55076
|
+
eachRendered(cb) {
|
|
55077
|
+
this._symbolDraw && this._symbolDraw.eachRendered(cb);
|
|
55078
|
+
}
|
|
55079
|
+
_getClipShape(seriesModel) {
|
|
55080
|
+
if (!seriesModel.get("clip", true)) {
|
|
55081
|
+
return;
|
|
55082
|
+
}
|
|
55083
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
55084
|
+
return coordSys && coordSys.getArea && coordSys.getArea(0.1);
|
|
55085
|
+
}
|
|
55086
|
+
_updateSymbolDraw(data, seriesModel) {
|
|
55087
|
+
let symbolDraw = this._symbolDraw;
|
|
55088
|
+
const pipelineContext = seriesModel.pipelineContext;
|
|
55089
|
+
const isLargeDraw = pipelineContext.large;
|
|
55090
|
+
if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {
|
|
55091
|
+
symbolDraw && symbolDraw.remove();
|
|
55092
|
+
symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw_default() : new SymbolDraw_default();
|
|
55093
|
+
this._isLargeDraw = isLargeDraw;
|
|
55094
|
+
this.group.removeAll();
|
|
55095
|
+
}
|
|
55096
|
+
this.group.add(symbolDraw.group);
|
|
55097
|
+
return symbolDraw;
|
|
55098
|
+
}
|
|
55099
|
+
remove(ecModel, api2) {
|
|
55100
|
+
this._symbolDraw && this._symbolDraw.remove(true);
|
|
55101
|
+
this._symbolDraw = null;
|
|
55102
|
+
}
|
|
55103
|
+
dispose() {
|
|
55104
|
+
}
|
|
55105
|
+
};
|
|
55106
|
+
var ScatterView3 = ScatterView4;
|
|
55107
|
+
ScatterView3.type = "labels";
|
|
55108
|
+
var LabelsView_default = ScatterView3;
|
|
55109
|
+
|
|
55110
|
+
// src/chart/labels/labelsVisual.ts
|
|
55111
|
+
var SYMBOL_PROPS_WITH_CB2 = [
|
|
55112
|
+
"symbol",
|
|
55113
|
+
"symbolSize",
|
|
55114
|
+
"symbolRotate",
|
|
55115
|
+
"symbolOffset"
|
|
55116
|
+
];
|
|
55117
|
+
var SYMBOL_PROPS2 = SYMBOL_PROPS_WITH_CB2.concat([
|
|
55118
|
+
"symbolKeepAspect"
|
|
55119
|
+
]);
|
|
55120
|
+
var labelSymbols = ["labelDown", "labelUp", "labelLeft", "labelRight", "labelLowerLeft", "labelLowerRight", "labelUpperLeft", "labelUpperRight"];
|
|
55121
|
+
var lineSymbols = ["xCross", "lCross"];
|
|
55122
|
+
var padding = 10;
|
|
55123
|
+
var LabelsLayout = {
|
|
55124
|
+
createOnAllSeries: true,
|
|
55125
|
+
performRawSeries: true,
|
|
55126
|
+
reset: function(seriesModel) {
|
|
55127
|
+
const data = seriesModel.getData();
|
|
55128
|
+
const symbolOptions = {};
|
|
55129
|
+
for (let i = 0; i < SYMBOL_PROPS_WITH_CB2.length; i++) {
|
|
55130
|
+
const symbolPropName = SYMBOL_PROPS_WITH_CB2[i];
|
|
55131
|
+
const val = seriesModel.get(symbolPropName);
|
|
55132
|
+
symbolOptions[symbolPropName] = val;
|
|
55133
|
+
}
|
|
55134
|
+
symbolOptions.symbol = symbolOptions.symbol || seriesModel.defaultSymbol;
|
|
55135
|
+
data.setVisual(extend({
|
|
55136
|
+
symbolKeepAspect: seriesModel.get("symbolKeepAspect")
|
|
55137
|
+
}, symbolOptions));
|
|
55138
|
+
function dataEach(data2, idx) {
|
|
55139
|
+
const itemModel = data2.getItemModel(idx);
|
|
55140
|
+
let symbol = itemModel.getShallow("symbol");
|
|
55141
|
+
let symbolSize = itemModel.getShallow("symbolSize");
|
|
55142
|
+
let symbolRotate = itemModel.getShallow("symbolRotate");
|
|
55143
|
+
let symbolOffset = itemModel.getShallow("symbolOffset");
|
|
55144
|
+
const symbolKeepAspect = itemModel.getShallow("symbolKeepAspect");
|
|
55145
|
+
const style = itemModel.getModel("itemStyle").getItemStyle();
|
|
55146
|
+
if (labelSymbols.includes(symbol)) {
|
|
55147
|
+
const labelModel = itemModel.getModel("label");
|
|
55148
|
+
const text = labelModel.get("formatter");
|
|
55149
|
+
if (labelModel.get("show") && text) {
|
|
55150
|
+
const rect = labelModel.getTextRect(text);
|
|
55151
|
+
symbolSize = [rect.width + padding, rect.height + padding];
|
|
55152
|
+
const align = labelModel.get("align");
|
|
55153
|
+
if (align === "left") {
|
|
55154
|
+
labelModel.option.offset = [-rect.width / 2, 0];
|
|
55155
|
+
} else if (align === "right") {
|
|
55156
|
+
labelModel.option.offset = [rect.width / 2, 0];
|
|
55157
|
+
}
|
|
55158
|
+
}
|
|
55159
|
+
}
|
|
55160
|
+
if (lineSymbols.includes(symbol)) {
|
|
55161
|
+
style.stroke = style.fill;
|
|
55162
|
+
}
|
|
55163
|
+
data2.setItemVisual(idx, {
|
|
55164
|
+
symbol,
|
|
55165
|
+
symbolSize,
|
|
55166
|
+
symbolRotate,
|
|
55167
|
+
symbolOffset,
|
|
55168
|
+
symbolKeepAspect,
|
|
55169
|
+
style
|
|
55170
|
+
});
|
|
55171
|
+
}
|
|
55172
|
+
return {dataEach: data.hasItemOption ? dataEach : null};
|
|
55173
|
+
}
|
|
55174
|
+
};
|
|
55175
|
+
var labelsVisual_default = LabelsLayout;
|
|
55176
|
+
|
|
55177
|
+
// src/chart/labels/install.ts
|
|
55178
|
+
function install25(registers) {
|
|
55179
|
+
registers.registerSeriesModel(LabelsSeries_default);
|
|
55180
|
+
registers.registerChartView(LabelsView_default);
|
|
55181
|
+
registers.registerLayout(pointsLayout("labels"));
|
|
55182
|
+
registers.registerVisual(labelsVisual_default);
|
|
55183
|
+
}
|
|
55184
|
+
|
|
54435
55185
|
// src/chart/hlines/HLinesSeries.ts
|
|
54436
55186
|
var HLineSeriesModel2 = class extends Series_default {
|
|
54437
55187
|
constructor() {
|
|
@@ -54557,7 +55307,7 @@ var hLinesLayout = {
|
|
|
54557
55307
|
var hLinesLayout_default = hLinesLayout;
|
|
54558
55308
|
|
|
54559
55309
|
// src/chart/hlines/install.ts
|
|
54560
|
-
function
|
|
55310
|
+
function install26(registers) {
|
|
54561
55311
|
registers.registerChartView(HLinesView_default);
|
|
54562
55312
|
registers.registerSeriesModel(HLinesSeries_default);
|
|
54563
55313
|
registers.registerLayout(hLinesLayout_default);
|
|
@@ -54658,7 +55408,7 @@ var BgColorView2 = class extends Chart_default {
|
|
|
54658
55408
|
}
|
|
54659
55409
|
const bgColorGroup = this._bgColorGroup;
|
|
54660
55410
|
const width = Math.ceil(seriesModel.coordinateSystem.getBaseAxis().scale.barSpace);
|
|
54661
|
-
const isLine = width <=
|
|
55411
|
+
const isLine = width <= 8;
|
|
54662
55412
|
each(rectsByColor, function(rects, color2) {
|
|
54663
55413
|
const el = new BgColorPath_default({
|
|
54664
55414
|
shape: {
|
|
@@ -54684,7 +55434,10 @@ var BgColorView2 = class extends Chart_default {
|
|
|
54684
55434
|
traverseElements(this._bgColorGroup, cb);
|
|
54685
55435
|
}
|
|
54686
55436
|
remove(ecModel, api2) {
|
|
54687
|
-
|
|
55437
|
+
if (this._bgColorGroup) {
|
|
55438
|
+
this.group.remove(this._bgColorGroup);
|
|
55439
|
+
this._bgColorGroup = null;
|
|
55440
|
+
}
|
|
54688
55441
|
}
|
|
54689
55442
|
dispose(ecModel, api2) {
|
|
54690
55443
|
this.remove(ecModel, api2);
|
|
@@ -54753,7 +55506,7 @@ var bgColorLayout = {
|
|
|
54753
55506
|
var BgColorLayout_default = bgColorLayout;
|
|
54754
55507
|
|
|
54755
55508
|
// src/chart/bgColor/install.ts
|
|
54756
|
-
function
|
|
55509
|
+
function install27(registers) {
|
|
54757
55510
|
registers.registerChartView(BgColorView_default);
|
|
54758
55511
|
registers.registerSeriesModel(BgColorSeries_default);
|
|
54759
55512
|
registers.registerLayout(BgColorLayout_default);
|
|
@@ -55151,7 +55904,7 @@ HeatmapSeriesModel.defaultOption = {
|
|
|
55151
55904
|
var HeatmapSeries_default = HeatmapSeriesModel;
|
|
55152
55905
|
|
|
55153
55906
|
// src/chart/heatmap/install.ts
|
|
55154
|
-
function
|
|
55907
|
+
function install28(registers) {
|
|
55155
55908
|
registers.registerChartView(HeatmapView_default);
|
|
55156
55909
|
registers.registerSeriesModel(HeatmapSeries_default);
|
|
55157
55910
|
}
|
|
@@ -55714,7 +56467,7 @@ PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries_defau
|
|
|
55714
56467
|
var PictorialBarSeries_default = PictorialBarSeriesModel;
|
|
55715
56468
|
|
|
55716
56469
|
// src/chart/bar/installPictorialBar.ts
|
|
55717
|
-
function
|
|
56470
|
+
function install29(registers) {
|
|
55718
56471
|
registers.registerChartView(PictorialBarView_default);
|
|
55719
56472
|
registers.registerSeriesModel(PictorialBarSeries_default);
|
|
55720
56473
|
registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout2, "pictorialBar"));
|
|
@@ -56115,7 +56868,7 @@ function computeBaseline(data) {
|
|
|
56115
56868
|
}
|
|
56116
56869
|
|
|
56117
56870
|
// src/chart/themeRiver/install.ts
|
|
56118
|
-
function
|
|
56871
|
+
function install30(registers) {
|
|
56119
56872
|
registers.registerChartView(ThemeRiverView_default);
|
|
56120
56873
|
registers.registerSeriesModel(ThemeRiverSeries_default);
|
|
56121
56874
|
registers.registerLayout(themeRiverLayout);
|
|
@@ -56753,7 +57506,7 @@ function sunburstVisual(ecModel) {
|
|
|
56753
57506
|
}
|
|
56754
57507
|
|
|
56755
57508
|
// src/chart/sunburst/install.ts
|
|
56756
|
-
function
|
|
57509
|
+
function install31(registers) {
|
|
56757
57510
|
registers.registerChartView(SunburstView_default);
|
|
56758
57511
|
registers.registerSeriesModel(SunburstSeries_default);
|
|
56759
57512
|
registers.registerLayout(curry(sunburstLayout, "sunburst"));
|
|
@@ -58201,7 +58954,7 @@ function hasOwnPathData(shape) {
|
|
|
58201
58954
|
}
|
|
58202
58955
|
|
|
58203
58956
|
// src/chart/custom/install.ts
|
|
58204
|
-
function
|
|
58957
|
+
function install32(registers) {
|
|
58205
58958
|
registers.registerChartView(CustomView_default);
|
|
58206
58959
|
registers.registerSeriesModel(CustomSeries_default);
|
|
58207
58960
|
}
|
|
@@ -59419,7 +60172,7 @@ function illegalPoint(point) {
|
|
|
59419
60172
|
}
|
|
59420
60173
|
|
|
59421
60174
|
// src/component/axisPointer/install.ts
|
|
59422
|
-
function
|
|
60175
|
+
function install33(registers) {
|
|
59423
60176
|
AxisView_default.registerAxisPointerClass("CartesianAxisPointer", CartesianAxisPointer_default);
|
|
59424
60177
|
registers.registerComponentModel(AxisPointerModel_default);
|
|
59425
60178
|
registers.registerComponentView(AxisPointerView_default);
|
|
@@ -59448,9 +60201,9 @@ function install32(registers) {
|
|
|
59448
60201
|
}
|
|
59449
60202
|
|
|
59450
60203
|
// src/component/grid/install.ts
|
|
59451
|
-
function
|
|
60204
|
+
function install34(registers) {
|
|
59452
60205
|
use(install6);
|
|
59453
|
-
use(
|
|
60206
|
+
use(install33);
|
|
59454
60207
|
}
|
|
59455
60208
|
|
|
59456
60209
|
// src/component/axisPointer/PolarAxisPointer.ts
|
|
@@ -60504,8 +61257,8 @@ var PolarView2 = class extends Component_default2 {
|
|
|
60504
61257
|
};
|
|
60505
61258
|
var PolarView = PolarView2;
|
|
60506
61259
|
PolarView.type = "polar";
|
|
60507
|
-
function
|
|
60508
|
-
use(
|
|
61260
|
+
function install35(registers) {
|
|
61261
|
+
use(install33);
|
|
60509
61262
|
AxisView_default.registerAxisPointerClass("PolarAxisPointer", PolarAxisPointer_default);
|
|
60510
61263
|
registers.registerCoordinateSystem("polar", polarCreator_default);
|
|
60511
61264
|
registers.registerComponentModel(PolarModel_default);
|
|
@@ -60968,8 +61721,8 @@ var SingleView2 = class extends Component_default2 {
|
|
|
60968
61721
|
};
|
|
60969
61722
|
var SingleView = SingleView2;
|
|
60970
61723
|
SingleView.type = "single";
|
|
60971
|
-
function
|
|
60972
|
-
use(
|
|
61724
|
+
function install36(registers) {
|
|
61725
|
+
use(install33);
|
|
60973
61726
|
AxisView_default.registerAxisPointerClass("SingleAxisPointer", SingleAxisPointer_default);
|
|
60974
61727
|
registers.registerComponentView(SingleView);
|
|
60975
61728
|
registers.registerComponentView(SingleAxisView_default);
|
|
@@ -61659,7 +62412,7 @@ function getCoordSys5(finder) {
|
|
|
61659
62412
|
var Calendar_default = Calendar;
|
|
61660
62413
|
|
|
61661
62414
|
// src/component/calendar/install.ts
|
|
61662
|
-
function
|
|
62415
|
+
function install37(registers) {
|
|
61663
62416
|
registers.registerComponentModel(CalendarModel_default);
|
|
61664
62417
|
registers.registerComponentView(CalendarView_default);
|
|
61665
62418
|
registers.registerCoordinateSystem("calendar", Calendar_default);
|
|
@@ -62048,7 +62801,7 @@ function setEventData(el, graphicModel, elOption) {
|
|
|
62048
62801
|
}
|
|
62049
62802
|
|
|
62050
62803
|
// src/component/graphic/install.ts
|
|
62051
|
-
function
|
|
62804
|
+
function install38(registers) {
|
|
62052
62805
|
registers.registerComponentModel(GraphicComponentModel);
|
|
62053
62806
|
registers.registerComponentView(GraphicComponentView);
|
|
62054
62807
|
registers.registerPreprocessor(function(option) {
|
|
@@ -62902,7 +63655,7 @@ function installCommon(registers) {
|
|
|
62902
63655
|
}
|
|
62903
63656
|
|
|
62904
63657
|
// src/component/dataZoom/installDataZoomSelect.ts
|
|
62905
|
-
function
|
|
63658
|
+
function install39(registers) {
|
|
62906
63659
|
registers.registerComponentModel(SelectZoomModel_default);
|
|
62907
63660
|
registers.registerComponentView(SelectZoomView_default);
|
|
62908
63661
|
installCommon(registers);
|
|
@@ -62978,22 +63731,22 @@ var ToolboxModel_default = ToolboxModel;
|
|
|
62978
63731
|
// src/component/helper/listComponent.ts
|
|
62979
63732
|
function layout13(group, componentModel, api2) {
|
|
62980
63733
|
const boxLayoutParams = componentModel.getBoxLayoutParams();
|
|
62981
|
-
const
|
|
63734
|
+
const padding2 = componentModel.get("padding");
|
|
62982
63735
|
const viewportSize = {width: api2.getWidth(), height: api2.getHeight()};
|
|
62983
|
-
const rect = getLayoutRect(boxLayoutParams, viewportSize,
|
|
63736
|
+
const rect = getLayoutRect(boxLayoutParams, viewportSize, padding2);
|
|
62984
63737
|
box(componentModel.get("orient"), group, componentModel.get("itemGap"), rect.width, rect.height);
|
|
62985
|
-
positionElement(group, boxLayoutParams, viewportSize,
|
|
63738
|
+
positionElement(group, boxLayoutParams, viewportSize, padding2);
|
|
62986
63739
|
}
|
|
62987
63740
|
function makeBackground(rect, componentModel) {
|
|
62988
|
-
const
|
|
63741
|
+
const padding2 = normalizeCssArray2(componentModel.get("padding"));
|
|
62989
63742
|
const style = componentModel.getItemStyle(["color", "opacity"]);
|
|
62990
63743
|
style.fill = componentModel.get("backgroundColor");
|
|
62991
63744
|
rect = new Rect_default({
|
|
62992
63745
|
shape: {
|
|
62993
|
-
x: rect.x -
|
|
62994
|
-
y: rect.y -
|
|
62995
|
-
width: rect.width +
|
|
62996
|
-
height: rect.height +
|
|
63746
|
+
x: rect.x - padding2[3],
|
|
63747
|
+
y: rect.y - padding2[0],
|
|
63748
|
+
width: rect.width + padding2[1] + padding2[3],
|
|
63749
|
+
height: rect.height + padding2[0] + padding2[2],
|
|
62997
63750
|
r: componentModel.get("borderRadius")
|
|
62998
63751
|
},
|
|
62999
63752
|
style,
|
|
@@ -64302,7 +65055,7 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
64302
65055
|
var DataZoom_default = DataZoomFeature;
|
|
64303
65056
|
|
|
64304
65057
|
// src/component/toolbox/install.ts
|
|
64305
|
-
function
|
|
65058
|
+
function install40(registers) {
|
|
64306
65059
|
registers.registerComponentModel(ToolboxModel_default);
|
|
64307
65060
|
registers.registerComponentView(ToolboxView_default);
|
|
64308
65061
|
registerFeature("saveAsImage", SaveAsImage_default);
|
|
@@ -64310,7 +65063,7 @@ function install39(registers) {
|
|
|
64310
65063
|
registerFeature("dataView", DataView_default);
|
|
64311
65064
|
registerFeature("dataZoom", DataZoom_default);
|
|
64312
65065
|
registerFeature("restore", Restore_default);
|
|
64313
|
-
use(
|
|
65066
|
+
use(install39);
|
|
64314
65067
|
}
|
|
64315
65068
|
|
|
64316
65069
|
// src/component/tooltip/TooltipModel.ts
|
|
@@ -64488,7 +65241,7 @@ function assembleCssText(tooltipModel, enableTransition, onlyFade) {
|
|
|
64488
65241
|
const shadowOffsetX = tooltipModel.get("shadowOffsetX");
|
|
64489
65242
|
const shadowOffsetY = tooltipModel.get("shadowOffsetY");
|
|
64490
65243
|
const textStyleModel = tooltipModel.getModel("textStyle");
|
|
64491
|
-
const
|
|
65244
|
+
const padding2 = getPaddingFromTooltipModel(tooltipModel, "html");
|
|
64492
65245
|
const boxShadow = `${shadowOffsetX}px ${shadowOffsetY}px ${shadowBlur}px ${shadowColor}`;
|
|
64493
65246
|
cssText.push("box-shadow:" + boxShadow);
|
|
64494
65247
|
enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade));
|
|
@@ -64502,8 +65255,8 @@ function assembleCssText(tooltipModel, enableTransition, onlyFade) {
|
|
|
64502
65255
|
val != null && cssText.push(borderName + ":" + val + (name === "color" ? "" : "px"));
|
|
64503
65256
|
});
|
|
64504
65257
|
cssText.push(assembleFont(textStyleModel));
|
|
64505
|
-
if (
|
|
64506
|
-
cssText.push("padding:" + normalizeCssArray2(
|
|
65258
|
+
if (padding2 != null) {
|
|
65259
|
+
cssText.push("padding:" + normalizeCssArray2(padding2).join("px ") + "px");
|
|
64507
65260
|
}
|
|
64508
65261
|
return cssText.join(";") + ";";
|
|
64509
65262
|
}
|
|
@@ -65478,8 +66231,8 @@ function findComponentReference(payload, ecModel, api2) {
|
|
|
65478
66231
|
var TooltipView_default = TooltipView;
|
|
65479
66232
|
|
|
65480
66233
|
// src/component/tooltip/install.ts
|
|
65481
|
-
function
|
|
65482
|
-
use(
|
|
66234
|
+
function install41(registers) {
|
|
66235
|
+
use(install33);
|
|
65483
66236
|
registers.registerComponentModel(TooltipModel_default);
|
|
65484
66237
|
registers.registerComponentView(TooltipView_default);
|
|
65485
66238
|
registers.registerAction({
|
|
@@ -66095,7 +66848,7 @@ var BrushFeature = class extends ToolboxFeature {
|
|
|
66095
66848
|
var Brush_default = BrushFeature;
|
|
66096
66849
|
|
|
66097
66850
|
// src/component/brush/install.ts
|
|
66098
|
-
function
|
|
66851
|
+
function install42(registers) {
|
|
66099
66852
|
registers.registerComponentView(BrushView_default);
|
|
66100
66853
|
registers.registerComponentModel(BrushModel_default);
|
|
66101
66854
|
registers.registerPreprocessor(brushPreprocessor);
|
|
@@ -66242,7 +66995,7 @@ var TitleView2 = class extends Component_default2 {
|
|
|
66242
66995
|
};
|
|
66243
66996
|
var TitleView = TitleView2;
|
|
66244
66997
|
TitleView.type = "title";
|
|
66245
|
-
function
|
|
66998
|
+
function install43(registers) {
|
|
66246
66999
|
registers.registerComponentModel(TitleModel);
|
|
66247
67000
|
registers.registerComponentView(TitleView);
|
|
66248
67001
|
}
|
|
@@ -67096,7 +67849,7 @@ function has(obj, attr) {
|
|
|
67096
67849
|
}
|
|
67097
67850
|
|
|
67098
67851
|
// src/component/timeline/install.ts
|
|
67099
|
-
function
|
|
67852
|
+
function install44(registers) {
|
|
67100
67853
|
registers.registerComponentModel(SliderTimelineModel_default);
|
|
67101
67854
|
registers.registerComponentView(SliderTimelineView_default);
|
|
67102
67855
|
registers.registerSubTypeDefaulter("timeline", function() {
|
|
@@ -67537,7 +68290,7 @@ function createData(coordSys, seriesModel, mpModel) {
|
|
|
67537
68290
|
var MarkPointView_default = MarkPointView;
|
|
67538
68291
|
|
|
67539
68292
|
// src/component/marker/installMarkPoint.ts
|
|
67540
|
-
function
|
|
68293
|
+
function install45(registers) {
|
|
67541
68294
|
registers.registerComponentModel(MarkPointModel_default);
|
|
67542
68295
|
registers.registerComponentView(MarkPointView_default);
|
|
67543
68296
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -67855,7 +68608,7 @@ function createList2(coordSys, seriesModel, mlModel) {
|
|
|
67855
68608
|
var MarkLineView_default = MarkLineView;
|
|
67856
68609
|
|
|
67857
68610
|
// src/component/marker/installMarkLine.ts
|
|
67858
|
-
function
|
|
68611
|
+
function install46(registers) {
|
|
67859
68612
|
registers.registerComponentModel(MarkLineModel_default);
|
|
67860
68613
|
registers.registerComponentView(MarkLineView_default);
|
|
67861
68614
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -68169,7 +68922,7 @@ function createList3(coordSys, seriesModel, maModel) {
|
|
|
68169
68922
|
var MarkAreaView_default = MarkAreaView;
|
|
68170
68923
|
|
|
68171
68924
|
// src/component/marker/installMarkArea.ts
|
|
68172
|
-
function
|
|
68925
|
+
function install47(registers) {
|
|
68173
68926
|
registers.registerComponentModel(MarkAreaModel_default);
|
|
68174
68927
|
registers.registerComponentView(MarkAreaView_default);
|
|
68175
68928
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -68765,7 +69518,7 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
68765
69518
|
var MarkLabelView_default = MarkLabelView;
|
|
68766
69519
|
|
|
68767
69520
|
// src/component/marker/installMarkLabel.ts
|
|
68768
|
-
function
|
|
69521
|
+
function install48(registers) {
|
|
68769
69522
|
registers.registerComponentModel(MarkLabelModal_default);
|
|
68770
69523
|
registers.registerComponentView(MarkLabelView_default);
|
|
68771
69524
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -69047,13 +69800,13 @@ var LegendView2 = class extends Component_default2 {
|
|
|
69047
69800
|
this.renderInner(itemAlign, legendModel, ecModel, api2, selector2, orient, selectorPosition);
|
|
69048
69801
|
const positionInfo = legendModel.getBoxLayoutParams();
|
|
69049
69802
|
const viewportSize = {width: api2.getWidth(), height: api2.getHeight()};
|
|
69050
|
-
const
|
|
69051
|
-
const maxSize = getLayoutRect(positionInfo, viewportSize,
|
|
69803
|
+
const padding2 = legendModel.get("padding");
|
|
69804
|
+
const maxSize = getLayoutRect(positionInfo, viewportSize, padding2);
|
|
69052
69805
|
const mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector2, selectorPosition);
|
|
69053
69806
|
const layoutRect = getLayoutRect(defaults({
|
|
69054
69807
|
width: mainRect.width,
|
|
69055
69808
|
height: mainRect.height
|
|
69056
|
-
}, positionInfo), viewportSize,
|
|
69809
|
+
}, positionInfo), viewportSize, padding2);
|
|
69057
69810
|
this.group.x = layoutRect.x - mainRect.x;
|
|
69058
69811
|
this.group.y = layoutRect.y - mainRect.y;
|
|
69059
69812
|
this.group.markRedraw();
|
|
@@ -69447,7 +70200,7 @@ function installLegendAction(registers) {
|
|
|
69447
70200
|
}
|
|
69448
70201
|
|
|
69449
70202
|
// src/component/legend/installLegendPlain.ts
|
|
69450
|
-
function
|
|
70203
|
+
function install49(registers) {
|
|
69451
70204
|
registers.registerComponentModel(LegendModel_default);
|
|
69452
70205
|
registers.registerComponentView(LegendView_default);
|
|
69453
70206
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);
|
|
@@ -69777,17 +70530,17 @@ function installScrollableLegendAction(registers) {
|
|
|
69777
70530
|
}
|
|
69778
70531
|
|
|
69779
70532
|
// src/component/legend/installLegendScroll.ts
|
|
69780
|
-
function
|
|
69781
|
-
use(
|
|
70533
|
+
function install50(registers) {
|
|
70534
|
+
use(install49);
|
|
69782
70535
|
registers.registerComponentModel(ScrollableLegendModel_default);
|
|
69783
70536
|
registers.registerComponentView(ScrollableLegendView_default);
|
|
69784
70537
|
installScrollableLegendAction(registers);
|
|
69785
70538
|
}
|
|
69786
70539
|
|
|
69787
70540
|
// src/component/legend/install.ts
|
|
69788
|
-
function
|
|
69789
|
-
use(install48);
|
|
70541
|
+
function install51(registers) {
|
|
69790
70542
|
use(install49);
|
|
70543
|
+
use(install50);
|
|
69791
70544
|
}
|
|
69792
70545
|
|
|
69793
70546
|
// src/component/dataZoom/InsideZoomModel.ts
|
|
@@ -70203,7 +70956,7 @@ var getDirectionInfo = {
|
|
|
70203
70956
|
var InsideZoomView_default = InsideZoomView;
|
|
70204
70957
|
|
|
70205
70958
|
// src/component/dataZoom/installDataZoomInside.ts
|
|
70206
|
-
function
|
|
70959
|
+
function install52(registers) {
|
|
70207
70960
|
installCommon(registers);
|
|
70208
70961
|
registers.registerComponentModel(InsideZoomModel_default);
|
|
70209
70962
|
registers.registerComponentView(InsideZoomView_default);
|
|
@@ -70959,16 +71712,16 @@ function getCursor(orient) {
|
|
|
70959
71712
|
var SliderZoomView_default = SliderZoomView;
|
|
70960
71713
|
|
|
70961
71714
|
// src/component/dataZoom/installDataZoomSlider.ts
|
|
70962
|
-
function
|
|
71715
|
+
function install53(registers) {
|
|
70963
71716
|
registers.registerComponentModel(SliderZoomModel_default);
|
|
70964
71717
|
registers.registerComponentView(SliderZoomView_default);
|
|
70965
71718
|
installCommon(registers);
|
|
70966
71719
|
}
|
|
70967
71720
|
|
|
70968
71721
|
// src/component/dataZoom/install.ts
|
|
70969
|
-
function
|
|
70970
|
-
use(install51);
|
|
71722
|
+
function install54(registers) {
|
|
70971
71723
|
use(install52);
|
|
71724
|
+
use(install53);
|
|
70972
71725
|
}
|
|
70973
71726
|
|
|
70974
71727
|
// src/visual/visualDefault.ts
|
|
@@ -71452,16 +72205,16 @@ var VisualMapView2 = class extends Component_default2 {
|
|
|
71452
72205
|
}
|
|
71453
72206
|
renderBackground(group) {
|
|
71454
72207
|
const visualMapModel = this.visualMapModel;
|
|
71455
|
-
const
|
|
72208
|
+
const padding2 = normalizeCssArray2(visualMapModel.get("padding") || 0);
|
|
71456
72209
|
const rect = group.getBoundingRect();
|
|
71457
72210
|
group.add(new Rect_default({
|
|
71458
72211
|
z2: -1,
|
|
71459
72212
|
silent: true,
|
|
71460
72213
|
shape: {
|
|
71461
|
-
x: rect.x -
|
|
71462
|
-
y: rect.y -
|
|
71463
|
-
width: rect.width +
|
|
71464
|
-
height: rect.height +
|
|
72214
|
+
x: rect.x - padding2[3],
|
|
72215
|
+
y: rect.y - padding2[0],
|
|
72216
|
+
width: rect.width + padding2[3] + padding2[1],
|
|
72217
|
+
height: rect.height + padding2[0] + padding2[2]
|
|
71465
72218
|
},
|
|
71466
72219
|
style: {
|
|
71467
72220
|
fill: visualMapModel.get("backgroundColor"),
|
|
@@ -72233,7 +72986,7 @@ function installCommon2(registers) {
|
|
|
72233
72986
|
}
|
|
72234
72987
|
|
|
72235
72988
|
// src/component/visualMap/installVisualMapContinuous.ts
|
|
72236
|
-
function
|
|
72989
|
+
function install55(registers) {
|
|
72237
72990
|
registers.registerComponentModel(ContinuousModel_default);
|
|
72238
72991
|
registers.registerComponentView(ContinuousView_default);
|
|
72239
72992
|
installCommon2(registers);
|
|
@@ -72673,16 +73426,16 @@ PiecewiseVisualMapView.type = "visualMap.piecewise";
|
|
|
72673
73426
|
var PiecewiseView_default = PiecewiseVisualMapView;
|
|
72674
73427
|
|
|
72675
73428
|
// src/component/visualMap/installVisualMapPiecewise.ts
|
|
72676
|
-
function
|
|
73429
|
+
function install56(registers) {
|
|
72677
73430
|
registers.registerComponentModel(PiecewiseModel_default);
|
|
72678
73431
|
registers.registerComponentView(PiecewiseView_default);
|
|
72679
73432
|
installCommon2(registers);
|
|
72680
73433
|
}
|
|
72681
73434
|
|
|
72682
73435
|
// src/component/visualMap/install.ts
|
|
72683
|
-
function
|
|
72684
|
-
use(install54);
|
|
73436
|
+
function install57(registers) {
|
|
72685
73437
|
use(install55);
|
|
73438
|
+
use(install56);
|
|
72686
73439
|
}
|
|
72687
73440
|
|
|
72688
73441
|
// src/visual/aria.ts
|
|
@@ -72878,7 +73631,7 @@ function ariaPreprocessor(option) {
|
|
|
72878
73631
|
}
|
|
72879
73632
|
|
|
72880
73633
|
// src/component/aria/install.ts
|
|
72881
|
-
function
|
|
73634
|
+
function install58(registers) {
|
|
72882
73635
|
registers.registerPreprocessor(ariaPreprocessor);
|
|
72883
73636
|
registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);
|
|
72884
73637
|
}
|
|
@@ -73216,7 +73969,7 @@ var sortTransform = {
|
|
|
73216
73969
|
};
|
|
73217
73970
|
|
|
73218
73971
|
// src/component/transform/install.ts
|
|
73219
|
-
function
|
|
73972
|
+
function install59(registers) {
|
|
73220
73973
|
registers.registerTransform(filterTransform);
|
|
73221
73974
|
registers.registerTransform(sortTransform);
|
|
73222
73975
|
}
|
|
@@ -73254,7 +74007,7 @@ var DatasetView = class extends Component_default2 {
|
|
|
73254
74007
|
}
|
|
73255
74008
|
};
|
|
73256
74009
|
DatasetView.type = "dataset";
|
|
73257
|
-
function
|
|
74010
|
+
function install60(registers) {
|
|
73258
74011
|
registers.registerComponentModel(DatasetModel);
|
|
73259
74012
|
registers.registerComponentView(DatasetView);
|
|
73260
74013
|
}
|
|
@@ -74976,35 +75729,36 @@ use([
|
|
|
74976
75729
|
install28,
|
|
74977
75730
|
install29,
|
|
74978
75731
|
install30,
|
|
74979
|
-
install31
|
|
75732
|
+
install31,
|
|
75733
|
+
install32
|
|
74980
75734
|
]);
|
|
74981
|
-
use(install33);
|
|
74982
75735
|
use(install34);
|
|
74983
|
-
use(install10);
|
|
74984
75736
|
use(install35);
|
|
74985
|
-
use(
|
|
75737
|
+
use(install10);
|
|
74986
75738
|
use(install36);
|
|
75739
|
+
use(install17);
|
|
74987
75740
|
use(install37);
|
|
74988
|
-
use(
|
|
75741
|
+
use(install38);
|
|
74989
75742
|
use(install40);
|
|
74990
|
-
use(install32);
|
|
74991
75743
|
use(install41);
|
|
75744
|
+
use(install33);
|
|
74992
75745
|
use(install42);
|
|
74993
75746
|
use(install43);
|
|
74994
75747
|
use(install44);
|
|
74995
75748
|
use(install45);
|
|
74996
75749
|
use(install46);
|
|
74997
75750
|
use(install47);
|
|
74998
|
-
use(
|
|
74999
|
-
use(install53);
|
|
75751
|
+
use(install48);
|
|
75000
75752
|
use(install51);
|
|
75001
|
-
use(install52);
|
|
75002
|
-
use(install56);
|
|
75003
75753
|
use(install54);
|
|
75004
|
-
use(
|
|
75754
|
+
use(install52);
|
|
75755
|
+
use(install53);
|
|
75005
75756
|
use(install57);
|
|
75757
|
+
use(install55);
|
|
75758
|
+
use(install56);
|
|
75006
75759
|
use(install58);
|
|
75007
75760
|
use(install59);
|
|
75761
|
+
use(install60);
|
|
75008
75762
|
use(installUniversalTransition);
|
|
75009
75763
|
use(installLabelLayout);
|
|
75010
75764
|
|