tvcharts 0.6.12 → 0.6.14
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 +1103 -115
- package/dist/echarts.js.map +3 -3
- package/index.js +2 -2
- package/lib/chart/helper/Symbol.js +59 -13
- 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 +181 -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 +610 -2
- package/lib/util/symbolSize.js +479 -0
- package/package.json +1 -1
- package/types/dist/charts.d.ts +1 -1
- package/types/dist/components.d.ts +1 -1
- package/types/dist/echarts.d.ts +6 -6
- package/types/dist/renderers.d.ts +1 -1
- package/types/dist/shared.d.ts +12 -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/data/SeriesData.d.ts +1 -0
- package/types/src/export/charts.d.ts +1 -0
- package/types/src/util/symbolSize.d.ts +12 -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,404 @@ 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
|
+
triangleWidth: 0
|
|
21690
|
+
},
|
|
21691
|
+
buildPath: function(ctx, shape) {
|
|
21692
|
+
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21693
|
+
const triangleHeight = triangleWidth;
|
|
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
|
+
triangleWidth: 0
|
|
21717
|
+
},
|
|
21718
|
+
buildPath: function(ctx, shape) {
|
|
21719
|
+
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21720
|
+
const triangleHeight = triangleWidth;
|
|
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
|
+
triangleWidth: 0
|
|
21744
|
+
},
|
|
21745
|
+
buildPath: function(ctx, shape) {
|
|
21746
|
+
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21747
|
+
const triangleHeight = triangleWidth;
|
|
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
|
+
triangleWidth: 0
|
|
21771
|
+
},
|
|
21772
|
+
buildPath: function(ctx, shape) {
|
|
21773
|
+
const {x, y, width, height, r, triangleWidth} = shape;
|
|
21774
|
+
const triangleHeight = triangleWidth;
|
|
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 LabelCenter = Path_default.extend({
|
|
21922
|
+
type: "labelCenter",
|
|
21923
|
+
shape: {
|
|
21924
|
+
x: 0,
|
|
21925
|
+
y: 0,
|
|
21926
|
+
width: 0,
|
|
21927
|
+
height: 0,
|
|
21928
|
+
r: 0
|
|
21929
|
+
},
|
|
21930
|
+
buildPath: function(ctx, shape) {
|
|
21931
|
+
const height = shape.height;
|
|
21932
|
+
const width = shape.width;
|
|
21933
|
+
const x = shape.x;
|
|
21934
|
+
const y = shape.y;
|
|
21935
|
+
const r = shape.r;
|
|
21936
|
+
ctx.moveTo(x + r, y);
|
|
21937
|
+
ctx.lineTo(x + width - r, y);
|
|
21938
|
+
ctx.arc(x + width - r, y + r, r, -Math.PI / 2, 0);
|
|
21939
|
+
ctx.lineTo(x + width, y + height - r);
|
|
21940
|
+
ctx.arc(x + width - r, y + height - r, r, 0, Math.PI / 2);
|
|
21941
|
+
ctx.lineTo(x + r, y + height);
|
|
21942
|
+
ctx.arc(x + r, y + height - r, r, Math.PI / 2, Math.PI);
|
|
21943
|
+
ctx.lineTo(x, y);
|
|
21944
|
+
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5);
|
|
21945
|
+
}
|
|
21946
|
+
});
|
|
21947
|
+
var XCross = Path_default.extend({
|
|
21948
|
+
type: "xCross",
|
|
21949
|
+
shape: {
|
|
21950
|
+
x: 0,
|
|
21951
|
+
y: 0,
|
|
21952
|
+
width: 0,
|
|
21953
|
+
height: 0
|
|
21954
|
+
},
|
|
21955
|
+
buildPath: function(ctx, shape) {
|
|
21956
|
+
const {x, y} = shape;
|
|
21957
|
+
const width = shape.width / 2;
|
|
21958
|
+
const height = shape.height / 2;
|
|
21959
|
+
ctx.moveTo(x + width, y - height);
|
|
21960
|
+
ctx.lineTo(x - width, y + height);
|
|
21961
|
+
ctx.moveTo(x - width, y - height);
|
|
21962
|
+
ctx.lineTo(x + width, y + height);
|
|
21963
|
+
}
|
|
21964
|
+
});
|
|
21965
|
+
var LCross = Path_default.extend({
|
|
21966
|
+
type: "lCross",
|
|
21967
|
+
shape: {
|
|
21968
|
+
x: 0,
|
|
21969
|
+
y: 0,
|
|
21970
|
+
width: 0,
|
|
21971
|
+
height: 0
|
|
21972
|
+
},
|
|
21973
|
+
buildPath: function(ctx, shape) {
|
|
21974
|
+
const {x, y} = shape;
|
|
21975
|
+
const width = shape.width / 2;
|
|
21976
|
+
const height = shape.height / 2;
|
|
21977
|
+
ctx.moveTo(x, y - height);
|
|
21978
|
+
ctx.lineTo(x, y + height);
|
|
21979
|
+
ctx.moveTo(x - width, y);
|
|
21980
|
+
ctx.lineTo(x + width, y);
|
|
21981
|
+
}
|
|
21982
|
+
});
|
|
21983
|
+
var Flag = Path_default.extend({
|
|
21984
|
+
type: "flag",
|
|
21985
|
+
shape: {
|
|
21986
|
+
x: 0,
|
|
21987
|
+
y: 0,
|
|
21988
|
+
width: 0,
|
|
21989
|
+
height: 0
|
|
21990
|
+
},
|
|
21991
|
+
buildPath: function(ctx, shape) {
|
|
21992
|
+
const {x, y} = shape;
|
|
21993
|
+
const width = shape.width / 2;
|
|
21994
|
+
const height = shape.height / 2;
|
|
21995
|
+
const rectWidth = 0.2;
|
|
21996
|
+
const range = 0.6;
|
|
21997
|
+
const rangeHeight = 1;
|
|
21998
|
+
const startX = x - width + rectWidth;
|
|
21999
|
+
const endX = x + width;
|
|
22000
|
+
const topY = y - height;
|
|
22001
|
+
const bottomY = y + height;
|
|
22002
|
+
ctx.moveTo(x - width, topY);
|
|
22003
|
+
ctx.lineTo(startX, topY);
|
|
22004
|
+
ctx.bezierCurveTo(startX + 1 / 3 * shape.width, topY - range, startX + 2 / 3 * shape.width, topY + range, endX, topY);
|
|
22005
|
+
ctx.lineTo(endX, topY + rangeHeight);
|
|
22006
|
+
ctx.bezierCurveTo(startX + 2 / 3 * shape.width, topY + range + rangeHeight, startX + 1 / 3 * shape.width, topY - range + rangeHeight, startX, topY + rangeHeight);
|
|
22007
|
+
ctx.lineTo(startX, bottomY);
|
|
22008
|
+
ctx.lineTo(x - width, bottomY);
|
|
22009
|
+
ctx.lineTo(x - width, topY);
|
|
22010
|
+
}
|
|
22011
|
+
});
|
|
22012
|
+
var TriangleDown = Path_default.extend({
|
|
22013
|
+
type: "triangleDown",
|
|
22014
|
+
shape: {
|
|
22015
|
+
cx: 0,
|
|
22016
|
+
cy: 0,
|
|
22017
|
+
width: 0,
|
|
22018
|
+
height: 0
|
|
22019
|
+
},
|
|
22020
|
+
buildPath: function(path, shape) {
|
|
22021
|
+
const cx = shape.cx;
|
|
22022
|
+
const cy = shape.cy;
|
|
22023
|
+
const width = shape.width / 2;
|
|
22024
|
+
const height = shape.height / 2;
|
|
22025
|
+
path.moveTo(cx, cy + height);
|
|
22026
|
+
path.lineTo(cx + width, cy - height);
|
|
22027
|
+
path.lineTo(cx - width, cy - height);
|
|
22028
|
+
path.closePath();
|
|
22029
|
+
}
|
|
22030
|
+
});
|
|
22031
|
+
var ArrowUp = Path_default.extend({
|
|
22032
|
+
type: "arrowUp",
|
|
22033
|
+
shape: {
|
|
22034
|
+
cx: 0,
|
|
22035
|
+
cy: 0,
|
|
22036
|
+
width: 0,
|
|
22037
|
+
height: 0,
|
|
22038
|
+
rectWidth: 0
|
|
22039
|
+
},
|
|
22040
|
+
buildPath: function(ctx, shape) {
|
|
22041
|
+
const {cx, cy, rectWidth} = shape;
|
|
22042
|
+
const width = shape.width / 2;
|
|
22043
|
+
const height = shape.height / 2;
|
|
22044
|
+
const triangleY = cy - 2;
|
|
22045
|
+
ctx.moveTo(cx, cy - height);
|
|
22046
|
+
ctx.lineTo(cx + width, triangleY);
|
|
22047
|
+
ctx.lineTo(cx + width - rectWidth, triangleY);
|
|
22048
|
+
ctx.lineTo(cx + width - rectWidth, cy + height);
|
|
22049
|
+
ctx.lineTo(cx - width + rectWidth, cy + height);
|
|
22050
|
+
ctx.lineTo(cx - width + rectWidth, triangleY);
|
|
22051
|
+
ctx.lineTo(cx - width, triangleY);
|
|
22052
|
+
ctx.closePath();
|
|
22053
|
+
}
|
|
22054
|
+
});
|
|
22055
|
+
var ArrowDown = Path_default.extend({
|
|
22056
|
+
type: "arrowDown",
|
|
22057
|
+
shape: {
|
|
22058
|
+
cx: 0,
|
|
22059
|
+
cy: 0,
|
|
22060
|
+
width: 0,
|
|
22061
|
+
height: 0,
|
|
22062
|
+
rectWidth: 0
|
|
22063
|
+
},
|
|
22064
|
+
buildPath: function(ctx, shape) {
|
|
22065
|
+
const {cx, cy, rectWidth} = shape;
|
|
22066
|
+
const width = shape.width / 2;
|
|
22067
|
+
const height = shape.height / 2;
|
|
22068
|
+
const triangleY = cy + 2;
|
|
22069
|
+
ctx.moveTo(cx, cy + height);
|
|
22070
|
+
ctx.lineTo(cx + width, triangleY);
|
|
22071
|
+
ctx.lineTo(cx + width - rectWidth, triangleY);
|
|
22072
|
+
ctx.lineTo(cx + width - rectWidth, cy - height);
|
|
22073
|
+
ctx.lineTo(cx - width + rectWidth, cy - height);
|
|
22074
|
+
ctx.lineTo(cx - width + rectWidth, triangleY);
|
|
22075
|
+
ctx.lineTo(cx - width, triangleY);
|
|
22076
|
+
ctx.closePath();
|
|
22077
|
+
}
|
|
22078
|
+
});
|
|
21680
22079
|
var symbolCtors = {
|
|
21681
22080
|
line: Line_default,
|
|
21682
22081
|
rect: Rect_default,
|
|
@@ -21687,7 +22086,22 @@ var symbolCtors = {
|
|
|
21687
22086
|
pin: Pin,
|
|
21688
22087
|
arrow: Arrow,
|
|
21689
22088
|
triangle: Triangle,
|
|
21690
|
-
cross: Cross
|
|
22089
|
+
cross: Cross,
|
|
22090
|
+
labelCenter: LabelCenter,
|
|
22091
|
+
labelDown: LabelDown,
|
|
22092
|
+
labelUp: LabelUp,
|
|
22093
|
+
labelLeft: LabelLeft,
|
|
22094
|
+
labelRight: LabelRight,
|
|
22095
|
+
labelLowerLeft: LabelLowerLeft,
|
|
22096
|
+
labelLowerRight: LabelLowerRight,
|
|
22097
|
+
labelUpperLeft: LabelUpperLeft,
|
|
22098
|
+
labelUpperRight: LabelUpperRight,
|
|
22099
|
+
xCross: XCross,
|
|
22100
|
+
lCross: LCross,
|
|
22101
|
+
arrowUp: ArrowUp,
|
|
22102
|
+
flag: Flag,
|
|
22103
|
+
triangleDown: TriangleDown,
|
|
22104
|
+
arrowDown: ArrowDown
|
|
21691
22105
|
};
|
|
21692
22106
|
var symbolShapeMakers = {
|
|
21693
22107
|
line: function(x, y, w, h, shape) {
|
|
@@ -21750,6 +22164,147 @@ var symbolShapeMakers = {
|
|
|
21750
22164
|
shape.y = y + h / 2;
|
|
21751
22165
|
shape.width = w;
|
|
21752
22166
|
shape.height = h;
|
|
22167
|
+
},
|
|
22168
|
+
labelCenter: function(x, y, w, h, shape) {
|
|
22169
|
+
const r = 2;
|
|
22170
|
+
const offset = 1;
|
|
22171
|
+
shape.x = x - w / 2 + offset;
|
|
22172
|
+
shape.y = y - h;
|
|
22173
|
+
shape.width = w;
|
|
22174
|
+
shape.height = h;
|
|
22175
|
+
shape.r = r;
|
|
22176
|
+
},
|
|
22177
|
+
labelDown: function(x, y, w, h, shape, parentShape) {
|
|
22178
|
+
const triangleWidth = parentShape.triangleWidth;
|
|
22179
|
+
const r = 2;
|
|
22180
|
+
const offset = 1;
|
|
22181
|
+
shape.triangleWidth = triangleWidth;
|
|
22182
|
+
shape.x = x - w / 2 + offset;
|
|
22183
|
+
shape.y = y - h - triangleWidth;
|
|
22184
|
+
shape.width = w;
|
|
22185
|
+
shape.height = h;
|
|
22186
|
+
shape.r = r;
|
|
22187
|
+
},
|
|
22188
|
+
labelUp: function(x, y, w, h, shape, parentShape) {
|
|
22189
|
+
const r = 2;
|
|
22190
|
+
const offset = 1;
|
|
22191
|
+
shape.x = x - w / 2 + offset;
|
|
22192
|
+
shape.triangleWidth = parentShape.triangleWidth;
|
|
22193
|
+
shape.y = y - h;
|
|
22194
|
+
shape.width = w;
|
|
22195
|
+
shape.height = h;
|
|
22196
|
+
shape.r = r;
|
|
22197
|
+
},
|
|
22198
|
+
labelLeft: function(x, y, w, h, shape, parentShape) {
|
|
22199
|
+
const triangleWidth = parentShape.triangleWidth;
|
|
22200
|
+
const r = 2;
|
|
22201
|
+
shape.triangleWidth = triangleWidth;
|
|
22202
|
+
shape.x = x + triangleWidth;
|
|
22203
|
+
shape.y = y - h;
|
|
22204
|
+
shape.width = w;
|
|
22205
|
+
shape.height = h;
|
|
22206
|
+
shape.r = r;
|
|
22207
|
+
},
|
|
22208
|
+
labelRight: function(x, y, w, h, shape, parentShape) {
|
|
22209
|
+
const triangleWidth = parentShape.triangleWidth;
|
|
22210
|
+
const r = 2;
|
|
22211
|
+
shape.triangleWidth = triangleWidth;
|
|
22212
|
+
shape.x = x - w - triangleWidth;
|
|
22213
|
+
shape.y = y - h;
|
|
22214
|
+
shape.width = w;
|
|
22215
|
+
shape.height = h;
|
|
22216
|
+
shape.r = r;
|
|
22217
|
+
},
|
|
22218
|
+
labelLowerLeft: function(x, y, w, h, shape, parentShape) {
|
|
22219
|
+
const offsetY = parentShape.offsetY;
|
|
22220
|
+
const offsetX = parentShape.offsetX;
|
|
22221
|
+
const offsetWidth = parentShape.offsetWidth;
|
|
22222
|
+
shape.x = x + offsetWidth;
|
|
22223
|
+
shape.y = y - h - offsetY;
|
|
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
|
+
labelLowerRight: function(x, y, w, h, shape, parentShape) {
|
|
22232
|
+
const offsetY = parentShape.offsetY;
|
|
22233
|
+
const offsetX = parentShape.offsetX;
|
|
22234
|
+
const offsetWidth = parentShape.offsetWidth;
|
|
22235
|
+
shape.x = x - w - offsetWidth;
|
|
22236
|
+
shape.y = y - h - offsetY;
|
|
22237
|
+
shape.width = w;
|
|
22238
|
+
shape.height = h;
|
|
22239
|
+
shape.r = 2;
|
|
22240
|
+
shape.offsetY = offsetY;
|
|
22241
|
+
shape.offsetX = offsetX;
|
|
22242
|
+
shape.offsetWidth = offsetWidth;
|
|
22243
|
+
},
|
|
22244
|
+
labelUpperLeft: function(x, y, w, h, shape, parentShape) {
|
|
22245
|
+
const offsetY = parentShape.offsetY;
|
|
22246
|
+
const offsetX = parentShape.offsetX;
|
|
22247
|
+
const offsetWidth = parentShape.offsetWidth;
|
|
22248
|
+
shape.x = x + offsetX;
|
|
22249
|
+
shape.y = y - h - offsetY;
|
|
22250
|
+
shape.width = w;
|
|
22251
|
+
shape.height = h;
|
|
22252
|
+
shape.r = 2;
|
|
22253
|
+
shape.offsetY = offsetY;
|
|
22254
|
+
shape.offsetX = offsetX;
|
|
22255
|
+
shape.offsetWidth = offsetWidth;
|
|
22256
|
+
},
|
|
22257
|
+
labelUpperRight: function(x, y, w, h, shape, parentShape) {
|
|
22258
|
+
const offsetY = parentShape.offsetY;
|
|
22259
|
+
const offsetX = parentShape.offsetX;
|
|
22260
|
+
const offsetWidth = parentShape.offsetWidth;
|
|
22261
|
+
shape.x = x - w - offsetX;
|
|
22262
|
+
shape.y = y - h;
|
|
22263
|
+
shape.width = w;
|
|
22264
|
+
shape.height = h;
|
|
22265
|
+
shape.r = 2;
|
|
22266
|
+
shape.offsetY = offsetY;
|
|
22267
|
+
shape.offsetX = offsetX;
|
|
22268
|
+
shape.offsetWidth = offsetWidth;
|
|
22269
|
+
},
|
|
22270
|
+
xCross: function(x, y, w, h, shape) {
|
|
22271
|
+
shape.x = x + w / 2;
|
|
22272
|
+
;
|
|
22273
|
+
shape.y = y;
|
|
22274
|
+
shape.width = w;
|
|
22275
|
+
shape.height = h;
|
|
22276
|
+
},
|
|
22277
|
+
lCross: function(x, y, w, h, shape) {
|
|
22278
|
+
shape.x = x + w / 2;
|
|
22279
|
+
shape.y = y;
|
|
22280
|
+
shape.width = w;
|
|
22281
|
+
shape.height = h;
|
|
22282
|
+
},
|
|
22283
|
+
flag: function(x, y, w, h, shape) {
|
|
22284
|
+
shape.x = x + w / 2;
|
|
22285
|
+
shape.y = y;
|
|
22286
|
+
shape.width = w;
|
|
22287
|
+
shape.height = h;
|
|
22288
|
+
},
|
|
22289
|
+
triangleDown: function(x, y, w, h, shape) {
|
|
22290
|
+
shape.cx = x + w / 2;
|
|
22291
|
+
shape.cy = y + h / 2;
|
|
22292
|
+
shape.width = w;
|
|
22293
|
+
shape.height = h;
|
|
22294
|
+
},
|
|
22295
|
+
arrowUp: function(x, y, w, h, shape, parentShape) {
|
|
22296
|
+
shape.rectWidth = parentShape.triangleWidth;
|
|
22297
|
+
shape.cx = x + 1;
|
|
22298
|
+
shape.cy = y - h / 2;
|
|
22299
|
+
shape.width = w;
|
|
22300
|
+
shape.height = h;
|
|
22301
|
+
},
|
|
22302
|
+
arrowDown: function(x, y, w, h, shape, parentShape) {
|
|
22303
|
+
shape.rectWidth = parentShape.triangleWidth;
|
|
22304
|
+
shape.cx = x + 1;
|
|
22305
|
+
shape.cy = y - h / 2;
|
|
22306
|
+
shape.width = w;
|
|
22307
|
+
shape.height = h;
|
|
21753
22308
|
}
|
|
21754
22309
|
};
|
|
21755
22310
|
var symbolBuildProxies = {};
|
|
@@ -21781,7 +22336,7 @@ var SymbolClz = Path_default.extend({
|
|
|
21781
22336
|
symbolType = "rect";
|
|
21782
22337
|
proxySymbol = symbolBuildProxies[symbolType];
|
|
21783
22338
|
}
|
|
21784
|
-
symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape);
|
|
22339
|
+
symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape, shape);
|
|
21785
22340
|
proxySymbol.buildPath(ctx, proxySymbol.shape, inBundle);
|
|
21786
22341
|
}
|
|
21787
22342
|
}
|
|
@@ -32768,6 +33323,7 @@ function getDefaultInterpolatedLabel(data, interpolatedValue) {
|
|
|
32768
33323
|
}
|
|
32769
33324
|
|
|
32770
33325
|
// src/chart/helper/Symbol.ts
|
|
33326
|
+
var variableTypes = ["labelCenter", "labelDown", "labelUp", "labelLeft", "labelRight", "labelLowerLeft", "labelLowerRight", "labelUpperLeft", "labelUpperRight", "arrowUp", "arrowDown"];
|
|
32771
33327
|
var Symbol = class extends Group_default {
|
|
32772
33328
|
constructor(data, idx, seriesScope, opts) {
|
|
32773
33329
|
super();
|
|
@@ -32775,15 +33331,30 @@ var Symbol = class extends Group_default {
|
|
|
32775
33331
|
}
|
|
32776
33332
|
_createSymbol(symbolType, data, idx, symbolSize, keepAspect) {
|
|
32777
33333
|
this.removeAll();
|
|
33334
|
+
const isVariable = variableTypes.includes(symbolType);
|
|
32778
33335
|
const symbolPath = createSymbol(symbolType, -1, -1, 2, 2, null, keepAspect);
|
|
32779
|
-
|
|
32780
|
-
|
|
32781
|
-
|
|
32782
|
-
|
|
32783
|
-
|
|
32784
|
-
|
|
33336
|
+
if (isVariable) {
|
|
33337
|
+
const symbolShape = data.getItemVisual(idx, "symbolShape");
|
|
33338
|
+
symbolPath.attr({
|
|
33339
|
+
z2: 100,
|
|
33340
|
+
culling: true,
|
|
33341
|
+
shape: {
|
|
33342
|
+
width: symbolSize[0],
|
|
33343
|
+
height: symbolSize[1],
|
|
33344
|
+
...symbolShape
|
|
33345
|
+
}
|
|
33346
|
+
});
|
|
33347
|
+
} else {
|
|
33348
|
+
symbolPath.attr({
|
|
33349
|
+
z2: 100,
|
|
33350
|
+
culling: true,
|
|
33351
|
+
scaleX: symbolSize[0] / 2,
|
|
33352
|
+
scaleY: symbolSize[1] / 2
|
|
33353
|
+
});
|
|
33354
|
+
}
|
|
32785
33355
|
symbolPath.drift = driftSymbol;
|
|
32786
33356
|
this._symbolType = symbolType;
|
|
33357
|
+
this._isVariable = isVariable;
|
|
32787
33358
|
this.add(symbolPath);
|
|
32788
33359
|
}
|
|
32789
33360
|
stopSymbolAnimation(toLastFrame) {
|
|
@@ -32824,10 +33395,20 @@ var Symbol = class extends Group_default {
|
|
|
32824
33395
|
} else {
|
|
32825
33396
|
const symbolPath = this.childAt(0);
|
|
32826
33397
|
symbolPath.silent = false;
|
|
32827
|
-
|
|
33398
|
+
let target = {
|
|
32828
33399
|
scaleX: symbolSize[0] / 2,
|
|
32829
33400
|
scaleY: symbolSize[1] / 2
|
|
32830
33401
|
};
|
|
33402
|
+
if (this._isVariable) {
|
|
33403
|
+
const symbolShape = data.getItemVisual(idx, "symbolShape");
|
|
33404
|
+
target = {
|
|
33405
|
+
shape: {
|
|
33406
|
+
width: symbolSize[0],
|
|
33407
|
+
height: symbolSize[1],
|
|
33408
|
+
...symbolShape
|
|
33409
|
+
}
|
|
33410
|
+
};
|
|
33411
|
+
}
|
|
32831
33412
|
disableAnimation ? symbolPath.attr(target) : updateProps(symbolPath, target, seriesModel, idx);
|
|
32832
33413
|
saveOldStyle(symbolPath);
|
|
32833
33414
|
}
|
|
@@ -32835,15 +33416,29 @@ var Symbol = class extends Group_default {
|
|
|
32835
33416
|
if (isInit) {
|
|
32836
33417
|
const symbolPath = this.childAt(0);
|
|
32837
33418
|
if (!disableAnimation) {
|
|
32838
|
-
|
|
33419
|
+
let target = {
|
|
32839
33420
|
scaleX: this._sizeX,
|
|
32840
33421
|
scaleY: this._sizeY,
|
|
32841
33422
|
style: {
|
|
32842
33423
|
opacity: symbolPath.style.opacity
|
|
32843
33424
|
}
|
|
32844
33425
|
};
|
|
32845
|
-
|
|
32846
|
-
|
|
33426
|
+
if (this._isVariable) {
|
|
33427
|
+
const symbolShape = data.getItemVisual(idx, "symbolShape");
|
|
33428
|
+
target = {
|
|
33429
|
+
shape: {
|
|
33430
|
+
width: this._sizeX * 2,
|
|
33431
|
+
height: this._sizeY * 2,
|
|
33432
|
+
...symbolShape
|
|
33433
|
+
},
|
|
33434
|
+
style: {
|
|
33435
|
+
opacity: symbolPath.style.opacity
|
|
33436
|
+
}
|
|
33437
|
+
};
|
|
33438
|
+
} else {
|
|
33439
|
+
symbolPath.scaleX = symbolPath.scaleY = 0;
|
|
33440
|
+
symbolPath.style.opacity = 0;
|
|
33441
|
+
}
|
|
32847
33442
|
initProps(symbolPath, target, seriesModel, idx);
|
|
32848
33443
|
}
|
|
32849
33444
|
}
|
|
@@ -32945,8 +33540,13 @@ var Symbol = class extends Group_default {
|
|
|
32945
33540
|
symbolPath.ensureState("select").style = selectItemStyle;
|
|
32946
33541
|
symbolPath.ensureState("blur").style = blurItemStyle;
|
|
32947
33542
|
const scaleRatio = hoverScale == null || hoverScale === true ? Math.max(1.1, 3 / this._sizeY) : isFinite(hoverScale) && hoverScale > 0 ? +hoverScale : 1;
|
|
32948
|
-
|
|
32949
|
-
|
|
33543
|
+
if (this._isVariable) {
|
|
33544
|
+
emphasisState.scaleX = scaleRatio;
|
|
33545
|
+
emphasisState.scaleY = scaleRatio;
|
|
33546
|
+
} else {
|
|
33547
|
+
emphasisState.scaleX = this._sizeX * scaleRatio;
|
|
33548
|
+
emphasisState.scaleY = this._sizeY * scaleRatio;
|
|
33549
|
+
}
|
|
32950
33550
|
this.setSymbolScale(1);
|
|
32951
33551
|
toggleHoverEmphasis(this, focus, blurScope, emphasisDisabled);
|
|
32952
33552
|
}
|
|
@@ -33032,7 +33632,7 @@ var SymbolDraw = class {
|
|
|
33032
33632
|
const SymbolCtor = this._SymbolCtor;
|
|
33033
33633
|
const disableAnimation = opt.disableAnimation;
|
|
33034
33634
|
const seriesScope = makeSeriesScope(data);
|
|
33035
|
-
const symbolUpdateOpt = {disableAnimation};
|
|
33635
|
+
const symbolUpdateOpt = {disableAnimation, useNameLabel: opt.useNameLabel};
|
|
33036
33636
|
const getSymbolPoint = opt.getSymbolPoint || function(idx) {
|
|
33037
33637
|
return data.getItemLayout(idx);
|
|
33038
33638
|
};
|
|
@@ -36202,8 +36802,8 @@ function avoidOverlap(labelLayoutList, cx, cy, r, viewWidth, viewHeight, viewLef
|
|
|
36202
36802
|
const label = layout18.label;
|
|
36203
36803
|
const linePoints = layout18.linePoints;
|
|
36204
36804
|
const isAlignToEdge = layout18.labelAlignTo === "edge";
|
|
36205
|
-
const
|
|
36206
|
-
const paddingH =
|
|
36805
|
+
const padding2 = label.style.padding;
|
|
36806
|
+
const paddingH = padding2 ? padding2[1] + padding2[3] : 0;
|
|
36207
36807
|
const extraPaddingH = label.style.backgroundColor ? 0 : paddingH;
|
|
36208
36808
|
const realTextWidth = layout18.rect.width + extraPaddingH;
|
|
36209
36809
|
const dist3 = linePoints[1][0] - linePoints[2][0];
|
|
@@ -36233,8 +36833,8 @@ function constrainTextWidth(layout18, availableWidth, forceRecalculate = false)
|
|
|
36233
36833
|
const style = label.style;
|
|
36234
36834
|
const textRect = layout18.rect;
|
|
36235
36835
|
const bgColor = style.backgroundColor;
|
|
36236
|
-
const
|
|
36237
|
-
const paddingH =
|
|
36836
|
+
const padding2 = style.padding;
|
|
36837
|
+
const paddingH = padding2 ? padding2[1] + padding2[3] : 0;
|
|
36238
36838
|
const overflow = style.overflow;
|
|
36239
36839
|
const oldOuterWidth = textRect.width + (bgColor ? 0 : paddingH);
|
|
36240
36840
|
if (availableWidth < oldOuterWidth || forceRecalculate) {
|
|
@@ -37129,7 +37729,8 @@ var ScatterView2 = class extends Chart_default {
|
|
|
37129
37729
|
const data = seriesModel.getData();
|
|
37130
37730
|
const symbolDraw = this._updateSymbolDraw(data, seriesModel);
|
|
37131
37731
|
symbolDraw.updateData(data, {
|
|
37132
|
-
clipShape: this._getClipShape(seriesModel)
|
|
37732
|
+
clipShape: this._getClipShape(seriesModel),
|
|
37733
|
+
useNameLabel: true
|
|
37133
37734
|
});
|
|
37134
37735
|
this._finished = true;
|
|
37135
37736
|
}
|
|
@@ -54264,8 +54865,6 @@ LinesPlotView.type = "linesPlot";
|
|
|
54264
54865
|
var LinesPlotView_default = LinesPlotView;
|
|
54265
54866
|
|
|
54266
54867
|
// src/chart/linesPlot/LinesPlotSeries.ts
|
|
54267
|
-
var Uint32Arr2 = typeof Uint32Array === "undefined" ? Array : Uint32Array;
|
|
54268
|
-
var Float64Arr2 = typeof Float64Array === "undefined" ? Array : Float64Array;
|
|
54269
54868
|
var LinesPlotSeriesModel2 = class extends Series_default {
|
|
54270
54869
|
constructor() {
|
|
54271
54870
|
super(...arguments);
|
|
@@ -54300,8 +54899,6 @@ LinesPlotSeriesModel.defaultOption = {
|
|
|
54300
54899
|
yAxisIndex: 0,
|
|
54301
54900
|
symbol: "emptyCircle",
|
|
54302
54901
|
symbolSize: 10,
|
|
54303
|
-
showSymbol: true,
|
|
54304
|
-
showAllSymbol: "auto",
|
|
54305
54902
|
geoIndex: 0,
|
|
54306
54903
|
large: true,
|
|
54307
54904
|
largeThreshold: 600,
|
|
@@ -54330,11 +54927,9 @@ var linesPlotLayout = {
|
|
|
54330
54927
|
}
|
|
54331
54928
|
const data = seriesModel.getData();
|
|
54332
54929
|
const pipelineContext = seriesModel.pipelineContext;
|
|
54333
|
-
const useTypedArray = pipelineContext.large;
|
|
54334
54930
|
const dims = map(coordSys.dimensions, function(dim) {
|
|
54335
54931
|
return data.mapDimension(dim);
|
|
54336
54932
|
}).slice(0, 2);
|
|
54337
|
-
const dimLen = dims.length;
|
|
54338
54933
|
const store = data.getStore();
|
|
54339
54934
|
const dimIdx0 = data.getDimensionIndex(dims[0]);
|
|
54340
54935
|
const dimIdx1 = data.getDimensionIndex(dims[1]);
|
|
@@ -54343,6 +54938,9 @@ var linesPlotLayout = {
|
|
|
54343
54938
|
const isSingle = seriesModel.get("histogramVisible") || seriesModel.get("barVisible");
|
|
54344
54939
|
const symbolByStep = seriesModel.get("symbolByStep");
|
|
54345
54940
|
const xOffset = seriesModel.get("offset") || 0;
|
|
54941
|
+
const symbolVisible = seriesModel.get("symbolVisible");
|
|
54942
|
+
const symbolSize = seriesModel.get("symbolSize");
|
|
54943
|
+
const globalSymbol = seriesModel.get("symbol");
|
|
54346
54944
|
return {
|
|
54347
54945
|
progress(params, lineData) {
|
|
54348
54946
|
const segCount = params.end - params.start;
|
|
@@ -54391,7 +54989,11 @@ var linesPlotLayout = {
|
|
|
54391
54989
|
nextPoint[0] = midX;
|
|
54392
54990
|
}
|
|
54393
54991
|
const itemModel = lineData.getItemModel(isSingle ? i : i + 1);
|
|
54394
|
-
const {
|
|
54992
|
+
const {
|
|
54993
|
+
color: color2 = defaultColor,
|
|
54994
|
+
type = "solid",
|
|
54995
|
+
width = "1"
|
|
54996
|
+
} = itemModel.get("lineStyle");
|
|
54395
54997
|
const key = `${color2}_${type}_${width}`;
|
|
54396
54998
|
const points4 = linePointsByKey[key] || [];
|
|
54397
54999
|
if (!isSingle && lastKey !== key) {
|
|
@@ -54402,21 +55004,18 @@ var linesPlotLayout = {
|
|
|
54402
55004
|
points4.push(0);
|
|
54403
55005
|
}
|
|
54404
55006
|
points4.push(point);
|
|
54405
|
-
allLinePoints.push(point);
|
|
54406
55007
|
if (isStep) {
|
|
54407
55008
|
points4.push(nextPoint);
|
|
54408
55009
|
if (symbolByStep) {
|
|
54409
55010
|
symbolPoints[offset++] = nextPoint[0];
|
|
54410
55011
|
symbolPoints[offset++] = nextPoint[1];
|
|
54411
55012
|
}
|
|
54412
|
-
allLinePoints.push(nextPoint);
|
|
54413
55013
|
}
|
|
54414
55014
|
linePointsByKey[key] = points4;
|
|
54415
55015
|
lastKey = key;
|
|
54416
55016
|
}
|
|
54417
55017
|
lineData.setLayout({
|
|
54418
55018
|
linePointsByKey,
|
|
54419
|
-
allLinePoints,
|
|
54420
55019
|
points: symbolPoints
|
|
54421
55020
|
});
|
|
54422
55021
|
}
|
|
@@ -54432,6 +55031,391 @@ function install24(registers) {
|
|
|
54432
55031
|
registers.registerLayout(linesPlotLayout_default);
|
|
54433
55032
|
}
|
|
54434
55033
|
|
|
55034
|
+
// src/chart/labels/LabelsSeries.ts
|
|
55035
|
+
var LabelsSeriesModel2 = class extends Series_default {
|
|
55036
|
+
constructor() {
|
|
55037
|
+
super(...arguments);
|
|
55038
|
+
this.type = LabelsSeriesModel2.type;
|
|
55039
|
+
}
|
|
55040
|
+
getInitialData(option, ecModel) {
|
|
55041
|
+
return createSeriesData_default(null, this, {
|
|
55042
|
+
useEncodeDefaulter: true
|
|
55043
|
+
});
|
|
55044
|
+
}
|
|
55045
|
+
getProgressive() {
|
|
55046
|
+
const progressive = this.option.progressive;
|
|
55047
|
+
if (progressive == null) {
|
|
55048
|
+
return this.option.large ? 5e3 : this.get("progressive");
|
|
55049
|
+
}
|
|
55050
|
+
return progressive;
|
|
55051
|
+
}
|
|
55052
|
+
getProgressiveThreshold() {
|
|
55053
|
+
const progressiveThreshold = this.option.progressiveThreshold;
|
|
55054
|
+
if (progressiveThreshold == null) {
|
|
55055
|
+
return this.option.large ? 1e4 : this.get("progressiveThreshold");
|
|
55056
|
+
}
|
|
55057
|
+
return progressiveThreshold;
|
|
55058
|
+
}
|
|
55059
|
+
brushSelector(dataIndex, data, selectors) {
|
|
55060
|
+
return selectors.point(data.getItemLayout(dataIndex));
|
|
55061
|
+
}
|
|
55062
|
+
getZLevelKey() {
|
|
55063
|
+
return this.getData().count() > this.getProgressiveThreshold() ? this.id : "";
|
|
55064
|
+
}
|
|
55065
|
+
};
|
|
55066
|
+
var LabelsSeriesModel = LabelsSeriesModel2;
|
|
55067
|
+
LabelsSeriesModel.type = "series.labels";
|
|
55068
|
+
LabelsSeriesModel.dependencies = ["grid", "polar", "geo", "singleAxis", "calendar"];
|
|
55069
|
+
LabelsSeriesModel.defaultOption = {
|
|
55070
|
+
coordinateSystem: "cartesian2d",
|
|
55071
|
+
z: 2,
|
|
55072
|
+
legendHoverLink: true,
|
|
55073
|
+
symbolSize: 10,
|
|
55074
|
+
large: false,
|
|
55075
|
+
largeThreshold: 2e3,
|
|
55076
|
+
itemStyle: {},
|
|
55077
|
+
emphasis: {
|
|
55078
|
+
scale: true
|
|
55079
|
+
},
|
|
55080
|
+
clip: true
|
|
55081
|
+
};
|
|
55082
|
+
var LabelsSeries_default = LabelsSeriesModel;
|
|
55083
|
+
|
|
55084
|
+
// src/chart/labels/LabelsView.ts
|
|
55085
|
+
var ScatterView4 = class extends Chart_default {
|
|
55086
|
+
constructor() {
|
|
55087
|
+
super(...arguments);
|
|
55088
|
+
this.type = ScatterView4.type;
|
|
55089
|
+
}
|
|
55090
|
+
render(seriesModel, ecModel, api2) {
|
|
55091
|
+
const data = seriesModel.getData();
|
|
55092
|
+
const symbolDraw = this._updateSymbolDraw(data, seriesModel);
|
|
55093
|
+
symbolDraw.updateData(data, {
|
|
55094
|
+
clipShape: this._getClipShape(seriesModel)
|
|
55095
|
+
});
|
|
55096
|
+
this._finished = true;
|
|
55097
|
+
}
|
|
55098
|
+
incrementalPrepareRender(seriesModel, ecModel, api2) {
|
|
55099
|
+
const data = seriesModel.getData();
|
|
55100
|
+
const symbolDraw = this._updateSymbolDraw(data, seriesModel);
|
|
55101
|
+
symbolDraw.incrementalPrepareUpdate(data);
|
|
55102
|
+
this._finished = false;
|
|
55103
|
+
}
|
|
55104
|
+
incrementalRender(taskParams, seriesModel, ecModel) {
|
|
55105
|
+
this._symbolDraw.incrementalUpdate(taskParams, seriesModel.getData(), {
|
|
55106
|
+
clipShape: this._getClipShape(seriesModel)
|
|
55107
|
+
});
|
|
55108
|
+
this._finished = taskParams.end === seriesModel.getData().count();
|
|
55109
|
+
}
|
|
55110
|
+
updateTransform(seriesModel, ecModel, api2) {
|
|
55111
|
+
const data = seriesModel.getData();
|
|
55112
|
+
this.group.dirty();
|
|
55113
|
+
if (!this._finished || data.count() > 1e4) {
|
|
55114
|
+
return {
|
|
55115
|
+
update: true
|
|
55116
|
+
};
|
|
55117
|
+
} else {
|
|
55118
|
+
const res = pointsLayout("").reset(seriesModel, ecModel, api2);
|
|
55119
|
+
if (res.progress) {
|
|
55120
|
+
res.progress({start: 0, end: data.count(), count: data.count()}, data);
|
|
55121
|
+
}
|
|
55122
|
+
this._symbolDraw.updateLayout(data);
|
|
55123
|
+
}
|
|
55124
|
+
}
|
|
55125
|
+
eachRendered(cb) {
|
|
55126
|
+
this._symbolDraw && this._symbolDraw.eachRendered(cb);
|
|
55127
|
+
}
|
|
55128
|
+
_getClipShape(seriesModel) {
|
|
55129
|
+
if (!seriesModel.get("clip", true)) {
|
|
55130
|
+
return;
|
|
55131
|
+
}
|
|
55132
|
+
const coordSys = seriesModel.coordinateSystem;
|
|
55133
|
+
return coordSys && coordSys.getArea && coordSys.getArea(0.1);
|
|
55134
|
+
}
|
|
55135
|
+
_updateSymbolDraw(data, seriesModel) {
|
|
55136
|
+
let symbolDraw = this._symbolDraw;
|
|
55137
|
+
const pipelineContext = seriesModel.pipelineContext;
|
|
55138
|
+
const isLargeDraw = pipelineContext.large;
|
|
55139
|
+
if (!symbolDraw || isLargeDraw !== this._isLargeDraw) {
|
|
55140
|
+
symbolDraw && symbolDraw.remove();
|
|
55141
|
+
symbolDraw = this._symbolDraw = isLargeDraw ? new LargeSymbolDraw_default() : new SymbolDraw_default();
|
|
55142
|
+
this._isLargeDraw = isLargeDraw;
|
|
55143
|
+
this.group.removeAll();
|
|
55144
|
+
}
|
|
55145
|
+
this.group.add(symbolDraw.group);
|
|
55146
|
+
return symbolDraw;
|
|
55147
|
+
}
|
|
55148
|
+
remove(ecModel, api2) {
|
|
55149
|
+
this._symbolDraw && this._symbolDraw.remove(true);
|
|
55150
|
+
this._symbolDraw = null;
|
|
55151
|
+
}
|
|
55152
|
+
dispose() {
|
|
55153
|
+
}
|
|
55154
|
+
};
|
|
55155
|
+
var ScatterView3 = ScatterView4;
|
|
55156
|
+
ScatterView3.type = "labels";
|
|
55157
|
+
var LabelsView_default = ScatterView3;
|
|
55158
|
+
|
|
55159
|
+
// src/util/symbolSize.ts
|
|
55160
|
+
var xCrossMapping = {
|
|
55161
|
+
huge: () => ({w: 61, h: 65}),
|
|
55162
|
+
large: () => ({w: 46, h: 39}),
|
|
55163
|
+
normal: () => ({w: 31, h: 27}),
|
|
55164
|
+
small: () => ({w: 25, h: 21}),
|
|
55165
|
+
tiny: () => ({w: 20, h: 17}),
|
|
55166
|
+
auto: (width) => {
|
|
55167
|
+
return {w: width, h: width};
|
|
55168
|
+
}
|
|
55169
|
+
};
|
|
55170
|
+
var lCrossMapping = {
|
|
55171
|
+
huge: () => ({w: 60, h: 50}),
|
|
55172
|
+
large: () => ({w: 46, h: 38}),
|
|
55173
|
+
normal: () => ({w: 30, h: 26}),
|
|
55174
|
+
small: () => ({w: 24, h: 20}),
|
|
55175
|
+
tiny: () => ({w: 18, h: 16}),
|
|
55176
|
+
auto: (width) => {
|
|
55177
|
+
return {w: width, h: width};
|
|
55178
|
+
}
|
|
55179
|
+
};
|
|
55180
|
+
var triangleMapping = {
|
|
55181
|
+
huge: () => ({w: 63, h: 51}),
|
|
55182
|
+
large: () => ({w: 47, h: 39}),
|
|
55183
|
+
normal: () => ({w: 33, h: 26}),
|
|
55184
|
+
small: () => ({w: 27, h: 21}),
|
|
55185
|
+
tiny: () => ({w: 21, h: 16}),
|
|
55186
|
+
auto: (width) => {
|
|
55187
|
+
return {w: width, h: Math.max(width - 6, 1)};
|
|
55188
|
+
}
|
|
55189
|
+
};
|
|
55190
|
+
var flagMapping = {
|
|
55191
|
+
huge: () => ({w: 61, h: 57}),
|
|
55192
|
+
large: () => ({w: 47, h: 43}),
|
|
55193
|
+
normal: () => ({w: 31, h: 29}),
|
|
55194
|
+
small: () => ({w: 25, h: 24}),
|
|
55195
|
+
tiny: () => ({w: 19, h: 18}),
|
|
55196
|
+
auto: (width) => {
|
|
55197
|
+
return {w: width, h: Math.max(width - 2, 1)};
|
|
55198
|
+
}
|
|
55199
|
+
};
|
|
55200
|
+
var circleMapping = {
|
|
55201
|
+
huge: () => ({w: 61, h: 61}),
|
|
55202
|
+
large: () => ({w: 47, h: 47}),
|
|
55203
|
+
normal: () => ({w: 31, h: 31}),
|
|
55204
|
+
small: () => ({w: 25, h: 25}),
|
|
55205
|
+
tiny: () => ({w: 19, h: 19}),
|
|
55206
|
+
auto: (width) => {
|
|
55207
|
+
return {w: width, h: width};
|
|
55208
|
+
}
|
|
55209
|
+
};
|
|
55210
|
+
var labelMapping = {
|
|
55211
|
+
huge: () => ({w: 33, h: 28, shape: {triangleWidth: 16}}),
|
|
55212
|
+
large: () => ({w: 25, h: 21, shape: {triangleWidth: 12}}),
|
|
55213
|
+
normal: () => ({w: 17, h: 14, shape: {triangleWidth: 8}}),
|
|
55214
|
+
small: () => ({w: 13, h: 11, shape: {triangleWidth: 6}}),
|
|
55215
|
+
tiny: () => ({w: 11, h: 9, shape: {triangleWidth: 5}}),
|
|
55216
|
+
auto: (width) => {
|
|
55217
|
+
return {w: width, h: width - 2, shape: {triangleWidth: Math.min(Math.max(width / 2, 4), 16)}};
|
|
55218
|
+
}
|
|
55219
|
+
};
|
|
55220
|
+
var labelAngleMapping = {
|
|
55221
|
+
huge: () => ({w: 33, h: 28, shape: {offsetY: 22, offsetX: 22, offsetWidth: 11}}),
|
|
55222
|
+
large: () => ({w: 25, h: 21, shape: {offsetY: 18, offsetX: 18, offsetWidth: 9}}),
|
|
55223
|
+
normal: () => ({w: 17, h: 14, shape: {offsetY: 12, offsetX: 12, offsetWidth: 6}}),
|
|
55224
|
+
small: () => ({w: 13, h: 11, shape: {offsetY: 8, offsetX: 8, offsetWidth: 4}}),
|
|
55225
|
+
tiny: () => ({w: 11, h: 9, shape: {offsetY: 8, offsetX: 8, offsetWidth: 4}}),
|
|
55226
|
+
auto: (width) => {
|
|
55227
|
+
const w = Math.min(Math.max(width / 2, 8), 22);
|
|
55228
|
+
return {w: width, h: width - 2, shape: {offsetY: w, offsetX: w, offsetWidth: Math.min(w / 2, 11)}};
|
|
55229
|
+
}
|
|
55230
|
+
};
|
|
55231
|
+
var rectMapping = {
|
|
55232
|
+
huge: () => ({w: 51, h: 51}),
|
|
55233
|
+
large: () => ({w: 39, h: 39}),
|
|
55234
|
+
normal: () => ({w: 27, h: 27}),
|
|
55235
|
+
small: () => ({w: 21, h: 21}),
|
|
55236
|
+
tiny: () => ({w: 17, h: 17}),
|
|
55237
|
+
auto: (width) => {
|
|
55238
|
+
return {w: width, h: width};
|
|
55239
|
+
}
|
|
55240
|
+
};
|
|
55241
|
+
var arrowMapping = {
|
|
55242
|
+
huge: () => ({w: 40, h: 45, shape: {triangleWidth: 12}}),
|
|
55243
|
+
large: () => ({w: 30, h: 35, shape: {triangleWidth: 8}}),
|
|
55244
|
+
normal: () => ({w: 25, h: 27, shape: {triangleWidth: 6}}),
|
|
55245
|
+
small: () => ({w: 17, h: 21, shape: {triangleWidth: 4}}),
|
|
55246
|
+
tiny: () => ({w: 15, h: 17, shape: {triangleWidth: 3}}),
|
|
55247
|
+
auto: (width) => {
|
|
55248
|
+
return {w: width, h: width + 4, shape: {triangleWidth: Math.max(width / 3, 3)}};
|
|
55249
|
+
}
|
|
55250
|
+
};
|
|
55251
|
+
var symbolSizeMapping = {
|
|
55252
|
+
xCross: xCrossMapping,
|
|
55253
|
+
lCross: lCrossMapping,
|
|
55254
|
+
triangle: triangleMapping,
|
|
55255
|
+
triangleDown: triangleMapping,
|
|
55256
|
+
flag: flagMapping,
|
|
55257
|
+
circle: circleMapping,
|
|
55258
|
+
labelUp: labelMapping,
|
|
55259
|
+
labelDown: labelMapping,
|
|
55260
|
+
labelLeft: labelMapping,
|
|
55261
|
+
labelRight: labelMapping,
|
|
55262
|
+
labelLowerLeft: labelAngleMapping,
|
|
55263
|
+
labelLowerRight: labelAngleMapping,
|
|
55264
|
+
labelUpperLeft: labelAngleMapping,
|
|
55265
|
+
labelUpperRight: labelAngleMapping,
|
|
55266
|
+
rect: rectMapping,
|
|
55267
|
+
diamond: rectMapping,
|
|
55268
|
+
arrowUp: arrowMapping,
|
|
55269
|
+
arrowDown: arrowMapping
|
|
55270
|
+
};
|
|
55271
|
+
function getSymbolSize2(type, size, width) {
|
|
55272
|
+
const fn = symbolSizeMapping[type]?.[size];
|
|
55273
|
+
return fn ? fn(width) : {w: 0, h: 0};
|
|
55274
|
+
}
|
|
55275
|
+
var labelFontSizeMapping = {
|
|
55276
|
+
huge: 22,
|
|
55277
|
+
large: 18,
|
|
55278
|
+
normal: 14,
|
|
55279
|
+
small: 10,
|
|
55280
|
+
tiny: 6
|
|
55281
|
+
};
|
|
55282
|
+
function getSymbolLabelFontSize(size, width) {
|
|
55283
|
+
if (size === "auto") {
|
|
55284
|
+
return Math.max(6, width / 2);
|
|
55285
|
+
}
|
|
55286
|
+
return labelFontSizeMapping[size] ?? 12;
|
|
55287
|
+
}
|
|
55288
|
+
|
|
55289
|
+
// src/chart/labels/labelsVisual.ts
|
|
55290
|
+
var SYMBOL_PROPS_WITH_CB2 = [
|
|
55291
|
+
"symbol",
|
|
55292
|
+
"symbolSize",
|
|
55293
|
+
"symbolRotate",
|
|
55294
|
+
"symbolOffset"
|
|
55295
|
+
];
|
|
55296
|
+
var SYMBOL_PROPS2 = SYMBOL_PROPS_WITH_CB2.concat([
|
|
55297
|
+
"symbolKeepAspect"
|
|
55298
|
+
]);
|
|
55299
|
+
var labelSymbols = ["labelDown", "labelUp", "labelLeft", "labelRight", "labelLowerLeft", "labelLowerRight", "labelUpperLeft", "labelUpperRight", "labelCenter"];
|
|
55300
|
+
var labelSymbolByType = {};
|
|
55301
|
+
each(labelSymbols, function(type) {
|
|
55302
|
+
labelSymbolByType[type] = 1;
|
|
55303
|
+
});
|
|
55304
|
+
var lineSymbols = ["xCross", "lCross"];
|
|
55305
|
+
var padding = 10;
|
|
55306
|
+
function changeLabelOffsetBySymbol(symbol, label, shape, oldOffset) {
|
|
55307
|
+
const [offsetX, offsetY] = [0, 0];
|
|
55308
|
+
switch (symbol) {
|
|
55309
|
+
case "labelDown":
|
|
55310
|
+
label.option.offset = [offsetX, offsetY - shape.triangleWidth / 2];
|
|
55311
|
+
break;
|
|
55312
|
+
case "labelUp":
|
|
55313
|
+
label.option.offset = [offsetX, offsetY + shape.triangleWidth / 2];
|
|
55314
|
+
break;
|
|
55315
|
+
case "labelLeft":
|
|
55316
|
+
label.option.offset = [offsetX + shape.triangleWidth / 2, offsetY];
|
|
55317
|
+
break;
|
|
55318
|
+
case "labelRight":
|
|
55319
|
+
label.option.offset = [offsetX - shape.triangleWidth / 2, offsetY];
|
|
55320
|
+
break;
|
|
55321
|
+
case "labelLowerLeft":
|
|
55322
|
+
label.option.offset = [offsetX + shape.offsetX / 2, offsetY - shape.offsetY / 2];
|
|
55323
|
+
break;
|
|
55324
|
+
case "labelLowerRight":
|
|
55325
|
+
label.option.offset = [offsetX - shape.offsetX / 2, offsetY - shape.offsetY / 2];
|
|
55326
|
+
break;
|
|
55327
|
+
case "labelUpperLeft":
|
|
55328
|
+
label.option.offset = [offsetX + shape.offsetX / 2, offsetY + shape.offsetY / 2];
|
|
55329
|
+
break;
|
|
55330
|
+
case "labelUpperRight":
|
|
55331
|
+
label.option.offset = [offsetX - shape.offsetX / 2, offsetY + shape.offsetY / 2];
|
|
55332
|
+
break;
|
|
55333
|
+
}
|
|
55334
|
+
}
|
|
55335
|
+
var LabelsLayout = {
|
|
55336
|
+
createOnAllSeries: true,
|
|
55337
|
+
performRawSeries: true,
|
|
55338
|
+
reset: function(seriesModel) {
|
|
55339
|
+
const bandWidth = Math.max(1, Math.round(seriesModel.coordinateSystem.getAxesByScale("ordinal")[0].scale.barSpace * 0.8));
|
|
55340
|
+
const data = seriesModel.getData();
|
|
55341
|
+
const symbolOptions = {};
|
|
55342
|
+
for (let i = 0; i < SYMBOL_PROPS_WITH_CB2.length; i++) {
|
|
55343
|
+
const symbolPropName = SYMBOL_PROPS_WITH_CB2[i];
|
|
55344
|
+
const val = seriesModel.get(symbolPropName);
|
|
55345
|
+
symbolOptions[symbolPropName] = val;
|
|
55346
|
+
}
|
|
55347
|
+
symbolOptions.symbol = symbolOptions.symbol || seriesModel.defaultSymbol;
|
|
55348
|
+
data.setVisual(extend({
|
|
55349
|
+
symbolKeepAspect: seriesModel.get("symbolKeepAspect")
|
|
55350
|
+
}, symbolOptions));
|
|
55351
|
+
function dataEach(data2, idx) {
|
|
55352
|
+
const itemModel = data2.getItemModel(idx);
|
|
55353
|
+
let symbol = itemModel.getShallow("symbol");
|
|
55354
|
+
let symbolSize = itemModel.getShallow("symbolSize");
|
|
55355
|
+
let symbolRotate = itemModel.getShallow("symbolRotate");
|
|
55356
|
+
let symbolOffset = itemModel.getShallow("symbolOffset");
|
|
55357
|
+
let symbolShape = {};
|
|
55358
|
+
const symbolKeepAspect = itemModel.getShallow("symbolKeepAspect");
|
|
55359
|
+
const style = itemModel.getModel("itemStyle").getItemStyle();
|
|
55360
|
+
let oldOffset = [];
|
|
55361
|
+
const labelModel = itemModel.getModel("label");
|
|
55362
|
+
const align = labelModel.get("align");
|
|
55363
|
+
const size = itemModel.get("size") ?? "normal";
|
|
55364
|
+
const text = labelModel.get("formatter");
|
|
55365
|
+
const isLabel = labelSymbolByType[symbol];
|
|
55366
|
+
const labelShow = labelModel.get("show");
|
|
55367
|
+
labelModel.option.position = isLabel ? "inside" : "top";
|
|
55368
|
+
labelModel.option.fontSize = getSymbolLabelFontSize(size, bandWidth);
|
|
55369
|
+
if (labelShow && text && (isLabel || ["left", "right"].includes(align))) {
|
|
55370
|
+
const rect = labelModel.getTextRect(text);
|
|
55371
|
+
if (isLabel) {
|
|
55372
|
+
symbolSize = [rect.width + padding, rect.height + padding];
|
|
55373
|
+
}
|
|
55374
|
+
const align2 = labelModel.get("align");
|
|
55375
|
+
if (align2 === "left") {
|
|
55376
|
+
labelModel.option.offset = oldOffset = [-rect.width / 2, 0];
|
|
55377
|
+
} else if (align2 === "right") {
|
|
55378
|
+
labelModel.option.offset = oldOffset = [rect.width / 2, 0];
|
|
55379
|
+
}
|
|
55380
|
+
}
|
|
55381
|
+
const {w, h, shape} = getSymbolSize2(symbol, size, bandWidth);
|
|
55382
|
+
if (isLabel ? !labelShow || !text : true) {
|
|
55383
|
+
symbolSize = [w, h];
|
|
55384
|
+
}
|
|
55385
|
+
if (shape) {
|
|
55386
|
+
symbolShape = shape;
|
|
55387
|
+
if (labelShow) {
|
|
55388
|
+
changeLabelOffsetBySymbol(symbol, labelModel, shape, oldOffset);
|
|
55389
|
+
}
|
|
55390
|
+
}
|
|
55391
|
+
if (lineSymbols.includes(symbol)) {
|
|
55392
|
+
style.stroke = style.fill;
|
|
55393
|
+
if (symbol === "lCross")
|
|
55394
|
+
style.lineWidth = 2;
|
|
55395
|
+
}
|
|
55396
|
+
data2.setItemVisual(idx, {
|
|
55397
|
+
symbol,
|
|
55398
|
+
symbolSize,
|
|
55399
|
+
symbolRotate,
|
|
55400
|
+
symbolOffset,
|
|
55401
|
+
symbolShape,
|
|
55402
|
+
symbolKeepAspect,
|
|
55403
|
+
style
|
|
55404
|
+
});
|
|
55405
|
+
}
|
|
55406
|
+
return {dataEach: data.hasItemOption ? dataEach : null};
|
|
55407
|
+
}
|
|
55408
|
+
};
|
|
55409
|
+
var labelsVisual_default = LabelsLayout;
|
|
55410
|
+
|
|
55411
|
+
// src/chart/labels/install.ts
|
|
55412
|
+
function install25(registers) {
|
|
55413
|
+
registers.registerSeriesModel(LabelsSeries_default);
|
|
55414
|
+
registers.registerChartView(LabelsView_default);
|
|
55415
|
+
registers.registerLayout(pointsLayout("labels"));
|
|
55416
|
+
registers.registerVisual(labelsVisual_default);
|
|
55417
|
+
}
|
|
55418
|
+
|
|
54435
55419
|
// src/chart/hlines/HLinesSeries.ts
|
|
54436
55420
|
var HLineSeriesModel2 = class extends Series_default {
|
|
54437
55421
|
constructor() {
|
|
@@ -54557,7 +55541,7 @@ var hLinesLayout = {
|
|
|
54557
55541
|
var hLinesLayout_default = hLinesLayout;
|
|
54558
55542
|
|
|
54559
55543
|
// src/chart/hlines/install.ts
|
|
54560
|
-
function
|
|
55544
|
+
function install26(registers) {
|
|
54561
55545
|
registers.registerChartView(HLinesView_default);
|
|
54562
55546
|
registers.registerSeriesModel(HLinesSeries_default);
|
|
54563
55547
|
registers.registerLayout(hLinesLayout_default);
|
|
@@ -54658,7 +55642,7 @@ var BgColorView2 = class extends Chart_default {
|
|
|
54658
55642
|
}
|
|
54659
55643
|
const bgColorGroup = this._bgColorGroup;
|
|
54660
55644
|
const width = Math.ceil(seriesModel.coordinateSystem.getBaseAxis().scale.barSpace);
|
|
54661
|
-
const isLine = width <=
|
|
55645
|
+
const isLine = width <= 8;
|
|
54662
55646
|
each(rectsByColor, function(rects, color2) {
|
|
54663
55647
|
const el = new BgColorPath_default({
|
|
54664
55648
|
shape: {
|
|
@@ -54684,7 +55668,10 @@ var BgColorView2 = class extends Chart_default {
|
|
|
54684
55668
|
traverseElements(this._bgColorGroup, cb);
|
|
54685
55669
|
}
|
|
54686
55670
|
remove(ecModel, api2) {
|
|
54687
|
-
|
|
55671
|
+
if (this._bgColorGroup) {
|
|
55672
|
+
this.group.remove(this._bgColorGroup);
|
|
55673
|
+
this._bgColorGroup = null;
|
|
55674
|
+
}
|
|
54688
55675
|
}
|
|
54689
55676
|
dispose(ecModel, api2) {
|
|
54690
55677
|
this.remove(ecModel, api2);
|
|
@@ -54753,7 +55740,7 @@ var bgColorLayout = {
|
|
|
54753
55740
|
var BgColorLayout_default = bgColorLayout;
|
|
54754
55741
|
|
|
54755
55742
|
// src/chart/bgColor/install.ts
|
|
54756
|
-
function
|
|
55743
|
+
function install27(registers) {
|
|
54757
55744
|
registers.registerChartView(BgColorView_default);
|
|
54758
55745
|
registers.registerSeriesModel(BgColorSeries_default);
|
|
54759
55746
|
registers.registerLayout(BgColorLayout_default);
|
|
@@ -55151,7 +56138,7 @@ HeatmapSeriesModel.defaultOption = {
|
|
|
55151
56138
|
var HeatmapSeries_default = HeatmapSeriesModel;
|
|
55152
56139
|
|
|
55153
56140
|
// src/chart/heatmap/install.ts
|
|
55154
|
-
function
|
|
56141
|
+
function install28(registers) {
|
|
55155
56142
|
registers.registerChartView(HeatmapView_default);
|
|
55156
56143
|
registers.registerSeriesModel(HeatmapSeries_default);
|
|
55157
56144
|
}
|
|
@@ -55714,7 +56701,7 @@ PictorialBarSeriesModel.defaultOption = inheritDefaultOption(BaseBarSeries_defau
|
|
|
55714
56701
|
var PictorialBarSeries_default = PictorialBarSeriesModel;
|
|
55715
56702
|
|
|
55716
56703
|
// src/chart/bar/installPictorialBar.ts
|
|
55717
|
-
function
|
|
56704
|
+
function install29(registers) {
|
|
55718
56705
|
registers.registerChartView(PictorialBarView_default);
|
|
55719
56706
|
registers.registerSeriesModel(PictorialBarSeries_default);
|
|
55720
56707
|
registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout2, "pictorialBar"));
|
|
@@ -56115,7 +57102,7 @@ function computeBaseline(data) {
|
|
|
56115
57102
|
}
|
|
56116
57103
|
|
|
56117
57104
|
// src/chart/themeRiver/install.ts
|
|
56118
|
-
function
|
|
57105
|
+
function install30(registers) {
|
|
56119
57106
|
registers.registerChartView(ThemeRiverView_default);
|
|
56120
57107
|
registers.registerSeriesModel(ThemeRiverSeries_default);
|
|
56121
57108
|
registers.registerLayout(themeRiverLayout);
|
|
@@ -56753,7 +57740,7 @@ function sunburstVisual(ecModel) {
|
|
|
56753
57740
|
}
|
|
56754
57741
|
|
|
56755
57742
|
// src/chart/sunburst/install.ts
|
|
56756
|
-
function
|
|
57743
|
+
function install31(registers) {
|
|
56757
57744
|
registers.registerChartView(SunburstView_default);
|
|
56758
57745
|
registers.registerSeriesModel(SunburstSeries_default);
|
|
56759
57746
|
registers.registerLayout(curry(sunburstLayout, "sunburst"));
|
|
@@ -58201,7 +59188,7 @@ function hasOwnPathData(shape) {
|
|
|
58201
59188
|
}
|
|
58202
59189
|
|
|
58203
59190
|
// src/chart/custom/install.ts
|
|
58204
|
-
function
|
|
59191
|
+
function install32(registers) {
|
|
58205
59192
|
registers.registerChartView(CustomView_default);
|
|
58206
59193
|
registers.registerSeriesModel(CustomSeries_default);
|
|
58207
59194
|
}
|
|
@@ -59419,7 +60406,7 @@ function illegalPoint(point) {
|
|
|
59419
60406
|
}
|
|
59420
60407
|
|
|
59421
60408
|
// src/component/axisPointer/install.ts
|
|
59422
|
-
function
|
|
60409
|
+
function install33(registers) {
|
|
59423
60410
|
AxisView_default.registerAxisPointerClass("CartesianAxisPointer", CartesianAxisPointer_default);
|
|
59424
60411
|
registers.registerComponentModel(AxisPointerModel_default);
|
|
59425
60412
|
registers.registerComponentView(AxisPointerView_default);
|
|
@@ -59448,9 +60435,9 @@ function install32(registers) {
|
|
|
59448
60435
|
}
|
|
59449
60436
|
|
|
59450
60437
|
// src/component/grid/install.ts
|
|
59451
|
-
function
|
|
60438
|
+
function install34(registers) {
|
|
59452
60439
|
use(install6);
|
|
59453
|
-
use(
|
|
60440
|
+
use(install33);
|
|
59454
60441
|
}
|
|
59455
60442
|
|
|
59456
60443
|
// src/component/axisPointer/PolarAxisPointer.ts
|
|
@@ -60504,8 +61491,8 @@ var PolarView2 = class extends Component_default2 {
|
|
|
60504
61491
|
};
|
|
60505
61492
|
var PolarView = PolarView2;
|
|
60506
61493
|
PolarView.type = "polar";
|
|
60507
|
-
function
|
|
60508
|
-
use(
|
|
61494
|
+
function install35(registers) {
|
|
61495
|
+
use(install33);
|
|
60509
61496
|
AxisView_default.registerAxisPointerClass("PolarAxisPointer", PolarAxisPointer_default);
|
|
60510
61497
|
registers.registerCoordinateSystem("polar", polarCreator_default);
|
|
60511
61498
|
registers.registerComponentModel(PolarModel_default);
|
|
@@ -60968,8 +61955,8 @@ var SingleView2 = class extends Component_default2 {
|
|
|
60968
61955
|
};
|
|
60969
61956
|
var SingleView = SingleView2;
|
|
60970
61957
|
SingleView.type = "single";
|
|
60971
|
-
function
|
|
60972
|
-
use(
|
|
61958
|
+
function install36(registers) {
|
|
61959
|
+
use(install33);
|
|
60973
61960
|
AxisView_default.registerAxisPointerClass("SingleAxisPointer", SingleAxisPointer_default);
|
|
60974
61961
|
registers.registerComponentView(SingleView);
|
|
60975
61962
|
registers.registerComponentView(SingleAxisView_default);
|
|
@@ -61659,7 +62646,7 @@ function getCoordSys5(finder) {
|
|
|
61659
62646
|
var Calendar_default = Calendar;
|
|
61660
62647
|
|
|
61661
62648
|
// src/component/calendar/install.ts
|
|
61662
|
-
function
|
|
62649
|
+
function install37(registers) {
|
|
61663
62650
|
registers.registerComponentModel(CalendarModel_default);
|
|
61664
62651
|
registers.registerComponentView(CalendarView_default);
|
|
61665
62652
|
registers.registerCoordinateSystem("calendar", Calendar_default);
|
|
@@ -62048,7 +63035,7 @@ function setEventData(el, graphicModel, elOption) {
|
|
|
62048
63035
|
}
|
|
62049
63036
|
|
|
62050
63037
|
// src/component/graphic/install.ts
|
|
62051
|
-
function
|
|
63038
|
+
function install38(registers) {
|
|
62052
63039
|
registers.registerComponentModel(GraphicComponentModel);
|
|
62053
63040
|
registers.registerComponentView(GraphicComponentView);
|
|
62054
63041
|
registers.registerPreprocessor(function(option) {
|
|
@@ -62902,7 +63889,7 @@ function installCommon(registers) {
|
|
|
62902
63889
|
}
|
|
62903
63890
|
|
|
62904
63891
|
// src/component/dataZoom/installDataZoomSelect.ts
|
|
62905
|
-
function
|
|
63892
|
+
function install39(registers) {
|
|
62906
63893
|
registers.registerComponentModel(SelectZoomModel_default);
|
|
62907
63894
|
registers.registerComponentView(SelectZoomView_default);
|
|
62908
63895
|
installCommon(registers);
|
|
@@ -62978,22 +63965,22 @@ var ToolboxModel_default = ToolboxModel;
|
|
|
62978
63965
|
// src/component/helper/listComponent.ts
|
|
62979
63966
|
function layout13(group, componentModel, api2) {
|
|
62980
63967
|
const boxLayoutParams = componentModel.getBoxLayoutParams();
|
|
62981
|
-
const
|
|
63968
|
+
const padding2 = componentModel.get("padding");
|
|
62982
63969
|
const viewportSize = {width: api2.getWidth(), height: api2.getHeight()};
|
|
62983
|
-
const rect = getLayoutRect(boxLayoutParams, viewportSize,
|
|
63970
|
+
const rect = getLayoutRect(boxLayoutParams, viewportSize, padding2);
|
|
62984
63971
|
box(componentModel.get("orient"), group, componentModel.get("itemGap"), rect.width, rect.height);
|
|
62985
|
-
positionElement(group, boxLayoutParams, viewportSize,
|
|
63972
|
+
positionElement(group, boxLayoutParams, viewportSize, padding2);
|
|
62986
63973
|
}
|
|
62987
63974
|
function makeBackground(rect, componentModel) {
|
|
62988
|
-
const
|
|
63975
|
+
const padding2 = normalizeCssArray2(componentModel.get("padding"));
|
|
62989
63976
|
const style = componentModel.getItemStyle(["color", "opacity"]);
|
|
62990
63977
|
style.fill = componentModel.get("backgroundColor");
|
|
62991
63978
|
rect = new Rect_default({
|
|
62992
63979
|
shape: {
|
|
62993
|
-
x: rect.x -
|
|
62994
|
-
y: rect.y -
|
|
62995
|
-
width: rect.width +
|
|
62996
|
-
height: rect.height +
|
|
63980
|
+
x: rect.x - padding2[3],
|
|
63981
|
+
y: rect.y - padding2[0],
|
|
63982
|
+
width: rect.width + padding2[1] + padding2[3],
|
|
63983
|
+
height: rect.height + padding2[0] + padding2[2],
|
|
62997
63984
|
r: componentModel.get("borderRadius")
|
|
62998
63985
|
},
|
|
62999
63986
|
style,
|
|
@@ -64302,7 +65289,7 @@ registerInternalOptionCreator("dataZoom", function(ecModel) {
|
|
|
64302
65289
|
var DataZoom_default = DataZoomFeature;
|
|
64303
65290
|
|
|
64304
65291
|
// src/component/toolbox/install.ts
|
|
64305
|
-
function
|
|
65292
|
+
function install40(registers) {
|
|
64306
65293
|
registers.registerComponentModel(ToolboxModel_default);
|
|
64307
65294
|
registers.registerComponentView(ToolboxView_default);
|
|
64308
65295
|
registerFeature("saveAsImage", SaveAsImage_default);
|
|
@@ -64310,7 +65297,7 @@ function install39(registers) {
|
|
|
64310
65297
|
registerFeature("dataView", DataView_default);
|
|
64311
65298
|
registerFeature("dataZoom", DataZoom_default);
|
|
64312
65299
|
registerFeature("restore", Restore_default);
|
|
64313
|
-
use(
|
|
65300
|
+
use(install39);
|
|
64314
65301
|
}
|
|
64315
65302
|
|
|
64316
65303
|
// src/component/tooltip/TooltipModel.ts
|
|
@@ -64488,7 +65475,7 @@ function assembleCssText(tooltipModel, enableTransition, onlyFade) {
|
|
|
64488
65475
|
const shadowOffsetX = tooltipModel.get("shadowOffsetX");
|
|
64489
65476
|
const shadowOffsetY = tooltipModel.get("shadowOffsetY");
|
|
64490
65477
|
const textStyleModel = tooltipModel.getModel("textStyle");
|
|
64491
|
-
const
|
|
65478
|
+
const padding2 = getPaddingFromTooltipModel(tooltipModel, "html");
|
|
64492
65479
|
const boxShadow = `${shadowOffsetX}px ${shadowOffsetY}px ${shadowBlur}px ${shadowColor}`;
|
|
64493
65480
|
cssText.push("box-shadow:" + boxShadow);
|
|
64494
65481
|
enableTransition && transitionDuration && cssText.push(assembleTransition(transitionDuration, onlyFade));
|
|
@@ -64502,8 +65489,8 @@ function assembleCssText(tooltipModel, enableTransition, onlyFade) {
|
|
|
64502
65489
|
val != null && cssText.push(borderName + ":" + val + (name === "color" ? "" : "px"));
|
|
64503
65490
|
});
|
|
64504
65491
|
cssText.push(assembleFont(textStyleModel));
|
|
64505
|
-
if (
|
|
64506
|
-
cssText.push("padding:" + normalizeCssArray2(
|
|
65492
|
+
if (padding2 != null) {
|
|
65493
|
+
cssText.push("padding:" + normalizeCssArray2(padding2).join("px ") + "px");
|
|
64507
65494
|
}
|
|
64508
65495
|
return cssText.join(";") + ";";
|
|
64509
65496
|
}
|
|
@@ -65478,8 +66465,8 @@ function findComponentReference(payload, ecModel, api2) {
|
|
|
65478
66465
|
var TooltipView_default = TooltipView;
|
|
65479
66466
|
|
|
65480
66467
|
// src/component/tooltip/install.ts
|
|
65481
|
-
function
|
|
65482
|
-
use(
|
|
66468
|
+
function install41(registers) {
|
|
66469
|
+
use(install33);
|
|
65483
66470
|
registers.registerComponentModel(TooltipModel_default);
|
|
65484
66471
|
registers.registerComponentView(TooltipView_default);
|
|
65485
66472
|
registers.registerAction({
|
|
@@ -66095,7 +67082,7 @@ var BrushFeature = class extends ToolboxFeature {
|
|
|
66095
67082
|
var Brush_default = BrushFeature;
|
|
66096
67083
|
|
|
66097
67084
|
// src/component/brush/install.ts
|
|
66098
|
-
function
|
|
67085
|
+
function install42(registers) {
|
|
66099
67086
|
registers.registerComponentView(BrushView_default);
|
|
66100
67087
|
registers.registerComponentModel(BrushModel_default);
|
|
66101
67088
|
registers.registerPreprocessor(brushPreprocessor);
|
|
@@ -66242,7 +67229,7 @@ var TitleView2 = class extends Component_default2 {
|
|
|
66242
67229
|
};
|
|
66243
67230
|
var TitleView = TitleView2;
|
|
66244
67231
|
TitleView.type = "title";
|
|
66245
|
-
function
|
|
67232
|
+
function install43(registers) {
|
|
66246
67233
|
registers.registerComponentModel(TitleModel);
|
|
66247
67234
|
registers.registerComponentView(TitleView);
|
|
66248
67235
|
}
|
|
@@ -67096,7 +68083,7 @@ function has(obj, attr) {
|
|
|
67096
68083
|
}
|
|
67097
68084
|
|
|
67098
68085
|
// src/component/timeline/install.ts
|
|
67099
|
-
function
|
|
68086
|
+
function install44(registers) {
|
|
67100
68087
|
registers.registerComponentModel(SliderTimelineModel_default);
|
|
67101
68088
|
registers.registerComponentView(SliderTimelineView_default);
|
|
67102
68089
|
registers.registerSubTypeDefaulter("timeline", function() {
|
|
@@ -67537,7 +68524,7 @@ function createData(coordSys, seriesModel, mpModel) {
|
|
|
67537
68524
|
var MarkPointView_default = MarkPointView;
|
|
67538
68525
|
|
|
67539
68526
|
// src/component/marker/installMarkPoint.ts
|
|
67540
|
-
function
|
|
68527
|
+
function install45(registers) {
|
|
67541
68528
|
registers.registerComponentModel(MarkPointModel_default);
|
|
67542
68529
|
registers.registerComponentView(MarkPointView_default);
|
|
67543
68530
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -67855,7 +68842,7 @@ function createList2(coordSys, seriesModel, mlModel) {
|
|
|
67855
68842
|
var MarkLineView_default = MarkLineView;
|
|
67856
68843
|
|
|
67857
68844
|
// src/component/marker/installMarkLine.ts
|
|
67858
|
-
function
|
|
68845
|
+
function install46(registers) {
|
|
67859
68846
|
registers.registerComponentModel(MarkLineModel_default);
|
|
67860
68847
|
registers.registerComponentView(MarkLineView_default);
|
|
67861
68848
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -68169,7 +69156,7 @@ function createList3(coordSys, seriesModel, maModel) {
|
|
|
68169
69156
|
var MarkAreaView_default = MarkAreaView;
|
|
68170
69157
|
|
|
68171
69158
|
// src/component/marker/installMarkArea.ts
|
|
68172
|
-
function
|
|
69159
|
+
function install47(registers) {
|
|
68173
69160
|
registers.registerComponentModel(MarkAreaModel_default);
|
|
68174
69161
|
registers.registerComponentView(MarkAreaView_default);
|
|
68175
69162
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -68765,7 +69752,7 @@ function updateLabel({x, y, labelData, markerModel, gridRect, position: position
|
|
|
68765
69752
|
var MarkLabelView_default = MarkLabelView;
|
|
68766
69753
|
|
|
68767
69754
|
// src/component/marker/installMarkLabel.ts
|
|
68768
|
-
function
|
|
69755
|
+
function install48(registers) {
|
|
68769
69756
|
registers.registerComponentModel(MarkLabelModal_default);
|
|
68770
69757
|
registers.registerComponentView(MarkLabelView_default);
|
|
68771
69758
|
registers.registerPreprocessor(function(opt) {
|
|
@@ -69047,13 +70034,13 @@ var LegendView2 = class extends Component_default2 {
|
|
|
69047
70034
|
this.renderInner(itemAlign, legendModel, ecModel, api2, selector2, orient, selectorPosition);
|
|
69048
70035
|
const positionInfo = legendModel.getBoxLayoutParams();
|
|
69049
70036
|
const viewportSize = {width: api2.getWidth(), height: api2.getHeight()};
|
|
69050
|
-
const
|
|
69051
|
-
const maxSize = getLayoutRect(positionInfo, viewportSize,
|
|
70037
|
+
const padding2 = legendModel.get("padding");
|
|
70038
|
+
const maxSize = getLayoutRect(positionInfo, viewportSize, padding2);
|
|
69052
70039
|
const mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector2, selectorPosition);
|
|
69053
70040
|
const layoutRect = getLayoutRect(defaults({
|
|
69054
70041
|
width: mainRect.width,
|
|
69055
70042
|
height: mainRect.height
|
|
69056
|
-
}, positionInfo), viewportSize,
|
|
70043
|
+
}, positionInfo), viewportSize, padding2);
|
|
69057
70044
|
this.group.x = layoutRect.x - mainRect.x;
|
|
69058
70045
|
this.group.y = layoutRect.y - mainRect.y;
|
|
69059
70046
|
this.group.markRedraw();
|
|
@@ -69447,7 +70434,7 @@ function installLegendAction(registers) {
|
|
|
69447
70434
|
}
|
|
69448
70435
|
|
|
69449
70436
|
// src/component/legend/installLegendPlain.ts
|
|
69450
|
-
function
|
|
70437
|
+
function install49(registers) {
|
|
69451
70438
|
registers.registerComponentModel(LegendModel_default);
|
|
69452
70439
|
registers.registerComponentView(LegendView_default);
|
|
69453
70440
|
registers.registerProcessor(registers.PRIORITY.PROCESSOR.SERIES_FILTER, legendFilter);
|
|
@@ -69777,17 +70764,17 @@ function installScrollableLegendAction(registers) {
|
|
|
69777
70764
|
}
|
|
69778
70765
|
|
|
69779
70766
|
// src/component/legend/installLegendScroll.ts
|
|
69780
|
-
function
|
|
69781
|
-
use(
|
|
70767
|
+
function install50(registers) {
|
|
70768
|
+
use(install49);
|
|
69782
70769
|
registers.registerComponentModel(ScrollableLegendModel_default);
|
|
69783
70770
|
registers.registerComponentView(ScrollableLegendView_default);
|
|
69784
70771
|
installScrollableLegendAction(registers);
|
|
69785
70772
|
}
|
|
69786
70773
|
|
|
69787
70774
|
// src/component/legend/install.ts
|
|
69788
|
-
function
|
|
69789
|
-
use(install48);
|
|
70775
|
+
function install51(registers) {
|
|
69790
70776
|
use(install49);
|
|
70777
|
+
use(install50);
|
|
69791
70778
|
}
|
|
69792
70779
|
|
|
69793
70780
|
// src/component/dataZoom/InsideZoomModel.ts
|
|
@@ -70203,7 +71190,7 @@ var getDirectionInfo = {
|
|
|
70203
71190
|
var InsideZoomView_default = InsideZoomView;
|
|
70204
71191
|
|
|
70205
71192
|
// src/component/dataZoom/installDataZoomInside.ts
|
|
70206
|
-
function
|
|
71193
|
+
function install52(registers) {
|
|
70207
71194
|
installCommon(registers);
|
|
70208
71195
|
registers.registerComponentModel(InsideZoomModel_default);
|
|
70209
71196
|
registers.registerComponentView(InsideZoomView_default);
|
|
@@ -70959,16 +71946,16 @@ function getCursor(orient) {
|
|
|
70959
71946
|
var SliderZoomView_default = SliderZoomView;
|
|
70960
71947
|
|
|
70961
71948
|
// src/component/dataZoom/installDataZoomSlider.ts
|
|
70962
|
-
function
|
|
71949
|
+
function install53(registers) {
|
|
70963
71950
|
registers.registerComponentModel(SliderZoomModel_default);
|
|
70964
71951
|
registers.registerComponentView(SliderZoomView_default);
|
|
70965
71952
|
installCommon(registers);
|
|
70966
71953
|
}
|
|
70967
71954
|
|
|
70968
71955
|
// src/component/dataZoom/install.ts
|
|
70969
|
-
function
|
|
70970
|
-
use(install51);
|
|
71956
|
+
function install54(registers) {
|
|
70971
71957
|
use(install52);
|
|
71958
|
+
use(install53);
|
|
70972
71959
|
}
|
|
70973
71960
|
|
|
70974
71961
|
// src/visual/visualDefault.ts
|
|
@@ -71452,16 +72439,16 @@ var VisualMapView2 = class extends Component_default2 {
|
|
|
71452
72439
|
}
|
|
71453
72440
|
renderBackground(group) {
|
|
71454
72441
|
const visualMapModel = this.visualMapModel;
|
|
71455
|
-
const
|
|
72442
|
+
const padding2 = normalizeCssArray2(visualMapModel.get("padding") || 0);
|
|
71456
72443
|
const rect = group.getBoundingRect();
|
|
71457
72444
|
group.add(new Rect_default({
|
|
71458
72445
|
z2: -1,
|
|
71459
72446
|
silent: true,
|
|
71460
72447
|
shape: {
|
|
71461
|
-
x: rect.x -
|
|
71462
|
-
y: rect.y -
|
|
71463
|
-
width: rect.width +
|
|
71464
|
-
height: rect.height +
|
|
72448
|
+
x: rect.x - padding2[3],
|
|
72449
|
+
y: rect.y - padding2[0],
|
|
72450
|
+
width: rect.width + padding2[3] + padding2[1],
|
|
72451
|
+
height: rect.height + padding2[0] + padding2[2]
|
|
71465
72452
|
},
|
|
71466
72453
|
style: {
|
|
71467
72454
|
fill: visualMapModel.get("backgroundColor"),
|
|
@@ -72233,7 +73220,7 @@ function installCommon2(registers) {
|
|
|
72233
73220
|
}
|
|
72234
73221
|
|
|
72235
73222
|
// src/component/visualMap/installVisualMapContinuous.ts
|
|
72236
|
-
function
|
|
73223
|
+
function install55(registers) {
|
|
72237
73224
|
registers.registerComponentModel(ContinuousModel_default);
|
|
72238
73225
|
registers.registerComponentView(ContinuousView_default);
|
|
72239
73226
|
installCommon2(registers);
|
|
@@ -72673,16 +73660,16 @@ PiecewiseVisualMapView.type = "visualMap.piecewise";
|
|
|
72673
73660
|
var PiecewiseView_default = PiecewiseVisualMapView;
|
|
72674
73661
|
|
|
72675
73662
|
// src/component/visualMap/installVisualMapPiecewise.ts
|
|
72676
|
-
function
|
|
73663
|
+
function install56(registers) {
|
|
72677
73664
|
registers.registerComponentModel(PiecewiseModel_default);
|
|
72678
73665
|
registers.registerComponentView(PiecewiseView_default);
|
|
72679
73666
|
installCommon2(registers);
|
|
72680
73667
|
}
|
|
72681
73668
|
|
|
72682
73669
|
// src/component/visualMap/install.ts
|
|
72683
|
-
function
|
|
72684
|
-
use(install54);
|
|
73670
|
+
function install57(registers) {
|
|
72685
73671
|
use(install55);
|
|
73672
|
+
use(install56);
|
|
72686
73673
|
}
|
|
72687
73674
|
|
|
72688
73675
|
// src/visual/aria.ts
|
|
@@ -72878,7 +73865,7 @@ function ariaPreprocessor(option) {
|
|
|
72878
73865
|
}
|
|
72879
73866
|
|
|
72880
73867
|
// src/component/aria/install.ts
|
|
72881
|
-
function
|
|
73868
|
+
function install58(registers) {
|
|
72882
73869
|
registers.registerPreprocessor(ariaPreprocessor);
|
|
72883
73870
|
registers.registerVisual(registers.PRIORITY.VISUAL.ARIA, ariaVisual);
|
|
72884
73871
|
}
|
|
@@ -73216,7 +74203,7 @@ var sortTransform = {
|
|
|
73216
74203
|
};
|
|
73217
74204
|
|
|
73218
74205
|
// src/component/transform/install.ts
|
|
73219
|
-
function
|
|
74206
|
+
function install59(registers) {
|
|
73220
74207
|
registers.registerTransform(filterTransform);
|
|
73221
74208
|
registers.registerTransform(sortTransform);
|
|
73222
74209
|
}
|
|
@@ -73254,7 +74241,7 @@ var DatasetView = class extends Component_default2 {
|
|
|
73254
74241
|
}
|
|
73255
74242
|
};
|
|
73256
74243
|
DatasetView.type = "dataset";
|
|
73257
|
-
function
|
|
74244
|
+
function install60(registers) {
|
|
73258
74245
|
registers.registerComponentModel(DatasetModel);
|
|
73259
74246
|
registers.registerComponentView(DatasetView);
|
|
73260
74247
|
}
|
|
@@ -74976,35 +75963,36 @@ use([
|
|
|
74976
75963
|
install28,
|
|
74977
75964
|
install29,
|
|
74978
75965
|
install30,
|
|
74979
|
-
install31
|
|
75966
|
+
install31,
|
|
75967
|
+
install32
|
|
74980
75968
|
]);
|
|
74981
|
-
use(install33);
|
|
74982
75969
|
use(install34);
|
|
74983
|
-
use(install10);
|
|
74984
75970
|
use(install35);
|
|
74985
|
-
use(
|
|
75971
|
+
use(install10);
|
|
74986
75972
|
use(install36);
|
|
75973
|
+
use(install17);
|
|
74987
75974
|
use(install37);
|
|
74988
|
-
use(
|
|
75975
|
+
use(install38);
|
|
74989
75976
|
use(install40);
|
|
74990
|
-
use(install32);
|
|
74991
75977
|
use(install41);
|
|
75978
|
+
use(install33);
|
|
74992
75979
|
use(install42);
|
|
74993
75980
|
use(install43);
|
|
74994
75981
|
use(install44);
|
|
74995
75982
|
use(install45);
|
|
74996
75983
|
use(install46);
|
|
74997
75984
|
use(install47);
|
|
74998
|
-
use(
|
|
74999
|
-
use(install53);
|
|
75985
|
+
use(install48);
|
|
75000
75986
|
use(install51);
|
|
75001
|
-
use(install52);
|
|
75002
|
-
use(install56);
|
|
75003
75987
|
use(install54);
|
|
75004
|
-
use(
|
|
75988
|
+
use(install52);
|
|
75989
|
+
use(install53);
|
|
75005
75990
|
use(install57);
|
|
75991
|
+
use(install55);
|
|
75992
|
+
use(install56);
|
|
75006
75993
|
use(install58);
|
|
75007
75994
|
use(install59);
|
|
75995
|
+
use(install60);
|
|
75008
75996
|
use(installUniversalTransition);
|
|
75009
75997
|
use(installLabelLayout);
|
|
75010
75998
|
|