tvcharts 0.6.98 → 0.6.99
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
CHANGED
|
@@ -55728,6 +55728,7 @@ function getVisualGradient2(data, coordSys, api2) {
|
|
|
55728
55728
|
function getAreaGradient(data, seriesModel, api2) {
|
|
55729
55729
|
const colorStopsInRange = [];
|
|
55730
55730
|
const areaGradient = seriesModel.get("areaGradient");
|
|
55731
|
+
const height = api2.getHeight();
|
|
55731
55732
|
const valueByType = {
|
|
55732
55733
|
start: 0,
|
|
55733
55734
|
end: 1
|
|
@@ -55737,10 +55738,8 @@ function getAreaGradient(data, seriesModel, api2) {
|
|
|
55737
55738
|
}
|
|
55738
55739
|
const coordSys = seriesModel.coordinateSystem;
|
|
55739
55740
|
const axis = coordSys.getAxis("y");
|
|
55740
|
-
const extent3 = axis.getExtent();
|
|
55741
|
-
const span = extent3[1] - extent3[0];
|
|
55742
55741
|
each(areaGradient, function(item) {
|
|
55743
|
-
const offset = valueByType[item.type] ?? axis.toGlobalCoord(axis.dataToCoord(item.value)) /
|
|
55742
|
+
const offset = valueByType[item.type] ?? axis.toGlobalCoord(axis.dataToCoord(item.value)) / height;
|
|
55744
55743
|
if (offset < 0 || offset > 1) {
|
|
55745
55744
|
return;
|
|
55746
55745
|
}
|
|
@@ -55749,7 +55748,7 @@ function getAreaGradient(data, seriesModel, api2) {
|
|
|
55749
55748
|
offset
|
|
55750
55749
|
});
|
|
55751
55750
|
});
|
|
55752
|
-
const gradient = new LinearGradient_default(0,
|
|
55751
|
+
const gradient = new LinearGradient_default(0, 0, 0, height, colorStopsInRange, true);
|
|
55753
55752
|
return gradient;
|
|
55754
55753
|
}
|
|
55755
55754
|
var LinesPlotView2 = class extends Chart_default {
|
|
@@ -55831,6 +55830,7 @@ var LinesPlotView2 = class extends Chart_default {
|
|
|
55831
55830
|
const z2 = seriesModel.get("z2");
|
|
55832
55831
|
const baseY = seriesModel.coordinateSystem.dataToPoint([0, histbase])[1];
|
|
55833
55832
|
const visualColor = getAreaGradient(data, seriesModel, api2);
|
|
55833
|
+
console.log("%c [ visualColor ]-353", "font-size:13px; background:pink; color:#bf2c9f;", visualColor);
|
|
55834
55834
|
each(linePointsByKey, function(item, key) {
|
|
55835
55835
|
const [stroke] = key.split(":");
|
|
55836
55836
|
const {color: color2, isDefaultColor} = getFormatColor(stroke);
|
|
@@ -57219,8 +57219,8 @@ var MinePolyLinesLayout = {
|
|
|
57219
57219
|
const linesPointLayouts = [];
|
|
57220
57220
|
for (let i = params.start; i < params.end; i++) {
|
|
57221
57221
|
const itemModel = data.getItemModel(i);
|
|
57222
|
-
const {width, color: color2, lineStyle, fill = "none", closed = false, curved = false} = itemModel.get("itemStyle");
|
|
57223
|
-
if (
|
|
57222
|
+
const {width, color: color2 = "none", lineStyle, fill = "none", closed = false, curved = false} = itemModel.get("itemStyle");
|
|
57223
|
+
if (color2 === "none" && fill === "none") {
|
|
57224
57224
|
continue;
|
|
57225
57225
|
}
|
|
57226
57226
|
const key = `${color2}:${width}:${lineStyle}:${fill}:${closed}:${curved}`;
|
|
@@ -57812,7 +57812,7 @@ var BoxesLayout = {
|
|
|
57812
57812
|
text_valign,
|
|
57813
57813
|
text_wrap
|
|
57814
57814
|
} = itemModel.get("itemStyle");
|
|
57815
|
-
if (!border_color) {
|
|
57815
|
+
if (!border_color && !text && !bgcolor) {
|
|
57816
57816
|
continue;
|
|
57817
57817
|
}
|
|
57818
57818
|
const key = `${border_color}:${border_width}:${style}:${bgcolor}`;
|
|
@@ -71762,21 +71762,21 @@ function getAlign(str) {
|
|
|
71762
71762
|
function getTextXOffset(width, align, paddings) {
|
|
71763
71763
|
switch (align) {
|
|
71764
71764
|
case "center":
|
|
71765
|
-
return width / 2
|
|
71765
|
+
return width / 2;
|
|
71766
71766
|
case "right":
|
|
71767
|
-
return width
|
|
71767
|
+
return width - paddings;
|
|
71768
71768
|
default:
|
|
71769
|
-
return
|
|
71769
|
+
return paddings;
|
|
71770
71770
|
}
|
|
71771
71771
|
}
|
|
71772
71772
|
function getTextYOffset(height, align, paddings) {
|
|
71773
71773
|
switch (align) {
|
|
71774
71774
|
case "middle":
|
|
71775
|
-
return height / 2
|
|
71775
|
+
return height / 2;
|
|
71776
71776
|
case "bottom":
|
|
71777
|
-
return height
|
|
71777
|
+
return height - paddings;
|
|
71778
71778
|
default:
|
|
71779
|
-
return
|
|
71779
|
+
return paddings;
|
|
71780
71780
|
}
|
|
71781
71781
|
}
|
|
71782
71782
|
function getXYByPosition(rect, position2, width, height, frame_width = 0) {
|
|
@@ -71872,15 +71872,20 @@ var TableView2 = class extends Component_default2 {
|
|
|
71872
71872
|
font
|
|
71873
71873
|
});
|
|
71874
71874
|
const textRect = computedText.getBoundingRect();
|
|
71875
|
-
const textHight = height2 ? height2 / 100 * rect.height : textRect.height;
|
|
71876
|
-
const textWidth = width2 ? width2 / 100 * rect.width : textRect.width + 2;
|
|
71877
|
-
|
|
71875
|
+
const textHight = height2 ? Math.max(height2 / 100 * rect.height, 1) : textRect.height + paddings;
|
|
71876
|
+
const textWidth = width2 ? Math.max(width2 / 100 * rect.width, 1) : textRect.width + 2 + paddings;
|
|
71877
|
+
const isMergeColumn = mergeCell && mergeCell.start_column !== mergeCell.end_column;
|
|
71878
|
+
const isMergeRow = mergeCell && mergeCell.start_row !== mergeCell.end_row;
|
|
71879
|
+
if (isMergeColumn) {
|
|
71878
71880
|
columnWidthByIndex[column] = Math.floor(Math.max(0, columnWidthByIndex[column] || 0));
|
|
71881
|
+
} else {
|
|
71882
|
+
columnWidthByIndex[column] = Math.floor(Math.max(textWidth, columnWidthByIndex[column] || 0));
|
|
71883
|
+
}
|
|
71884
|
+
if (isMergeRow) {
|
|
71885
|
+
rowHeightByIndex[row] = Math.floor(Math.max(0, rowHeightByIndex[row] || 0));
|
|
71886
|
+
} else {
|
|
71879
71887
|
rowHeightByIndex[row] = Math.floor(Math.max(textHight, rowHeightByIndex[row] || 0));
|
|
71880
|
-
return;
|
|
71881
71888
|
}
|
|
71882
|
-
columnWidthByIndex[column] = Math.floor(Math.max(textWidth, columnWidthByIndex[column] || 0));
|
|
71883
|
-
rowHeightByIndex[row] = Math.floor(Math.max(textHight, rowHeightByIndex[row] || 0));
|
|
71884
71889
|
});
|
|
71885
71890
|
});
|
|
71886
71891
|
let width = 0;
|
|
@@ -71893,7 +71898,7 @@ var TableView2 = class extends Component_default2 {
|
|
|
71893
71898
|
}
|
|
71894
71899
|
const last = index2 === columnWidthByIndex.length - 1;
|
|
71895
71900
|
columnObjByIndex[index2] = {x: width, width: columnWidth};
|
|
71896
|
-
width = width + columnWidth +
|
|
71901
|
+
width = width + columnWidth + (last ? 0 : item.border_width || 0);
|
|
71897
71902
|
}
|
|
71898
71903
|
let height = 0;
|
|
71899
71904
|
const rowObjByIndex = [];
|
|
@@ -71905,7 +71910,7 @@ var TableView2 = class extends Component_default2 {
|
|
|
71905
71910
|
}
|
|
71906
71911
|
const last = index2 === rowHeightByIndex.length - 1;
|
|
71907
71912
|
rowObjByIndex[index2] = {y: height, height: rowHeight};
|
|
71908
|
-
height = height + rowHeight +
|
|
71913
|
+
height = height + rowHeight + (last ? 0 : item.border_width || 0);
|
|
71909
71914
|
}
|
|
71910
71915
|
const {x, y} = getXYByPosition(rect, item.position, width, height, item.frame_width);
|
|
71911
71916
|
tableAttrByIndex[index] = {
|
|
@@ -71956,7 +71961,7 @@ var TableView2 = class extends Component_default2 {
|
|
|
71956
71961
|
for (let i = column + 1; i <= mergeColumnIndex; i++) {
|
|
71957
71962
|
const w = columnObjByIndex[i]?.width;
|
|
71958
71963
|
if (w) {
|
|
71959
|
-
width2 = width2 + w +
|
|
71964
|
+
width2 = width2 + w + item.border_width;
|
|
71960
71965
|
}
|
|
71961
71966
|
}
|
|
71962
71967
|
;
|
|
@@ -71964,7 +71969,7 @@ var TableView2 = class extends Component_default2 {
|
|
|
71964
71969
|
for (let i = row + 1; i <= mergeRowIndex; i++) {
|
|
71965
71970
|
const h = rowObjByIndex[i]?.height;
|
|
71966
71971
|
if (h) {
|
|
71967
|
-
height2 = height2 + h +
|
|
71972
|
+
height2 = height2 + h + item.border_width;
|
|
71968
71973
|
}
|
|
71969
71974
|
}
|
|
71970
71975
|
;
|
|
@@ -71973,7 +71978,6 @@ var TableView2 = class extends Component_default2 {
|
|
|
71973
71978
|
style: {
|
|
71974
71979
|
text,
|
|
71975
71980
|
backgroundColor: bgcolor2,
|
|
71976
|
-
padding: paddings / 2,
|
|
71977
71981
|
fill: text_color,
|
|
71978
71982
|
width: width2,
|
|
71979
71983
|
height: height2,
|
|
@@ -71983,8 +71987,8 @@ var TableView2 = class extends Component_default2 {
|
|
|
71983
71987
|
align,
|
|
71984
71988
|
overflow: "truncate"
|
|
71985
71989
|
},
|
|
71986
|
-
x: x2 + getTextXOffset(width2, align, paddings),
|
|
71987
|
-
y: y2 + getTextYOffset(height2, verticalAlign, paddings),
|
|
71990
|
+
x: x2 + getTextXOffset(width2, align, paddings / 2),
|
|
71991
|
+
y: y2 + getTextYOffset(height2, verticalAlign, paddings / 2),
|
|
71988
71992
|
z,
|
|
71989
71993
|
z2: 10
|
|
71990
71994
|
});
|
|
@@ -71994,12 +71998,12 @@ var TableView2 = class extends Component_default2 {
|
|
|
71994
71998
|
const isLastColumn = cellColumn === columns - 1;
|
|
71995
71999
|
const startPoint = [x2, y2 - border_width / 2];
|
|
71996
72000
|
const midPoint = [
|
|
71997
|
-
x2 + width2 +
|
|
72001
|
+
x2 + width2 + (isLastColumn ? 0 : border_width / 2),
|
|
71998
72002
|
y2 - (row ? border_width / 2 : 0)
|
|
71999
72003
|
];
|
|
72000
72004
|
const endPoint = [
|
|
72001
|
-
x2 + width2 +
|
|
72002
|
-
y2 + height2
|
|
72005
|
+
x2 + width2 + border_width / 2,
|
|
72006
|
+
y2 + height2
|
|
72003
72007
|
];
|
|
72004
72008
|
const points4 = [midPoint];
|
|
72005
72009
|
if (row) {
|
|
@@ -74306,8 +74310,9 @@ var markerTypeCalculator2 = {
|
|
|
74306
74310
|
const count2 = seriesData.count(true);
|
|
74307
74311
|
const axisModel = seriesModel.getBaseAxis();
|
|
74308
74312
|
const extent3 = axisModel.scale.getExtent();
|
|
74309
|
-
const
|
|
74310
|
-
|
|
74313
|
+
const offset = seriesModel.get("offset") || 0;
|
|
74314
|
+
const lastIndex = extent3[1] + offset;
|
|
74315
|
+
if (lastIndex >= count2 || lastIndex < 0) {
|
|
74311
74316
|
return null;
|
|
74312
74317
|
}
|
|
74313
74318
|
const backgroundColor2 = seriesModel.ecModel.get("backgroundColor");
|
|
@@ -74333,8 +74338,9 @@ var markerTypeCalculator2 = {
|
|
|
74333
74338
|
const count2 = seriesData.count(true);
|
|
74334
74339
|
const axisModel = seriesModel.getBaseAxis();
|
|
74335
74340
|
const extent3 = axisModel.scale.getExtent();
|
|
74336
|
-
const
|
|
74337
|
-
|
|
74341
|
+
const offset = seriesModel.get("offset") || 0;
|
|
74342
|
+
const lastIndex = extent3[1] + offset;
|
|
74343
|
+
if (lastIndex >= count2 || lastIndex < 0) {
|
|
74338
74344
|
return markerTypeCalculator2.rawLast(item, seriesModel);
|
|
74339
74345
|
}
|
|
74340
74346
|
return markerTypeCalculator2.last(item, seriesModel);
|