|
7131 | 7131 | function registerPainter(name, Ctor) {
|
7132 | 7132 | painterCtors[name] = Ctor;
|
7133 | 7133 | }
|
7134 |
| - var version = '5.4.1'; |
| 7134 | + var version = '5.4.3'; |
7135 | 7135 |
|
7136 | 7136 | var zrender = /*#__PURE__*/Object.freeze({
|
7137 | 7137 | __proto__: null,
|
|
9199 | 9199 | }
|
9200 | 9200 | }
|
9201 | 9201 | }
|
9202 |
| - function isLatin(ch) { |
| 9202 | + function isAlphabeticLetter(ch) { |
9203 | 9203 | var code = ch.charCodeAt(0);
|
9204 |
| - return code >= 0x21 && code <= 0x17F; |
| 9204 | + return code >= 0x20 && code <= 0x24F |
| 9205 | + || code >= 0x370 && code <= 0x10FF |
| 9206 | + || code >= 0x1200 && code <= 0x13FF |
| 9207 | + || code >= 0x1E00 && code <= 0x206F; |
9205 | 9208 | }
|
9206 | 9209 | var breakCharMap = reduce(',&?/;] '.split(''), function (obj, ch) {
|
9207 | 9210 | obj[ch] = true;
|
9208 | 9211 | return obj;
|
9209 | 9212 | }, {});
|
9210 | 9213 | function isWordBreakChar(ch) {
|
9211 |
| - if (isLatin(ch)) { |
| 9214 | + if (isAlphabeticLetter(ch)) { |
9212 | 9215 | if (breakCharMap[ch]) {
|
9213 | 9216 | return true;
|
9214 | 9217 | }
|
@@ -15790,23 +15793,23 @@
|
15790 | 15793 | */
|
15791 | 15794 |
|
15792 | 15795 | /*
|
15793 |
| - * Licensed to the Apache Software Foundation (ASF) under one |
15794 |
| - * or more contributor license agreements. See the NOTICE file |
15795 |
| - * distributed with this work for additional information |
15796 |
| - * regarding copyright ownership. The ASF licenses this file |
15797 |
| - * to you under the Apache License, Version 2.0 (the |
15798 |
| - * "License"); you may not use this file except in compliance |
15799 |
| - * with the License. You may obtain a copy of the License at |
15800 |
| - * |
15801 |
| - * http://www.apache.org/licenses/LICENSE-2.0 |
15802 |
| - * |
15803 |
| - * Unless required by applicable law or agreed to in writing, |
15804 |
| - * software distributed under the License is distributed on an |
15805 |
| - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
15806 |
| - * KIND, either express or implied. See the License for the |
15807 |
| - * specific language governing permissions and limitations |
15808 |
| - * under the License. |
15809 |
| - */ |
| 15796 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 15797 | + * or more contributor license agreements. See the NOTICE file |
| 15798 | + * distributed with this work for additional information |
| 15799 | + * regarding copyright ownership. The ASF licenses this file |
| 15800 | + * to you under the Apache License, Version 2.0 (the |
| 15801 | + * "License"); you may not use this file except in compliance |
| 15802 | + * with the License. You may obtain a copy of the License at |
| 15803 | + * |
| 15804 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 15805 | + * |
| 15806 | + * Unless required by applicable law or agreed to in writing, |
| 15807 | + * software distributed under the License is distributed on an |
| 15808 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15809 | + * KIND, either express or implied. See the License for the |
| 15810 | + * specific language governing permissions and limitations |
| 15811 | + * under the License. |
| 15812 | + */ |
15810 | 15813 |
|
15811 | 15814 | /**
|
15812 | 15815 | * Language: English.
|
|
19746 | 19749 |
|
19747 | 19750 |
|
19748 | 19751 | if (obj) {
|
19749 |
| - var dimensions_1 = []; |
19750 |
| - each(obj, function (value, key) { |
19751 |
| - dimensions_1.push(key); |
19752 |
| - }); |
19753 |
| - return dimensions_1; |
| 19752 | + return keys(obj); |
19754 | 19753 | }
|
19755 | 19754 | } // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'],
|
19756 | 19755 | // which is reasonable. But dimension name is duplicated.
|
|
21231 | 21230 | /** @class */
|
21232 | 21231 | function () {
|
21233 | 21232 | function DataStore() {
|
21234 |
| - this._chunks = []; // It will not be calculated util needed. |
| 21233 | + this._chunks = []; // It will not be calculated until needed. |
21235 | 21234 |
|
21236 | 21235 | this._rawExtent = [];
|
21237 | 21236 | this._extent = [];
|
|
21649 | 21648 | // When the `value` is at the middle of `this.get(dim, i)` and `this.get(dim, i+1)`,
|
21650 | 21649 | // we'd better not push both of them to `nearestIndices`, otherwise it is easy to
|
21651 | 21650 | // get more than one item in `nearestIndices` (more specifically, in `tooltip`).
|
21652 |
| - // So we chose the one that `diff >= 0` in this csae. |
| 21651 | + // So we choose the one that `diff >= 0` in this case. |
21653 | 21652 | // But if `this.get(dim, i)` and `this.get(dim, j)` get the same value, both of them
|
21654 | 21653 | // should be push to `nearestIndices`.
|
21655 | 21654 | if (dist < minDist || dist === minDist && diff >= 0 && minDiff < 0) {
|
|
22001 | 22000 | maxArea = -1;
|
22002 | 22001 | nextRawIndex = frameStart;
|
22003 | 22002 | var firstNaNIndex = -1;
|
22004 |
| - var countNaN = 0; // Find a point from current frame that construct a triangel with largest area with previous selected point |
| 22003 | + var countNaN = 0; // Find a point from current frame that construct a triangle with largest area with previous selected point |
22005 | 22004 | // And the average of next frame.
|
22006 | 22005 |
|
22007 | 22006 | for (var idx = frameStart; idx < frameEnd; idx++) {
|
|
22797 | 22796 | var inlineName = multipleSeries ? seriesName : itemName;
|
22798 | 22797 | return createTooltipMarkup('section', {
|
22799 | 22798 | header: seriesName,
|
22800 |
| - // When series name not specified, do not show a header line with only '-'. |
22801 |
| - // This case alway happen in tooltip.trigger: 'item'. |
| 22799 | + // When series name is not specified, do not show a header line with only '-'. |
| 22800 | + // This case always happens in tooltip.trigger: 'item'. |
22802 | 22801 | noHeader: multipleSeries || !seriesNameSpecified,
|
22803 | 22802 | sortParam: sortParam,
|
22804 | 22803 | blocks: [createTooltipMarkup('nameValue', {
|
|
23410 | 23409 | }
|
23411 | 23410 |
|
23412 | 23411 | function dataTaskProgress(param, context) {
|
23413 |
| - // Avoid repead cloneShallow when data just created in reset. |
| 23412 | + // Avoid repeat cloneShallow when data just created in reset. |
23414 | 23413 | if (context.outputData && param.end > context.outputData.count()) {
|
23415 | 23414 | context.model.getRawData().cloneShallow(context.outputData);
|
23416 | 23415 | }
|
|
25167 | 25166 | }
|
25168 | 25167 | }
|
25169 | 25168 |
|
25170 |
| - // Inlucdes: pieSelect, pieUnSelect, pieToggleSelect, mapSelect, mapUnSelect, mapToggleSelect |
| 25169 | + // Includes: pieSelect, pieUnSelect, pieToggleSelect, mapSelect, mapUnSelect, mapToggleSelect |
25171 | 25170 |
|
25172 | 25171 | function createLegacyDataSelectAction(seriesType, ecRegisterAction) {
|
25173 | 25172 | function getSeriesIndices(ecModel, payload) {
|
|
26787 | 26786 | return implsStore[name];
|
26788 | 26787 | }
|
26789 | 26788 |
|
26790 |
| - var version$1 = '5.4.1'; |
| 26789 | + var version$1 = '5.4.2'; |
26791 | 26790 | var dependencies = {
|
26792 |
| - zrender: '5.4.1' |
| 26791 | + zrender: '5.4.3' |
26793 | 26792 | };
|
26794 | 26793 | var TEST_FRAME_REMAIN_TIME = 1;
|
26795 | 26794 | var PRIORITY_PROCESSOR_SERIES_FILTER = 800; // Some data processors depends on the stack result dimension (to calculate data extent).
|
|
39041 | 39040 | var polyline = this._polyline;
|
39042 | 39041 | var polygon = this._polygon;
|
39043 | 39042 | var lineGroup = this._lineGroup;
|
39044 |
| - var hasAnimation = seriesModel.get('animation'); |
| 39043 | + var hasAnimation = !ecModel.ssr && seriesModel.isAnimationEnabled(); |
39045 | 39044 | var isAreaChart = !areaStyleModel.isEmpty();
|
39046 | 39045 | var valueOrigin = areaStyleModel.get('origin');
|
39047 | 39046 | var dataCoordInfo = prepareDataCoordInfo(coordSys, data, valueOrigin);
|
|
39421 | 39420 | seriesDuration = seriesDuration(null);
|
39422 | 39421 | }
|
39423 | 39422 |
|
39424 |
| - var seriesDalay = seriesModel.get('animationDelay') || 0; |
39425 |
| - var seriesDalayValue = isFunction(seriesDalay) ? seriesDalay(null) : seriesDalay; |
| 39423 | + var seriesDelay = seriesModel.get('animationDelay') || 0; |
| 39424 | + var seriesDelayValue = isFunction(seriesDelay) ? seriesDelay(null) : seriesDelay; |
39426 | 39425 | data.eachItemGraphicEl(function (symbol, idx) {
|
39427 | 39426 | var el = symbol;
|
39428 | 39427 |
|
|
39467 | 39466 | ratio = 1 - ratio;
|
39468 | 39467 | }
|
39469 | 39468 |
|
39470 |
| - var delay = isFunction(seriesDalay) ? seriesDalay(idx) : seriesDuration * ratio + seriesDalayValue; |
| 39469 | + var delay = isFunction(seriesDelay) ? seriesDelay(idx) : seriesDuration * ratio + seriesDelayValue; |
39471 | 39470 | var symbolPath = el.getSymbolPath();
|
39472 | 39471 | var text = symbolPath.getTextContent();
|
39473 | 39472 | el.attr({
|
@@ -39965,22 +39964,75 @@
|
39965 | 39964 |
|
39966 | 39965 | if (coordSys && coordSys.clampData) {
|
39967 | 39966 | // PENDING if clamp ?
|
39968 |
| - var pt_1 = coordSys.dataToPoint(coordSys.clampData(value)); |
| 39967 | + var clampData_1 = coordSys.clampData(value); |
| 39968 | + var pt_1 = coordSys.dataToPoint(clampData_1); |
39969 | 39969 |
|
39970 | 39970 | if (startingAtTick) {
|
39971 | 39971 | each(coordSys.getAxes(), function (axis, idx) {
|
39972 | 39972 | // If axis type is category, use tick coords instead
|
39973 |
| - if (axis.type === 'category') { |
| 39973 | + if (axis.type === 'category' && dims != null) { |
39974 | 39974 | var tickCoords = axis.getTicksCoords();
|
39975 |
| - var tickIdx = coordSys.clampData(value)[idx]; // The index of rightmost tick of markArea is 1 larger than x1/y1 index |
| 39975 | + var targetTickId = clampData_1[idx]; // The index of rightmost tick of markArea is 1 larger than x1/y1 index |
| 39976 | + |
| 39977 | + var isEnd = dims[idx] === 'x1' || dims[idx] === 'y1'; |
| 39978 | + |
| 39979 | + if (isEnd) { |
| 39980 | + targetTickId += 1; |
| 39981 | + } // The only contains one tick, tickCoords is |
| 39982 | + // like [{coord: 0, tickValue: 0}, {coord: 0}] |
| 39983 | + // to the length should always be larger than 1 |
39976 | 39984 |
|
39977 |
| - if (dims && (dims[idx] === 'x1' || dims[idx] === 'y1')) { |
39978 |
| - tickIdx += 1; |
| 39985 | + |
| 39986 | + if (tickCoords.length < 2) { |
| 39987 | + return; |
| 39988 | + } else if (tickCoords.length === 2) { |
| 39989 | + // The left value and right value of the axis are |
| 39990 | + // the same. coord is 0 in both items. Use the max |
| 39991 | + // value of the axis as the coord |
| 39992 | + pt_1[idx] = axis.toGlobalCoord(axis.getExtent()[isEnd ? 1 : 0]); |
| 39993 | + return; |
39979 | 39994 | }
|
39980 | 39995 |
|
39981 |
| - tickIdx > tickCoords.length - 1 && (tickIdx = tickCoords.length - 1); |
39982 |
| - tickIdx < 0 && (tickIdx = 0); |
39983 |
| - tickCoords[tickIdx] && (pt_1[idx] = axis.toGlobalCoord(tickCoords[tickIdx].coord)); |
| 39996 | + var leftCoord = void 0; |
| 39997 | + var coord = void 0; |
| 39998 | + var stepTickValue = 1; |
| 39999 | + |
| 40000 | + for (var i = 0; i < tickCoords.length; i++) { |
| 40001 | + var tickCoord = tickCoords[i].coord; // The last item of tickCoords doesn't contain |
| 40002 | + // tickValue |
| 40003 | + |
| 40004 | + var tickValue = i === tickCoords.length - 1 ? tickCoords[i - 1].tickValue + stepTickValue : tickCoords[i].tickValue; |
| 40005 | + |
| 40006 | + if (tickValue === targetTickId) { |
| 40007 | + coord = tickCoord; |
| 40008 | + break; |
| 40009 | + } else if (tickValue < targetTickId) { |
| 40010 | + leftCoord = tickCoord; |
| 40011 | + } else if (leftCoord != null && tickValue > targetTickId) { |
| 40012 | + coord = (tickCoord + leftCoord) / 2; |
| 40013 | + break; |
| 40014 | + } |
| 40015 | + |
| 40016 | + if (i === 1) { |
| 40017 | + // Here we assume the step of category axes is |
| 40018 | + // the same |
| 40019 | + stepTickValue = tickValue - tickCoords[0].tickValue; |
| 40020 | + } |
| 40021 | + } |
| 40022 | + |
| 40023 | + if (coord == null) { |
| 40024 | + if (!leftCoord) { |
| 40025 | + // targetTickId is smaller than all tick ids in the |
| 40026 | + // visible area, use the leftmost tick coord |
| 40027 | + coord = tickCoords[0].coord; |
| 40028 | + } else if (leftCoord) { |
| 40029 | + // targetTickId is larger than all tick ids in the |
| 40030 | + // visible area, use the rightmost tick coord |
| 40031 | + coord = tickCoords[tickCoords.length - 1].coord; |
| 40032 | + } |
| 40033 | + } |
| 40034 | + |
| 40035 | + pt_1[idx] = axis.toGlobalCoord(coord); |
39984 | 40036 | }
|
39985 | 40037 | });
|
39986 | 40038 | } else {
|
|
40356 | 40408 | return distance * Math.cos(angle) * (isEnd ? 1 : -1);
|
40357 | 40409 | }
|
40358 | 40410 |
|
| 40411 | + function getSectorCornerRadius(model, shape, zeroIfNull) { |
| 40412 | + var cornerRadius = model.get('borderRadius'); |
| 40413 | + |
| 40414 | + if (cornerRadius == null) { |
| 40415 | + return zeroIfNull ? { |
| 40416 | + cornerRadius: 0 |
| 40417 | + } : null; |
| 40418 | + } |
| 40419 | + |
| 40420 | + if (!isArray(cornerRadius)) { |
| 40421 | + cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius]; |
| 40422 | + } |
| 40423 | + |
| 40424 | + var dr = Math.abs(shape.r || 0 - shape.r0 || 0); |
| 40425 | + return { |
| 40426 | + cornerRadius: map(cornerRadius, function (cr) { |
| 40427 | + return parsePercent(cr, dr); |
| 40428 | + }) |
| 40429 | + }; |
| 40430 | + } |
| 40431 | + |
40359 | 40432 | var mathMax$6 = Math.max;
|
40360 | 40433 | var mathMin$6 = Math.min;
|
40361 | 40434 |
|
|
40488 | 40561 |
|
40489 | 40562 | if (coord.type === 'cartesian2d') {
|
40490 | 40563 | bgEl.setShape('r', barBorderRadius);
|
| 40564 | + } else { |
| 40565 | + bgEl.setShape('cornerRadius', barBorderRadius); |
40491 | 40566 | }
|
40492 | 40567 |
|
40493 | 40568 | bgEls[dataIndex] = bgEl;
|
|
40560 | 40635 |
|
40561 | 40636 | if (coord.type === 'cartesian2d') {
|
40562 | 40637 | bgEl.setShape('r', barBorderRadius);
|
| 40638 | + } else { |
| 40639 | + bgEl.setShape('cornerRadius', barBorderRadius); |
40563 | 40640 | }
|
40564 | 40641 |
|
40565 | 40642 | bgEls[newIndex] = bgEl;
|
|
40953 | 41030 | var sectorShape = sector.shape;
|
40954 | 41031 | var animateProperty = isRadial ? 'r' : 'endAngle';
|
40955 | 41032 | var animateTarget = {};
|
40956 |
| - sectorShape[animateProperty] = isRadial ? 0 : layout.startAngle; |
| 41033 | + sectorShape[animateProperty] = isRadial ? layout.r0 : layout.startAngle; |
40957 | 41034 | animateTarget[animateProperty] = layout[animateProperty];
|
40958 | 41035 | (isUpdate ? updateProps : initProps)(sector, {
|
40959 | 41036 | shape: animateTarget // __value: typeof dataValue === 'string' ? parseInt(dataValue, 10) : dataValue
|
|
41103 | 41180 | var style = data.getItemVisual(dataIndex, 'style');
|
41104 | 41181 |
|
41105 | 41182 | if (!isPolar) {
|
41106 |
| - el.setShape('r', itemModel.get(['itemStyle', 'borderRadius']) || 0); |
| 41183 | + var borderRadius = itemModel.get(['itemStyle', 'borderRadius']) || 0; |
| 41184 | + el.setShape('r', borderRadius); |
| 41185 | + } else if (!seriesModel.get('roundCap')) { |
| 41186 | + var sectorShape = el.shape; |
| 41187 | + var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true); |
| 41188 | + extend(sectorShape, cornerRadius); |
| 41189 | + el.setShape(sectorShape); |
41107 | 41190 | }
|
41108 | 41191 |
|
41109 | 41192 | el.useStyle(style);
|
|
42082 | 42165 | }
|
42083 | 42166 | }
|
42084 | 42167 |
|
42085 |
| - function getSectorCornerRadius(model, shape, zeroIfNull) { |
42086 |
| - var cornerRadius = model.get('borderRadius'); |
42087 |
| - |
42088 |
| - if (cornerRadius == null) { |
42089 |
| - return zeroIfNull ? { |
42090 |
| - cornerRadius: 0 |
42091 |
| - } : null; |
42092 |
| - } |
42093 |
| - |
42094 |
| - if (!isArray(cornerRadius)) { |
42095 |
| - cornerRadius = [cornerRadius, cornerRadius, cornerRadius, cornerRadius]; |
42096 |
| - } |
42097 |
| - |
42098 |
| - var dr = Math.abs(shape.r || 0 - shape.r0 || 0); |
42099 |
| - return { |
42100 |
| - cornerRadius: map(cornerRadius, function (cr) { |
42101 |
| - return parsePercent(cr, dr); |
42102 |
| - }) |
42103 |
| - }; |
42104 |
| - } |
42105 |
| - |
42106 | 42168 | /**
|
42107 | 42169 | * Piece of pie including Sector, Label, LabelLine
|
42108 | 42170 | */
|
|
44001 | 44063 | handleAutoShown: function () {
|
44002 | 44064 | return true;
|
44003 | 44065 | }
|
44004 |
| - }); // FIXME Not use a seperate text group? |
| 44066 | + }); // FIXME Not use a separate text group? |
44005 | 44067 |
|
44006 | 44068 | var transformGroup = new Group({
|
44007 | 44069 | x: opt.position[0],
|
|
44509 | 44571 | // in category axis.
|
44510 | 44572 | // (2) Compatible with previous version, which always use formatted label as
|
44511 | 44573 | // input. But in interval scale the formatted label is like '223,445', which
|
44512 |
| - // maked user repalce ','. So we modify it to return original val but remain |
| 44574 | + // maked user replace ','. So we modify it to return original val but remain |
44513 | 44575 | // it as 'string' to avoid error in replacing.
|
44514 | 44576 | axis.type === 'category' ? rawLabel : axis.type === 'value' ? tickValue + '' : tickValue, index) : textColor
|
44515 | 44577 | })
|
|
0 commit comments