Skip to content

Commit

Permalink
Merge pull request #16606 from apache/release-dev
Browse files Browse the repository at this point in the history
chore: build and release 5.3.1
  • Loading branch information
pissang authored Mar 2, 2022
2 parents d2b73b9 + 9d3d20c commit 06ee7c1
Show file tree
Hide file tree
Showing 17 changed files with 14,428 additions and 263 deletions.
125 changes: 80 additions & 45 deletions dist/echarts.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -16617,7 +16617,7 @@
*/

function makeValueReadable(value, valueType, useUTC) {
var USER_READABLE_DEFUALT_TIME_PATTERN = '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}';
var USER_READABLE_DEFUALT_TIME_PATTERN = '{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}';

function stringToUserReadable(str) {
return str && trim(str) ? str : '-';
Expand Down Expand Up @@ -22438,7 +22438,7 @@
var maxArea;
var area;
var nextRawIndex;
var newIndices = new (getIndicesCtor(this._rawCount))(Math.ceil(len / frameSize) + 2); // First frame use the first data.
var newIndices = new (getIndicesCtor(this._rawCount))(Math.min((Math.ceil(len / frameSize) + 2) * 2, len)); // First frame use the first data.

newIndices[sampledIndex++] = currentRawIndex;

Expand All @@ -22465,14 +22465,22 @@
var pointAX = i - 1;
var pointAY = dimStore[currentRawIndex];
maxArea = -1;
nextRawIndex = frameStart; // Find a point from current frame that construct a triangel with largest area with previous selected point
nextRawIndex = frameStart;
var firstNaNIndex = -1;
var countNaN = 0; // Find a point from current frame that construct a triangel with largest area with previous selected point
// And the average of next frame.

for (var idx = frameStart; idx < frameEnd; idx++) {
var rawIndex = this.getRawIndex(idx);
var y = dimStore[rawIndex];

if (isNaN(y)) {
countNaN++;

if (firstNaNIndex < 0) {
firstNaNIndex = rawIndex;
}

continue;
} // Calculate triangle area over three buckets

Expand All @@ -22485,6 +22493,13 @@
}
}

if (countNaN > 0 && countNaN < frameEnd - frameStart) {
// Append first NaN point in every bucket.
// It is necessary to ensure the correct order of indices.
newIndices[sampledIndex++] = Math.min(firstNaNIndex, nextRawIndex);
nextRawIndex = Math.max(firstNaNIndex, nextRawIndex);
}

newIndices[sampledIndex++] = nextRawIndex;
currentRawIndex = nextRawIndex; // This a is the next a (chosen b)
} // First frame use the last data.
Expand Down Expand Up @@ -27638,9 +27653,9 @@
}

var hasWindow = typeof window !== 'undefined';
var version$1 = '5.3.0';
var version$1 = '5.3.1';
var dependencies = {
zrender: '5.3.0'
zrender: '5.3.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
var PRIORITY_PROCESSOR_SERIES_FILTER = 800; // Some data processors depends on the stack result dimension (to calculate data extent).
Expand Down Expand Up @@ -37980,7 +37995,7 @@
patternAttrs.height = imageHeight_1;
}
else if (val.svgElement) {
child = val.svgElement;
child = clone(val.svgElement);
patternAttrs.width = val.svgWidth;
patternAttrs.height = val.svgHeight;
}
Expand Down Expand Up @@ -39733,8 +39748,6 @@
// Must stop leave transition manually if don't call initProps or updateProps.
this.childAt(0).stopAnimation('leave');
}

this._seriesModel = seriesModel;
};

Symbol.prototype._updateCommon = function (data, idx, symbolSize, seriesScope, opts) {
Expand Down Expand Up @@ -39862,9 +39875,8 @@
this.scaleX = this.scaleY = scale;
};

Symbol.prototype.fadeOut = function (cb, opt) {
Symbol.prototype.fadeOut = function (cb, seriesModel, opt) {
var symbolPath = this.childAt(0);
var seriesModel = this._seriesModel;
var dataIndex = getECData(this).dataIndex;
var animationOpt = opt && opt.animation; // Avoid mistaken hover when fading out

Expand Down Expand Up @@ -40025,7 +40037,7 @@
var el = oldData.getItemGraphicEl(oldIdx);
el && el.fadeOut(function () {
group.remove(el);
});
}, seriesModel);
}).execute();
this._getSymbolPoint = getSymbolPoint;
this._data = data;
Expand Down Expand Up @@ -40095,7 +40107,7 @@
data.eachItemGraphicEl(function (el) {
el.fadeOut(function () {
group.remove(el);
});
}, data.hostModel);
});
} else {
group.removeAll();
Expand Down Expand Up @@ -40907,16 +40919,27 @@
return points;
}

