Newer
Older
diff --git a/node_modules/echarts/lib/chart/line/LineView.js b/node_modules/echarts/lib/chart/line/LineView.js
index 9da26b6..edf6ed7 100644
--- a/node_modules/echarts/lib/chart/line/LineView.js
+++ b/node_modules/echarts/lib/chart/line/LineView.js
@@ -140,6 +140,9 @@ function turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {
pt[0] = points[i];
pt[1] = points[i + 1];
stepPoints.push(pt[0], pt[1]);
+ if (isNaN(nextPt[1 - baseIndex])) {
+ continue;
+ }
switch (stepTurnAt) {
case 'end':
stepPt[baseIndex] = nextPt[baseIndex];
diff --git a/node_modules/echarts/lib/chart/line/helper.js b/node_modules/echarts/lib/chart/line/helper.js
index fa02e2f..c84b0ac 100644
--- a/node_modules/echarts/lib/chart/line/helper.js
+++ b/node_modules/echarts/lib/chart/line/helper.js
@@ -108,16 +108,20 @@ function getValueStart(valueAxis, valueOrigin) {
return valueStart;
}
export function getStackedOnPoint(dataCoordInfo, coordSys, data, idx) {
- var value = NaN;
+ let stackedOverValue = NaN;
+ let stackResultValue = NaN;
if (dataCoordInfo.stacked) {
- value = data.get(data.getCalculationInfo('stackedOverDimension'), idx);
+ stackedOverValue = data.get(data.getCalculationInfo('stackedOverDimension'), idx);
+ stackResultValue = data.get(data.getCalculationInfo('stackResultDimension'), idx);
+ } else {
+ stackResultValue = data.get(dataCoordInfo.valueDim, idx);
- if (isNaN(value)) {
- value = dataCoordInfo.valueStart;
+ if (isNaN(stackedOverValue) && !isNaN(stackResultValue)) {
+ stackedOverValue = dataCoordInfo.valueStart;
var baseDataOffset = dataCoordInfo.baseDataOffset;
var stackedData = [];
stackedData[baseDataOffset] = data.get(dataCoordInfo.baseDim, idx);
- stackedData[1 - baseDataOffset] = value;
+ stackedData[1 - baseDataOffset] = stackedOverValue;
return coordSys.dataToPoint(stackedData);
}
diff --git a/node_modules/echarts/lib/data/helper/dataStackHelper.js b/node_modules/echarts/lib/data/helper/dataStackHelper.js
index c25de1b..a3ced22 100644
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
--- a/node_modules/echarts/lib/data/helper/dataStackHelper.js
+++ b/node_modules/echarts/lib/data/helper/dataStackHelper.js
@@ -83,6 +83,13 @@ export function enableDataStack(seriesModel, dimensionsInput, opt) {
var stackedDimInfo;
var stackResultDimension;
var stackedOverDimension;
+
+ var yCoordDimension = dimensionDefineList.find(
+ dimensionInfo => !isString(dimensionInfo) && dimensionInfo.coordDim === 'y'
+ );
+ var isYCoordDimensionStackable = yCoordDimension != null
+ && yCoordDimension.type !== 'ordinal' && yCoordDimension.type !== 'time';
+
each(dimensionDefineList, function (dimensionInfo, index) {
if (isString(dimensionInfo)) {
dimensionDefineList[index] = dimensionInfo = {
@@ -95,7 +102,10 @@ export function enableDataStack(seriesModel, dimensionsInput, opt) {
stackedByDimInfo = dimensionInfo;
}
// Find the first stackable dimension as the stackedDimInfo.
- if (!stackedDimInfo && dimensionInfo.type !== 'ordinal' && dimensionInfo.type !== 'time' && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) {
+ if (!stackedDimInfo && dimensionInfo.type !== 'ordinal'
+ && dimensionInfo.type !== 'time'
+ && (yCoordDimension == null || (dimensionInfo.coordDim !== 'x' && isYCoordDimensionStackable))
+ && (!stackedCoordDimension || stackedCoordDimension === dimensionInfo.coordDim)) {
stackedDimInfo = dimensionInfo;
}
}
@@ -105,6 +115,11 @@ export function enableDataStack(seriesModel, dimensionsInput, opt) {
// It may make sense if the user provides elaborately constructed data.
byIndex = true;
}
+ if (stackedDimInfo && !byIndex && !stackedByDimInfo) {
+ // Compatible with previous design, value axis (time axis) only stack by index.
+ // It may make sense if the user provides elaborately constructed data.
+ byIndex = true;
+ }
// Add stack dimension, they can be both calculated by coordinate system in `unionExtent`.
// That put stack logic in List is for using conveniently in echarts extensions, but it
// might not be a good way.
diff --git a/node_modules/echarts/lib/label/labelLayoutHelper.js b/node_modules/echarts/lib/label/labelLayoutHelper.js
index a75f606..52c5a0b 100644
--- a/node_modules/echarts/lib/label/labelLayoutHelper.js
+++ b/node_modules/echarts/lib/label/labelLayoutHelper.js
@@ -256,6 +256,13 @@ export function hideOverlap(labelList) {
var transform = labelItem.transform;
var label = labelItem.label;
var labelLine = labelItem.labelLine;
+
+ if (label.style.text === "") {
+ hideEl(label);
+ labelLine && hideEl(labelLine);
+ continue;
+ }
+
globalRect.copy(labelItem.rect);
// Add a threshold because layout may be aligned precisely.
globalRect.width -= 0.1;