function turnPointsIntoStep(points, coordSys, stepTurnAt) {
function turnPointsIntoStep(points, coordSys, stepTurnAt, connectNulls) {
var baseAxis = coordSys.getBaseAxis();
var baseIndex = baseAxis.dim === 'x' || baseAxis.dim === 'radius' ? 0 : 1;
var stepPoints = [];
var i = 0;
var stepPt = [];
var pt = [];
var nextPt = [];
var filteredPoints = [];

for (; i < points.length - 2; i += 2) {
if (connectNulls) {
for (i = 0; i < points.length; i += 2) {
if (!isNaN(points[i]) && !isNaN(points[i + 1])) {
filteredPoints.push(points[i], points[i + 1]);
}
}

points = filteredPoints;
}

for (i = 0; i < points.length - 2; i += 2) {
nextPt[0] = points[i + 2];
nextPt[1] = points[i + 3];
pt[0] = points[i];
Expand Down Expand Up @@ -41338,6 +41361,7 @@
var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);
var stackedOnPoints = isAreaChart && getStackedOnPoints(coordSys, data, dataCoordInfo);
var showSymbol = seriesModel.get('showSymbol');
var connectNulls = seriesModel.get('connectNulls');
var isIgnoreFunc = showSymbol && !isCoordSysPolar && getIsIgnoreFunc(seriesModel, data, coordSys); // Remove temporary symbols

var oldData = this._data;
Expand Down Expand Up @@ -41388,10 +41412,10 @@

if (step) {
// TODO If stacked series is not step
points = turnPointsIntoStep(points, coordSys, step);
points = turnPointsIntoStep(points, coordSys, step, connectNulls);

if (stackedOnPoints) {
stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step);
stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);
}
}

Expand Down Expand Up @@ -41448,15 +41472,15 @@

if (!isPointsSame(this._stackedOnPoints, stackedOnPoints) || !isPointsSame(this._points, points)) {
if (hasAnimation) {
this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin);
this._doUpdateAnimation(data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls);
} else {
// Not do it in update with animation
if (step) {
// TODO If stacked series is not step
points = turnPointsIntoStep(points, coordSys, step);
points = turnPointsIntoStep(points, coordSys, step, connectNulls);

if (stackedOnPoints) {
stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step);
stackedOnPoints = turnPointsIntoStep(stackedOnPoints, coordSys, step, connectNulls);
}
}

Expand Down Expand Up @@ -41493,7 +41517,6 @@
toggleHoverEmphasis(polyline, focus, blurScope, emphasisDisabled);
var smooth = getSmooth(seriesModel.get('smooth'));
var smoothMonotone = seriesModel.get('smoothMonotone');
var connectNulls = seriesModel.get('connectNulls');
polyline.setShape({
smooth: smooth,
smoothMonotone: smoothMonotone,
Expand Down Expand Up @@ -41909,7 +41932,7 @@
// FIXME Two value axis


LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin) {
LineView.prototype._doUpdateAnimation = function (data, stackedOnPoints, coordSys, api, step, valueOrigin, connectNulls) {
var polyline = this._polyline;
var polygon = this._polygon;
var seriesModel = data.hostModel;
Expand All @@ -41921,10 +41944,10 @@

if (step) {
// TODO If stacked series is not step
current = turnPointsIntoStep(diff.current, coordSys, step);
stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step);
next = turnPointsIntoStep(diff.next, coordSys, step);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step);
current = turnPointsIntoStep(diff.current, coordSys, step, connectNulls);
stackedOnCurrent = turnPointsIntoStep(diff.stackedOnCurrent, coordSys, step, connectNulls);
next = turnPointsIntoStep(diff.next, coordSys, step, connectNulls);
stackedOnNext = turnPointsIntoStep(diff.stackedOnNext, coordSys, step, connectNulls);
} // Don't apply animation if diff is large.
// For better result and avoid memory explosion problems like
// https://github.com/apache/incubator-echarts/issues/12229
Expand Down Expand Up @@ -42182,7 +42205,7 @@
var size = Math.abs(extent[1] - extent[0]) * (dpr || 1);
var rate = Math.round(count / size);

if (rate > 1) {
if (isFinite(rate) && rate > 1) {
if (sampling === 'lttb') {
seriesModel.setData(data.lttbDownSample(data.mapDimension(valueAxis.dim), 1 / rate));
}
Expand Down Expand Up @@ -44539,11 +44562,6 @@
return _this;
}

PieView.prototype.init = function () {
var sectorGroup = new Group();
this._sectorGroup = sectorGroup;
};

PieView.prototype.render = function (seriesModel, ecModel, api, payload) {
var data = seriesModel.getData();
var oldData = this._data;
Expand Down Expand Up @@ -47267,6 +47285,12 @@
var eventData = AxisBuilder.makeAxisEventDataBase(axisModel);
eventData.targetType = 'axisLabel';
eventData.value = rawLabel;
eventData.tickIndex = index;

if (axis.type === 'category') {
eventData.dataIndex = tickValue;
}

getECData(textEl).eventData = eventData;
} // FIXME

Expand Down Expand Up @@ -50677,7 +50701,8 @@

function updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {
if (!el.isGroup) {
var elDisplayable = el; // We should not support configure z and zlevel in the element level.
var elDisplayable = el;
elDisplayable.cursor = retrieve2(elOption.cursor, Displayable.prototype.cursor); // We should not support configure z and zlevel in the element level.
// But seems we didn't limit it previously. So here still use it to avoid breaking.

elDisplayable.z = retrieve2(elOption.z, defaultZ || 0);
Expand Down Expand Up @@ -52945,25 +52970,32 @@
}

DataView.prototype.onclick = function (ecModel, api) {
// FIXME: better way?
setTimeout(function () {
api.dispatchAction({
type: 'hideTip'
});
});
var container = api.getDom();
var model = this.model;

if (this._dom) {
container.removeChild(this._dom);
}

var root = document.createElement('div');
root.style.cssText = 'position:absolute;left:5px;top:5px;bottom:5px;right:5px;';
var root = document.createElement('div'); // use padding to avoid 5px whitespace

root.style.cssText = 'position:absolute;top:0;bottom:0;left:0;right:0;padding:5px';
root.style.backgroundColor = model.get('backgroundColor') || '#fff'; // Create elements

var header = document.createElement('h4');
var lang = model.get('lang') || [];
header.innerHTML = lang[0] || model.get('title');
header.style.cssText = 'margin: 10px 20px;';
header.style.cssText = 'margin:10px 20px';
header.style.color = model.get('textColor');
var viewMain = document.createElement('div');
var textarea = document.createElement('textarea');
viewMain.style.cssText = 'display:block;width:100%;overflow:auto;';
viewMain.style.cssText = 'overflow:auto';
var optionToContent = model.get('optionToContent');
var contentToOption = model.get('contentToOption');
var result = getContentFromModel(ecModel);
Expand All @@ -52978,19 +53010,22 @@
}
} else {
// Use default textarea
viewMain.appendChild(textarea);
textarea.readOnly = model.get('readOnly');
textarea.style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;';
textarea.style.color = model.get('textColor');
textarea.style.borderColor = model.get('textareaBorderColor');
textarea.style.backgroundColor = model.get('textareaColor');
var style = textarea.style; // eslint-disable-next-line max-len

style.cssText = 'width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none';
style.color = model.get('textColor');
style.borderColor = model.get('textareaBorderColor');
style.backgroundColor = model.get('textareaColor');
textarea.value = result.value;
viewMain.appendChild(textarea);
}

var blockMetaList = result.meta;
var buttonContainer = document.createElement('div');
buttonContainer.style.cssText = 'position:absolute;bottom:0;left:0;right:0;';
var buttonStyle = 'float:right;margin-right:20px;border:none;' + 'cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';
buttonContainer.style.cssText = 'position:absolute;bottom:5px;left:0;right:0'; // eslint-disable-next-line max-len

var buttonStyle = 'float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px';
var closeButton = document.createElement('div');
var refreshButton = document.createElement('div');
buttonStyle += ';background-color:' + model.get('buttonColor');
Expand Down Expand Up @@ -53038,8 +53073,7 @@
});
closeButton.innerHTML = lang[1];
refreshButton.innerHTML = lang[2];
refreshButton.style.cssText = buttonStyle;
closeButton.style.cssText = buttonStyle;
refreshButton.style.cssText = closeButton.style.cssText = buttonStyle;
!model.get('readOnly') && buttonContainer.appendChild(refreshButton);
buttonContainer.appendChild(closeButton);
root.appendChild(header);
Expand Down Expand Up @@ -55983,6 +56017,7 @@
}

var tooltipContent = this._tooltipContent;
tooltipContent.setEnterable(tooltipModel.get('enterable'));
var formatter = tooltipModel.get('formatter');
positionExpr = positionExpr || tooltipModel.get('position');
var html = defaultHtml;
Expand Down
2 changes: 1 addition & 1 deletion dist/echarts.common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/echarts.common.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 06ee7c1

Please sign in to comment.