diff --git a/dist/echarts.common.js b/dist/echarts.common.js index 5165a2db52..4eb8914c44 100644 --- a/dist/echarts.common.js +++ b/dist/echarts.common.js @@ -24,35 +24,35 @@ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.echarts = {})); }(this, (function (exports) { 'use strict'; - /*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */ - /* global Reflect, Promise */ - - var extendStatics = function(d, b) { - extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; - return extendStatics(d, b); - }; - - function __extends(d, b) { - if (typeof b !== "function" && b !== null) - throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + /*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */ + /* global Reflect, Promise */ + + var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + + function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); } var Browser = (function () { @@ -89,7 +89,11 @@ else if (typeof document === 'undefined' && typeof self !== 'undefined') { env.worker = true; } - else if (typeof navigator === 'undefined') { + else if ( + typeof process !== 'undefined' && + process.versions && + typeof process.versions.node === 'string' + ) { env.node = true; env.svgSupported = true; } @@ -7293,12 +7297,12 @@ function _trim(str) { return str.replace(/^\s+|\s+$/g, ''); } - /** - * Linear mapping a value from domain to range - * @param val - * @param domain Domain extent domain[0] can be bigger than domain[1] - * @param range Range extent range[0] can be bigger than range[1] - * @param clamp Default to be false + /** + * Linear mapping a value from domain to range + * @param val + * @param domain Domain extent domain[0] can be bigger than domain[1] + * @param range Range extent range[0] can be bigger than range[1] + * @param clamp Default to be false */ @@ -7345,9 +7349,9 @@ return (val - d0) / subDomain * subRange + r0; } - /** - * Convert a percent string to absolute number. - * Returns NaN if percent is not a valid string or number + /** + * Convert a percent string to absolute number. + * Returns NaN if percent is not a valid string or number */ function parsePercent$1(percent, all) { @@ -7389,9 +7393,9 @@ x = (+x).toFixed(precision); return returnStr ? x : +x; } - /** - * Inplacd asc sort arr. - * The input arr will be modified. + /** + * Inplacd asc sort arr. + * The input arr will be modified. */ function asc(arr) { @@ -7400,8 +7404,8 @@ }); return arr; } - /** - * Get precision. + /** + * Get precision. */ function getPrecision(val) { @@ -7432,8 +7436,8 @@ return getPrecisionSafe(val); } - /** - * Get precision with slow but safe method + /** + * Get precision with slow but safe method */ function getPrecisionSafe(val) { @@ -7447,8 +7451,8 @@ var decimalPartLen = dotIndex < 0 ? 0 : significandPartLen - 1 - dotIndex; return Math.max(0, decimalPartLen - exp); } - /** - * Minimal dicernible data precisioin according to a single pixel. + /** + * Minimal dicernible data precisioin according to a single pixel. */ function getPixelPrecision(dataExtent, pixelExtent) { @@ -7460,16 +7464,16 @@ var precision = Math.min(Math.max(-dataQuantity + sizeQuantity, 0), 20); return !isFinite(precision) ? 20 : precision; } - /** - * Get a data of given precision, assuring the sum of percentages - * in valueList is 1. - * The largest remainder method is used. - * https://en.wikipedia.org/wiki/Largest_remainder_method - * - * @param valueList a list of all data - * @param idx index of the data to be processed in valueList - * @param precision integer number showing digits of precision - * @return percent ranging from 0 to 100 + /** + * Get a data of given precision, assuring the sum of percentages + * in valueList is 1. + * The largest remainder method is used. + * https://en.wikipedia.org/wiki/Largest_remainder_method + * + * @param valueList a list of all data + * @param idx index of the data to be processed in valueList + * @param precision integer number showing digits of precision + * @return percent ranging from 0 to 100 */ function getPercentWithPrecision(valueList, idx, precision) { @@ -7480,15 +7484,15 @@ var seats = getPercentSeats(valueList, precision); return seats[idx] || 0; } - /** - * Get a data of given precision, assuring the sum of percentages - * in valueList is 1. - * The largest remainder method is used. - * https://en.wikipedia.org/wiki/Largest_remainder_method - * - * @param valueList a list of all data - * @param precision integer number showing digits of precision - * @return {Array} + /** + * Get a data of given precision, assuring the sum of percentages + * in valueList is 1. + * The largest remainder method is used. + * https://en.wikipedia.org/wiki/Largest_remainder_method + * + * @param valueList a list of all data + * @param precision integer number showing digits of precision + * @return {Array} */ function getPercentSeats(valueList, precision) { @@ -7538,9 +7542,9 @@ return seat / digits; }); } - /** - * Solve the floating point adding problem like 0.1 + 0.2 === 0.30000000000000004 - * See + /** + * Solve the floating point adding problem like 0.1 + 0.2 === 0.30000000000000004 + * See */ function addSafe(val0, val1) { @@ -7553,17 +7557,17 @@ } // Number.MAX_SAFE_INTEGER, ie do not support. var MAX_SAFE_INTEGER = 9007199254740991; - /** - * To 0 - 2 * PI, considering negative radian. + /** + * To 0 - 2 * PI, considering negative radian. */ function remRadian(radian) { var pi2 = Math.PI * 2; return (radian % pi2 + pi2) % pi2; } - /** - * @param {type} radian - * @return {boolean} + /** + * @param {type} radian + * @return {boolean} */ function isRadianAroundZero(val) { @@ -7572,21 +7576,21 @@ var TIME_REG = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/; // jshint ignore:line - /** - * @param value valid type: number | string | Date, otherwise return `new Date(NaN)` - * These values can be accepted: - * + An instance of Date, represent a time in its own time zone. - * + Or string in a subset of ISO 8601, only including: - * + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06', - * + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123', - * + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00', - * all of which will be treated as local time if time zone is not specified - * (see ). - * + Or other string format, including (all of which will be treated as local time): - * '2012', '2012-3-1', '2012/3/1', '2012/03/01', - * '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123' - * + a timestamp, which represent a time in UTC. - * @return date Never be null/undefined. If invalid, return `new Date(NaN)`. + /** + * @param value valid type: number | string | Date, otherwise return `new Date(NaN)` + * These values can be accepted: + * + An instance of Date, represent a time in its own time zone. + * + Or string in a subset of ISO 8601, only including: + * + only year, month, date: '2012-03', '2012-03-01', '2012-03-01 05', '2012-03-01 05:06', + * + separated with T or space: '2012-03-01T12:22:33.123', '2012-03-01 12:22:33.123', + * + time zone: '2012-03-01T12:22:33Z', '2012-03-01T12:22:33+8000', '2012-03-01T12:22:33-05:00', + * all of which will be treated as local time if time zone is not specified + * (see ). + * + Or other string format, including (all of which will be treated as local time): + * '2012', '2012-3-1', '2012/3/1', '2012/03/01', + * '2009/6/12 2:00', '2009/6/12 2:05:08', '2009/6/12 2:05:08.123' + * + a timestamp, which represent a time in UTC. + * @return date Never be null/undefined. If invalid, return `new Date(NaN)`. */ function parseDate(value) { @@ -7632,22 +7636,22 @@ return new Date(Math.round(value)); } - /** - * Quantity of a number. e.g. 0.1, 1, 10, 100 - * - * @param val - * @return + /** + * Quantity of a number. e.g. 0.1, 1, 10, 100 + * + * @param val + * @return */ function quantity(val) { return Math.pow(10, quantityExponent(val)); } - /** - * Exponent of the quantity of a number - * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3 - * - * @param val non-negative value - * @return + /** + * Exponent of the quantity of a number + * e.g., 1234 equals to 1.234*10^3, so quantityExponent(1234) is 3 + * + * @param val non-negative value + * @return */ function quantityExponent(val) { @@ -7656,10 +7660,10 @@ } var exp = Math.floor(Math.log(val) / Math.LN10); - /** - * exp is expected to be the rounded-down result of the base-10 log of val. - * But due to the precision loss with Math.log(val), we need to restore it - * using 10^exp to make sure we can get val back from exp. #11249 + /** + * exp is expected to be the rounded-down result of the base-10 log of val. + * But due to the precision loss with Math.log(val), we need to restore it + * using 10^exp to make sure we can get val back from exp. #11249 */ if (val / Math.pow(10, exp) >= 10) { @@ -7668,16 +7672,16 @@ return exp; } - /** - * find a “nice” number approximately equal to x. Round the number if round = true, - * take ceiling if round = false. The primary observation is that the “nicest” - * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers. - * - * See "Nice Numbers for Graph Labels" of Graphic Gems. - * - * @param val Non-negative value. - * @param round - * @return Niced number + /** + * find a “nice” number approximately equal to x. Round the number if round = true, + * take ceiling if round = false. The primary observation is that the “nicest” + * numbers in decimal are 1, 2, and 5, and all power-of-ten multiples of these numbers. + * + * See "Nice Numbers for Graph Labels" of Graphic Gems. + * + * @param val Non-negative value. + * @param round + * @return Niced number */ function nice(val, round) { @@ -7718,11 +7722,11 @@ return exponent >= -20 ? +val.toFixed(exponent < 0 ? -exponent : 0) : val; } - /** - * This code was copied from "d3.js" - * . - * See the license statement at the head of this file. - * @param ascArr + /** + * This code was copied from "d3.js" + * . + * See the license statement at the head of this file. + * @param ascArr */ function quantile(ascArr, p) { @@ -7732,27 +7736,27 @@ var e = H - h; return e ? v + e * (ascArr[h] - v) : v; } - /** - * Order intervals asc, and split them when overlap. - * expect(numberUtil.reformIntervals([ - * {interval: [18, 62], close: [1, 1]}, - * {interval: [-Infinity, -70], close: [0, 0]}, - * {interval: [-70, -26], close: [1, 1]}, - * {interval: [-26, 18], close: [1, 1]}, - * {interval: [62, 150], close: [1, 1]}, - * {interval: [106, 150], close: [1, 1]}, - * {interval: [150, Infinity], close: [0, 0]} - * ])).toEqual([ - * {interval: [-Infinity, -70], close: [0, 0]}, - * {interval: [-70, -26], close: [1, 1]}, - * {interval: [-26, 18], close: [0, 1]}, - * {interval: [18, 62], close: [0, 1]}, - * {interval: [62, 150], close: [0, 1]}, - * {interval: [150, Infinity], close: [0, 0]} - * ]); - * @param list, where `close` mean open or close - * of the interval, and Infinity can be used. - * @return The origin list, which has been reformed. + /** + * Order intervals asc, and split them when overlap. + * expect(numberUtil.reformIntervals([ + * {interval: [18, 62], close: [1, 1]}, + * {interval: [-Infinity, -70], close: [0, 0]}, + * {interval: [-70, -26], close: [1, 1]}, + * {interval: [-26, 18], close: [1, 1]}, + * {interval: [62, 150], close: [1, 1]}, + * {interval: [106, 150], close: [1, 1]}, + * {interval: [150, Infinity], close: [0, 0]} + * ])).toEqual([ + * {interval: [-Infinity, -70], close: [0, 0]}, + * {interval: [-70, -26], close: [1, 1]}, + * {interval: [-26, 18], close: [0, 1]}, + * {interval: [18, 62], close: [0, 1]}, + * {interval: [62, 150], close: [0, 1]}, + * {interval: [150, Infinity], close: [0, 0]} + * ]); + * @param list, where `close` mean open or close + * of the interval, and Infinity can be used. + * @return The origin list, which has been reformed. */ function reformIntervals(list) { @@ -7789,21 +7793,21 @@ return a.interval[lg] < b.interval[lg] || a.interval[lg] === b.interval[lg] && (a.close[lg] - b.close[lg] === (!lg ? 1 : -1) || !lg && littleThan(a, b, 1)); } } - /** - * [Numeric is defined as]: - * `parseFloat(val) == val` - * For example: - * numeric: - * typeof number except NaN, '-123', '123', '2e3', '-2e3', '011', 'Infinity', Infinity, - * and they rounded by white-spaces or line-terminal like ' -123 \n ' (see es spec) - * not-numeric: - * null, undefined, [], {}, true, false, 'NaN', NaN, '123ab', - * empty string, string with only white-spaces or line-terminal (see es spec), - * 0x12, '0x12', '-0x12', 012, '012', '-012', - * non-string, ... - * - * @test See full test cases in `test/ut/spec/util/number.js`. - * @return Must be a typeof number. If not numeric, return NaN. + /** + * [Numeric is defined as]: + * `parseFloat(val) == val` + * For example: + * numeric: + * typeof number except NaN, '-123', '123', '2e3', '-2e3', '011', 'Infinity', Infinity, + * and they rounded by white-spaces or line-terminal like ' -123 \n ' (see es spec) + * not-numeric: + * null, undefined, [], {}, true, false, 'NaN', NaN, '123ab', + * empty string, string with only white-spaces or line-terminal (see es spec), + * 0x12, '0x12', '-0x12', 012, '012', '-012', + * non-string, ... + * + * @test See full test cases in `test/ut/spec/util/number.js`. + * @return Must be a typeof number. If not numeric, return NaN. */ function numericToNumber(val) { @@ -7812,27 +7816,27 @@ && (valFloat !== 0 || !isString(val) || val.indexOf('x') <= 0) // For case ' 0x0 '. ? valFloat : NaN; } - /** - * Definition of "numeric": see `numericToNumber`. + /** + * Definition of "numeric": see `numericToNumber`. */ function isNumeric(val) { return !isNaN(numericToNumber(val)); } - /** - * Use random base to prevent users hard code depending on - * this auto generated marker id. - * @return An positive integer. + /** + * Use random base to prevent users hard code depending on + * this auto generated marker id. + * @return An positive integer. */ function getRandomIdBase() { return Math.round(Math.random() * 9); } - /** - * Get the greatest common divisor. - * - * @param {number} a one number - * @param {number} b the other number + /** + * Get the greatest common divisor. + * + * @param {number} a one number + * @param {number} b the other number */ function getGreatestCommonDividor(a, b) { @@ -7842,11 +7846,11 @@ return getGreatestCommonDividor(b, a % b); } - /** - * Get the least common multiple. - * - * @param {number} a one number - * @param {number} b the other number + /** + * Get the least common multiple. + * + * @param {number} a one number + * @param {number} b the other number */ function getLeastCommonMultiple(a, b) { @@ -7901,14 +7905,14 @@ deprecateLog((scope ? "[" + scope + "]" : '') + (oldOpt + " is deprecated, use " + newOpt + " instead.")); } } - /** - * If in __DEV__ environment, get console printable message for users hint. - * Parameters are separated by ' '. - * @usage - * makePrintable('This is an error on', someVar, someObj); - * - * @param hintInfo anything about the current execution context to hint users. - * @throws Error + /** + * If in __DEV__ environment, get console printable message for users hint. + * Parameters are separated by ' '. + * @usage + * makePrintable('This is an error on', someVar, someObj); + * + * @param hintInfo anything about the current execution context to hint users. + * @throws Error */ function makePrintable() { @@ -7954,8 +7958,8 @@ return msg; } - /** - * @throws Error + /** + * @throws Error */ function throwError(msg) { @@ -7965,35 +7969,35 @@ function interpolateNumber$1(p0, p1, percent) { return (p1 - p0) * percent + p0; } - /** - * Make the name displayable. But we should - * make sure it is not duplicated with user - * specified name, so use '\0'; + /** + * Make the name displayable. But we should + * make sure it is not duplicated with user + * specified name, so use '\0'; */ var DUMMY_COMPONENT_NAME_PREFIX = 'series\0'; var INTERNAL_COMPONENT_ID_PREFIX = '\0_ec_\0'; - /** - * If value is not array, then translate it to array. - * @param {*} value - * @return {Array} [value] or value + /** + * If value is not array, then translate it to array. + * @param {*} value + * @return {Array} [value] or value */ function normalizeToArray(value) { return value instanceof Array ? value : value == null ? [] : [value]; } - /** - * Sync default option between normal and emphasis like `position` and `show` - * In case some one will write code like - * label: { - * show: false, - * position: 'outside', - * fontSize: 18 - * }, - * emphasis: { - * label: { show: true } - * } + /** + * Sync default option between normal and emphasis like `position` and `show` + * In case some one will write code like + * label: { + * show: false, + * position: 'outside', + * fontSize: 18 + * }, + * emphasis: { + * label: { show: true } + * } */ function defaultEmphasis(opt, key, subOpts) { @@ -8019,52 +8023,52 @@ // 'textStyle' // ]); - /** - * The method does not ensure performance. - * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] - * This helper method retrieves value from data. + /** + * The method does not ensure performance. + * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] + * This helper method retrieves value from data. */ function getDataItemValue(dataItem) { return isObject(dataItem) && !isArray(dataItem) && !(dataItem instanceof Date) ? dataItem.value : dataItem; } - /** - * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] - * This helper method determine if dataItem has extra option besides value + /** + * data could be [12, 2323, {value: 223}, [1221, 23], {value: [2, 23]}] + * This helper method determine if dataItem has extra option besides value */ function isDataItemOption(dataItem) { return isObject(dataItem) && !(dataItem instanceof Array); // // markLine data can be array // && !(dataItem[0] && isObject(dataItem[0]) && !(dataItem[0] instanceof Array)); } - /** - * Mapping to existings for merge. - * - * Mode "normalMege": - * The mapping result (merge result) will keep the order of the existing - * component, rather than the order of new option. Because we should ensure - * some specified index reference (like xAxisIndex) keep work. - * And in most cases, "merge option" is used to update partial option but not - * be expected to change the order. - * - * Mode "replaceMege": - * (1) Only the id mapped components will be merged. - * (2) Other existing components (except internal components) will be removed. - * (3) Other new options will be used to create new component. - * (4) The index of the existing components will not be modified. - * That means their might be "hole" after the removal. - * The new components are created first at those available index. - * - * Mode "replaceAll": - * This mode try to support that reproduce an echarts instance from another - * echarts instance (via `getOption`) in some simple cases. - * In this scenario, the `result` index are exactly the consistent with the `newCmptOptions`, - * which ensures the component index referring (like `xAxisIndex: ?`) corrent. That is, - * the "hole" in `newCmptOptions` will also be kept. - * On the contrary, other modes try best to eliminate holes. - * PENDING: This is an experimental mode yet. - * - * @return See the comment of . + /** + * Mapping to existings for merge. + * + * Mode "normalMege": + * The mapping result (merge result) will keep the order of the existing + * component, rather than the order of new option. Because we should ensure + * some specified index reference (like xAxisIndex) keep work. + * And in most cases, "merge option" is used to update partial option but not + * be expected to change the order. + * + * Mode "replaceMege": + * (1) Only the id mapped components will be merged. + * (2) Other existing components (except internal components) will be removed. + * (3) Other new options will be used to create new component. + * (4) The index of the existing components will not be modified. + * That means their might be "hole" after the removal. + * The new components are created first at those available index. + * + * Mode "replaceAll": + * This mode try to support that reproduce an echarts instance from another + * echarts instance (via `getOption`) in some simple cases. + * In this scenario, the `result` index are exactly the consistent with the `newCmptOptions`, + * which ensures the component index referring (like `xAxisIndex: ?`) corrent. That is, + * the "hole" in `newCmptOptions` will also be kept. + * On the contrary, other modes try best to eliminate holes. + * PENDING: This is an experimental mode yet. + * + * @return See the comment of . */ function mappingToExists(existings, newCmptOptions, mode) { @@ -8240,9 +8244,9 @@ }); }); } - /** - * Make id and name for mapping result (result of mappingToExists) - * into `keyInfo` field. + /** + * Make id and name for mapping result (result of mappingToExists) + * into `keyInfo` field. */ @@ -8313,8 +8317,8 @@ return key1 != null && key2 != null && key1 === key2; } - /** - * @return return null if not exist. + /** + * @return return null if not exist. */ @@ -8351,10 +8355,10 @@ return !!(name && name.indexOf(DUMMY_COMPONENT_NAME_PREFIX)); } - /** - * @public - * @param {Object} cmptOption - * @return {boolean} + /** + * @public + * @param {Object} cmptOption + * @return {boolean} */ function isComponentIdInternal(cmptOption) { @@ -8381,10 +8385,10 @@ return subType; } - /** - * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name - * each of which can be Array or primary type. - * @return dataIndex If not found, return undefined/null. + /** + * @param payload Contains dataIndex (means rawIndex) / dataIndexInside / name + * each of which can be Array or primary type. + * @return dataIndex If not found, return undefined/null. */ function queryDataIndex(data, payload) { @@ -8400,25 +8404,25 @@ }) : data.indexOfName(payload.name); } } - /** - * Enable property storage to any host object. - * Notice: Serialization is not supported. - * - * For example: - * let inner = zrUitl.makeInner(); - * - * function some1(hostObj) { - * inner(hostObj).someProperty = 1212; - * ... - * } - * function some2() { - * let fields = inner(this); - * fields.someProperty1 = 1212; - * fields.someProperty2 = 'xx'; - * ... - * } - * - * @return {Function} + /** + * Enable property storage to any host object. + * Notice: Serialization is not supported. + * + * For example: + * let inner = zrUitl.makeInner(); + * + * function some1(hostObj) { + * inner(hostObj).someProperty = 1212; + * ... + * } + * function some2() { + * let fields = inner(this); + * fields.someProperty1 = 1212; + * fields.someProperty2 = 'xx'; + * ... + * } + * + * @return {Function} */ function makeInner() { @@ -8428,8 +8432,8 @@ }; } var innerUniqueIndex = getRandomIdBase(); - /** - * The same behavior as `component.getReferringComponents`. + /** + * The same behavior as `component.getReferringComponents`. */ function parseFinder(ecModel, finderInput, opt) { @@ -8557,19 +8561,19 @@ return renderModeOption || 'html'; } } - /** - * Interpolate raw values of a series with percent - * - * @param data data - * @param labelModel label model of the text element - * @param sourceValue start value. May be null/undefined when init. - * @param targetValue end value - * @param percent 0~1 percentage; 0 uses start value while 1 uses end value - * @return interpolated values - * If `sourceValue` and `targetValue` are `number`, return `number`. - * If `sourceValue` and `targetValue` are `string`, return `string`. - * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`. - * Other cases do not supported. + /** + * Interpolate raw values of a series with percent + * + * @param data data + * @param labelModel label model of the text element + * @param sourceValue start value. May be null/undefined when init. + * @param targetValue end value + * @param percent 0~1 percentage; 0 uses start value while 1 uses end value + * @return interpolated values + * If `sourceValue` and `targetValue` are `number`, return `number`. + * If `sourceValue` and `targetValue` are `string`, return `string`. + * If `sourceValue` and `targetValue` are `(string | number)[]`, return `(string | number)[]`. + * Other cases do not supported. */ function interpolateRawValues(data, precision, sourceValue, targetValue, percent) { @@ -8611,9 +8615,9 @@ var TYPE_DELIMITER = '.'; var IS_CONTAINER = '___EC__COMPONENT__CONTAINER___'; var IS_EXTENDED_CLASS = '___EC__EXTENDED_CLASS___'; - /** - * Notice, parseClassType('') should returns {main: '', sub: ''} - * @public + /** + * Notice, parseClassType('') should returns {main: '', sub: ''} + * @public */ function parseClassType(componentType) { @@ -8630,8 +8634,8 @@ return ret; } - /** - * @public + /** + * @public */ function checkClassType(componentType) { @@ -8641,15 +8645,15 @@ function isExtendedClass(clz) { return !!(clz && clz[IS_EXTENDED_CLASS]); } - /** - * Implements `ExtendableConstructor` for `rootClz`. - * - * @usage - * ```ts - * class Xxx {} - * type XxxConstructor = typeof Xxx & ExtendableConstructor - * enableClassExtend(Xxx as XxxConstructor); - * ``` + /** + * Implements `ExtendableConstructor` for `rootClz`. + * + * @usage + * ```ts + * class Xxx {} + * type XxxConstructor = typeof Xxx & ExtendableConstructor + * enableClassExtend(Xxx as XxxConstructor); + * ``` */ function enableClassExtend(rootClz, mandatoryMethods) { @@ -8707,19 +8711,19 @@ function isESClass(fn) { return isFunction(fn) && /^class\s/.test(Function.prototype.toString.call(fn)); } - /** - * A work around to both support ts extend and this extend mechanism. - * on sub-class. - * @usage - * ```ts - * class Component { ... } - * classUtil.enableClassExtend(Component); - * classUtil.enableClassManagement(Component, {registerWhenExtend: true}); - * - * class Series extends Component { ... } - * // Without calling `markExtend`, `registerWhenExtend` will not work. - * Component.markExtend(Series); - * ``` + /** + * A work around to both support ts extend and this extend mechanism. + * on sub-class. + * @usage + * ```ts + * class Component { ... } + * classUtil.enableClassExtend(Component); + * classUtil.enableClassManagement(Component, {registerWhenExtend: true}); + * + * class Series extends Component { ... } + * // Without calling `markExtend`, `registerWhenExtend` will not work. + * Component.markExtend(Series); + * ``` */ @@ -8728,18 +8732,18 @@ } // A random offset. var classBase = Math.round(Math.random() * 10); - /** - * Implements `CheckableConstructor` for `target`. - * Can not use instanceof, consider different scope by - * cross domain or es module import in ec extensions. - * Mount a method "isInstance()" to Clz. - * - * @usage - * ```ts - * class Xxx {} - * type XxxConstructor = typeof Xxx & CheckableConstructor; - * enableClassCheck(Xxx as XxxConstructor) - * ``` + /** + * Implements `CheckableConstructor` for `target`. + * Can not use instanceof, consider different scope by + * cross domain or es module import in ec extensions. + * Mount a method "isInstance()" to Clz. + * + * @usage + * ```ts + * class Xxx {} + * type XxxConstructor = typeof Xxx & CheckableConstructor; + * enableClassCheck(Xxx as XxxConstructor) + * ``` */ function enableClassCheck(target) { @@ -8773,25 +8777,25 @@ function superApply(context, methodName, args) { return this.superClass.prototype[methodName].apply(context, args); } - /** - * Implements `ClassManager` for `target` - * - * @usage - * ```ts - * class Xxx {} - * type XxxConstructor = typeof Xxx & ClassManager - * enableClassManagement(Xxx as XxxConstructor); - * ``` + /** + * Implements `ClassManager` for `target` + * + * @usage + * ```ts + * class Xxx {} + * type XxxConstructor = typeof Xxx & ClassManager + * enableClassManagement(Xxx as XxxConstructor); + * ``` */ function enableClassManagement(target) { - /** - * Component model classes - * key: componentType, - * value: - * componentClass, when componentType is 'a' - * or Object., when componentType is 'a.b' + /** + * Component model classes + * key: componentType, + * value: + * componentClass, when componentType is 'a' + * or Object., when componentType is 'a.b' */ var storage = {}; @@ -8861,8 +8865,8 @@ var componentTypeInfo = parseClassType(componentType); return !!storage[componentTypeInfo.main]; }; - /** - * @return Like ['aa', 'bb'], but can not be ['aa.xx'] + /** + * @return Like ['aa', 'bb'], but can not be ['aa.xx'] */ @@ -8873,8 +8877,8 @@ }); return types; }; - /** - * If a main type is container and has sub types + /** + * If a main type is container and has sub types */ @@ -12518,10 +12522,10 @@ return state; } - /** - * Set hover style (namely "emphasis style") of element. - * @param el Should not be `zrender/graphic/Group`. - * @param focus 'self' | 'selfInSeries' | 'series' + /** + * Set hover style (namely "emphasis style") of element. + * @param el Should not be `zrender/graphic/Group`. + * @param focus 'self' | 'selfInSeries' | 'series' */ @@ -12885,12 +12889,12 @@ }); return ret; } - /** - * Enable the function that mouseover will trigger the emphasis state. - * - * NOTE: - * This function should be used on the element with dataIndex, seriesIndex. - * + /** + * Enable the function that mouseover will trigger the emphasis state. + * + * NOTE: + * This function should be used on the element with dataIndex, seriesIndex. + * */ function enableHoverEmphasis(el, focus, blurScope) { @@ -12927,8 +12931,8 @@ lineStyle: 'getLineStyle', areaStyle: 'getAreaStyle' }; - /** - * Set emphasis/blur/selected states of element. + /** + * Set emphasis/blur/selected states of element. */ function setStatesStylesFromModel(el, itemModel, styleType, // default itemStyle @@ -12943,24 +12947,24 @@ state.style = getter ? getter(model) : model[defaultStyleGetterMap[styleType]](); } } - /** - * - * Set element as highlight / downplay dispatcher. - * It will be checked when element received mouseover event or from highlight action. - * It's in change of all highlight/downplay behavior of it's children. - * - * @param el - * @param el.highDownSilentOnTouch - * In touch device, mouseover event will be trigger on touchstart event - * (see module:zrender/dom/HandlerProxy). By this mechanism, we can - * conveniently use hoverStyle when tap on touch screen without additional - * code for compatibility. - * But if the chart/component has select feature, which usually also use - * hoverStyle, there might be conflict between 'select-highlight' and - * 'hover-highlight' especially when roam is enabled (see geo for example). - * In this case, `highDownSilentOnTouch` should be used to disable - * hover-highlight on touch device. - * @param asDispatcher If `false`, do not set as "highDownDispatcher". + /** + * + * Set element as highlight / downplay dispatcher. + * It will be checked when element received mouseover event or from highlight action. + * It's in change of all highlight/downplay behavior of it's children. + * + * @param el + * @param el.highDownSilentOnTouch + * In touch device, mouseover event will be trigger on touchstart event + * (see module:zrender/dom/HandlerProxy). By this mechanism, we can + * conveniently use hoverStyle when tap on touch screen without additional + * code for compatibility. + * But if the chart/component has select feature, which usually also use + * hoverStyle, there might be conflict between 'select-highlight' and + * 'hover-highlight' especially when roam is enabled (see geo for example). + * In this case, `highDownSilentOnTouch` should be used to disable + * hover-highlight on touch device. + * @param asDispatcher If `false`, do not set as "highDownDispatcher". */ function setAsHighDownDispatcher(el, asDispatcher) { @@ -12985,13 +12989,13 @@ function isHighDownDispatcher(el) { return !!(el && el.__highDownDispatcher); } - /** - * Support highlight/downplay record on each elements. - * For the case: hover highlight/downplay (legend, visualMap, ...) and - * user triggered highlight/downplay should not conflict. - * Only all of the highlightDigit cleared, return to normal. - * @param {string} highlightKey - * @return {number} highlightDigit + /** + * Support highlight/downplay record on each elements. + * For the case: hover highlight/downplay (legend, visualMap, ...) and + * user triggered highlight/downplay should not conflict. + * Only all of the highlightDigit cleared, return to normal. + * @param {string} highlightKey + * @return {number} highlightDigit */ function getHighlightDigit(highlightKey) { @@ -14447,8 +14451,8 @@ }(Displayable)); var transitionStore = makeInner(); - /** - * Return null if animation is disabled. + /** + * Return null if animation is disabled. */ function getAnimationConfig(animationType, animatableModel, dataIndex, // Extra opts can override the option in animatable model. @@ -14558,21 +14562,21 @@ cb && cb(); } } - /** - * Update graphic element properties with or without animation according to the - * configuration in series. - * - * Caution: this method will stop previous animation. - * So do not use this method to one element twice before - * animation starts, unless you know what you are doing. - * @example - * graphic.updateProps(el, { - * position: [100, 100] - * }, seriesModel, dataIndex, function () { console.log('Animation done!'); }); - * // Or - * graphic.updateProps(el, { - * position: [100, 100] - * }, seriesModel, function () { console.log('Animation done!'); }); + /** + * Update graphic element properties with or without animation according to the + * configuration in series. + * + * Caution: this method will stop previous animation. + * So do not use this method to one element twice before + * animation starts, unless you know what you are doing. + * @example + * graphic.updateProps(el, { + * position: [100, 100] + * }, seriesModel, dataIndex, function () { console.log('Animation done!'); }); + * // Or + * graphic.updateProps(el, { + * position: [100, 100] + * }, seriesModel, function () { console.log('Animation done!'); }); */ @@ -14580,21 +14584,21 @@ animatableModel, dataIndex, cb, during) { animateOrSetProps('update', el, props, animatableModel, dataIndex, cb, during); } - /** - * Init graphic element properties with or without animation according to the - * configuration in series. - * - * Caution: this method will stop previous animation. - * So do not use this method to one element twice before - * animation starts, unless you know what you are doing. + /** + * Init graphic element properties with or without animation according to the + * configuration in series. + * + * Caution: this method will stop previous animation. + * So do not use this method to one element twice before + * animation starts, unless you know what you are doing. */ function initProps(el, props, animatableModel, dataIndex, cb, during) { animateOrSetProps('enter', el, props, animatableModel, dataIndex, cb, during); } - /** - * If element is removed. - * It can determine if element is having remove animation. + /** + * If element is removed. + * It can determine if element is having remove animation. */ function isElementRemoved(el) { @@ -14612,8 +14616,8 @@ return false; } - /** - * Remove graphic element + /** + * Remove graphic element */ function removeElement(el, props, animatableModel, dataIndex, cb, during) { @@ -14653,11 +14657,11 @@ }); } } - /** - * Save old style for style transition in universalTransition module. - * It's used when element will be reused in each render. - * For chart like map, heatmap, which will always create new element. - * We don't need to save this because universalTransition can get old style from the old element + /** + * Save old style for style transition in universalTransition module. + * It's used when element will be reused in each render. + * For chart like map, heatmap, which will always create new element. + * We don't need to save this because universalTransition can get old style from the old element */ function saveOldStyle(el) { @@ -14667,62 +14671,62 @@ var mathMax$4 = Math.max; var mathMin$4 = Math.min; var _customShapeMap = {}; - /** - * Extend shape with parameters + /** + * Extend shape with parameters */ function extendShape(opts) { return Path.extend(opts); } var extendPathFromString = extendFromString; - /** - * Extend path + /** + * Extend path */ function extendPath(pathData, opts) { return extendPathFromString(pathData, opts); } - /** - * Register a user defined shape. - * The shape class can be fetched by `getShapeClass` - * This method will overwrite the registered shapes, including - * the registered built-in shapes, if using the same `name`. - * The shape can be used in `custom series` and - * `graphic component` by declaring `{type: name}`. - * - * @param name - * @param ShapeClass Can be generated by `extendShape`. + /** + * Register a user defined shape. + * The shape class can be fetched by `getShapeClass` + * This method will overwrite the registered shapes, including + * the registered built-in shapes, if using the same `name`. + * The shape can be used in `custom series` and + * `graphic component` by declaring `{type: name}`. + * + * @param name + * @param ShapeClass Can be generated by `extendShape`. */ function registerShape(name, ShapeClass) { _customShapeMap[name] = ShapeClass; } - /** - * Find shape class registered by `registerShape`. Usually used in - * fetching user defined shape. - * - * [Caution]: - * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared - * to use user registered shapes. - * Because the built-in shape (see `getBuiltInShape`) will be registered by - * `registerShape` by default. That enables users to get both built-in - * shapes as well as the shapes belonging to themsleves. But users can overwrite - * the built-in shapes by using names like 'circle', 'rect' via calling - * `registerShape`. So the echarts inner featrues should not fetch shapes from here - * in case that it is overwritten by users, except that some features, like - * `custom series`, `graphic component`, do it deliberately. - * - * (2) In the features like `custom series`, `graphic component`, the user input - * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic - * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names - * are reserved names, that is, if some user registers a shape named `'image'`, - * the shape will not be used. If we intending to add some more reserved names - * in feature, that might bring break changes (disable some existing user shape - * names). But that case probably rarely happens. So we don't make more mechanism - * to resolve this issue here. - * - * @param name - * @return The shape class. If not found, return nothing. + /** + * Find shape class registered by `registerShape`. Usually used in + * fetching user defined shape. + * + * [Caution]: + * (1) This method **MUST NOT be used inside echarts !!!**, unless it is prepared + * to use user registered shapes. + * Because the built-in shape (see `getBuiltInShape`) will be registered by + * `registerShape` by default. That enables users to get both built-in + * shapes as well as the shapes belonging to themsleves. But users can overwrite + * the built-in shapes by using names like 'circle', 'rect' via calling + * `registerShape`. So the echarts inner featrues should not fetch shapes from here + * in case that it is overwritten by users, except that some features, like + * `custom series`, `graphic component`, do it deliberately. + * + * (2) In the features like `custom series`, `graphic component`, the user input + * `{tpye: 'xxx'}` does not only specify shapes but also specify other graphic + * elements like `'group'`, `'text'`, `'image'` or event `'path'`. Those names + * are reserved names, that is, if some user registers a shape named `'image'`, + * the shape will not be used. If we intending to add some more reserved names + * in feature, that might bring break changes (disable some existing user shape + * names). But that case probably rarely happens. So we don't make more mechanism + * to resolve this issue here. + * + * @param name + * @return The shape class. If not found, return nothing. */ function getShapeClass(name) { @@ -14730,12 +14734,12 @@ return _customShapeMap[name]; } } - /** - * Create a path element from path data string - * @param pathData - * @param opts - * @param rect - * @param layout 'center' or 'cover' default to be cover + /** + * Create a path element from path data string + * @param pathData + * @param opts + * @param rect + * @param layout 'center' or 'cover' default to be cover */ function makePath(pathData, opts, rect, layout) { @@ -14751,12 +14755,12 @@ return path; } - /** - * Create a image element from image url - * @param imageUrl image url - * @param opts options - * @param rect constrain rect - * @param layout 'center' or 'cover'. Default to be 'cover' + /** + * Create a image element from image url + * @param imageUrl image url + * @param opts options + * @param rect constrain rect + * @param layout 'center' or 'cover'. Default to be 'cover' */ function makeImage(imageUrl, rect, layout) { @@ -14780,12 +14784,12 @@ }); return zrImg; } - /** - * Get position of centered element in bounding box. - * - * @param rect element local bounding box - * @param boundingRect constraint bounding box - * @return element position containing x, y, width, and height + /** + * Get position of centered element in bounding box. + * + * @param rect element local bounding box + * @param boundingRect constraint bounding box + * @return element position containing x, y, width, and height */ function centerGraphic(rect, boundingRect) { @@ -14812,10 +14816,10 @@ } var mergePath$1 = mergePath; - /** - * Resize a path to fit the rect - * @param path - * @param rect + /** + * Resize a path to fit the rect + * @param path + * @param rect */ function resizePath(path, rect) { @@ -14827,8 +14831,8 @@ var m = pathRect.calculateTransform(rect); path.applyTransform(m); } - /** - * Sub pixel optimize line for canvas + /** + * Sub pixel optimize line for canvas */ function subPixelOptimizeLine$1(shape, lineWidth) { @@ -14837,30 +14841,30 @@ }); return shape; } - /** - * Sub pixel optimize rect for canvas + /** + * Sub pixel optimize rect for canvas */ function subPixelOptimizeRect$1(param) { subPixelOptimizeRect(param.shape, param.shape, param.style); return param; } - /** - * Sub pixel optimize for canvas - * - * @param position Coordinate, such as x, y - * @param lineWidth Should be nonnegative integer. - * @param positiveOrNegative Default false (negative). - * @return Optimized position. + /** + * Sub pixel optimize for canvas + * + * @param position Coordinate, such as x, y + * @param lineWidth Should be nonnegative integer. + * @param positiveOrNegative Default false (negative). + * @return Optimized position. */ var subPixelOptimize$1 = subPixelOptimize; - /** - * Get transform matrix of target (param target), - * in coordinate of its ancestor (param ancestor) - * - * @param target - * @param [ancestor] + /** + * Get transform matrix of target (param target), + * in coordinate of its ancestor (param ancestor) + * + * @param target + * @param [ancestor] */ function getTransform(target, ancestor) { @@ -14873,14 +14877,14 @@ return mat; } - /** - * Apply transform to an vertex. - * @param target [x, y] - * @param transform Can be: - * + Transform matrix: like [1, 0, 0, 1, 0, 0] - * + {position, rotation, scale}, the same as `zrender/Transformable`. - * @param invert Whether use invert matrix. - * @return [x, y] + /** + * Apply transform to an vertex. + * @param target [x, y] + * @param transform Can be: + * + Transform matrix: like [1, 0, 0, 1, 0, 0] + * + {position, rotation, scale}, the same as `zrender/Transformable`. + * @param invert Whether use invert matrix. + * @return [x, y] */ function applyTransform$1(target, transform, invert$1) { @@ -14894,11 +14898,11 @@ return applyTransform([], target, transform); } - /** - * @param direction 'left' 'right' 'top' 'bottom' - * @param transform Transform matrix: like [1, 0, 0, 1, 0, 0] - * @param invert Whether use invert matrix. - * @return Transformed direction. 'left' 'right' 'top' 'bottom' + /** + * @param direction 'left' 'right' 'top' 'bottom' + * @param transform Transform matrix: like [1, 0, 0, 1, 0, 0] + * @param invert Whether use invert matrix. + * @return Transformed direction. 'left' 'right' 'top' 'bottom' */ function transformDirection(direction, transform, invert) { @@ -14917,9 +14921,9 @@ function isPath(el) { return el.shape != null; } - /** - * Apply group transition animation from g1 to g2. - * If no animatableModel, no animation. + /** + * Apply group transition animation from g1 to g2. + * If no animatableModel, no animation. */ @@ -14978,8 +14982,8 @@ return [x, y]; }); } - /** - * Return a new clipped rect. If rect size are negative, return undefined. + /** + * Return a new clipped rect. If rect size are negative, return undefined. */ function clipRectByRect(targetRect, rect) { @@ -15017,11 +15021,11 @@ return iconStr.indexOf('image://') === 0 ? (style.image = iconStr.slice(8), defaults(style, rect), new ZRImage(innerOpts)) : makePath(iconStr.replace('path://', ''), innerOpts, rect, 'center'); } } - /** - * Return `true` if the given line (line `a`) and the given polygon - * are intersect. - * Note that we do not count colinear as intersect here because no - * requirement for that. We could do that if required in future. + /** + * Return `true` if the given line (line `a`) and the given polygon + * are intersect. + * Note that we do not count colinear as intersect here because no + * requirement for that. We could do that if required in future. */ function linePolygonIntersect(a1x, a1y, a2x, a2y, points) { @@ -15035,11 +15039,11 @@ p2 = p; } } - /** - * Return `true` if the given two lines (line `a` and line `b`) - * are intersect. - * Note that we do not count colinear as intersect here because no - * requirement for that. We could do that if required in future. + /** + * Return `true` if the given two lines (line `a` and line `b`) + * are intersect. + * Note that we do not count colinear as intersect here because no + * requirement for that. We could do that if required in future. */ function lineLineIntersect(a1x, a1y, a2x, a2y, b1x, b1y, b2x, b2y) { @@ -15076,8 +15080,8 @@ return true; } - /** - * Cross product of 2-dimension vector. + /** + * Cross product of 2-dimension vector. */ function crossProduct2d(x1, y1, x2, y2) { @@ -15371,8 +15375,8 @@ return statesModels; } - /** - * Set basic textStyle properties. + /** + * Set basic textStyle properties. */ function createTextStyle(textStyleModel, specifiedTextStyle, // Fixed style in the code. Can't be set by model. @@ -15417,14 +15421,14 @@ textConfig.outsideFill = textStyleModel.get('color') === 'inherit' ? opt.inheritColor || null : 'auto'; return textConfig; } - /** - * The uniform entry of set text style, that is, retrieve style definitions - * from `model` and set to `textStyle` object. - * - * Never in merge mode, but in overwrite mode, that is, all of the text style - * properties will be set. (Consider the states of normal and emphasis and - * default value can be adopted, merge would make the logic too complicated - * to manage.) + /** + * The uniform entry of set text style, that is, retrieve style definitions + * from `model` and set to `textStyle` object. + * + * Never in merge mode, but in overwrite mode, that is, all of the text style + * properties will be set. (Consider the states of normal and emphasis and + * default value can be adopted, merge would make the logic too complicated + * to manage.) */ function setTextStyleCommon(textStyle, textStyleModel, opt, isNotNormal, isAttached) { @@ -15712,8 +15716,8 @@ /** @class */ function () { function TextStyleMixin() {} - /** - * Get color property or get color from option.textStyle.color + /** + * Get color property or get color from option.textStyle.color */ // TODO Callback @@ -15722,9 +15726,9 @@ var ecModel = this.ecModel; return this.getShallow('color') || (!isEmphasis && ecModel ? ecModel.get(PATH_COLOR) : null); }; - /** - * Create font string from fontStyle, fontWeight, fontSize, fontFamily - * @return {string} + /** + * Create font string from fontStyle, fontWeight, fontSize, fontFamily + * @return {string} */ @@ -15813,8 +15817,8 @@ rest[_i - 3] = arguments[_i]; } }; - /** - * Merge the input option to me. + /** + * Merge the input option to me. */ @@ -15859,8 +15863,8 @@ parentModel = parentModel || this.parentModel && this.parentModel.getModel(this.resolveParentPath(pathFinal)); return new Model(obj, parentModel, this.ecModel); }; - /** - * If model has option + /** + * If model has option */ @@ -15945,10 +15949,10 @@ mixin(Model, TextStyleMixin); var base = Math.round(Math.random() * 10); - /** - * @public - * @param {string} type - * @return {string} + /** + * @public + * @param {string} type + * @return {string} */ function getUID(type) { @@ -15956,8 +15960,8 @@ // use Math.random to make id as unique as possible. return [type || '', base++].join('_'); } - /** - * Implements `SubTypeDefaulterManager` for `target`. + /** + * Implements `SubTypeDefaulterManager` for `target`. */ function enableSubTypeDefaulter(target) { @@ -15982,22 +15986,22 @@ return type; }; } - /** - * Implements `TopologicalTravelable` for `entity`. - * - * Topological travel on Activity Network (Activity On Vertices). - * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis']. - * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology. - * If there is circular dependencey, Error will be thrown. + /** + * Implements `TopologicalTravelable` for `entity`. + * + * Topological travel on Activity Network (Activity On Vertices). + * Dependencies is defined in Model.prototype.dependencies, like ['xAxis', 'yAxis']. + * If 'xAxis' or 'yAxis' is absent in componentTypeList, just ignore it in topology. + * If there is circular dependencey, Error will be thrown. */ function enableTopologicalTravel(entity, dependencyGetter) { - /** - * @param targetNameList Target Component type list. - * Can be ['aa', 'bb', 'aa.xx'] - * @param fullNameList By which we can build dependency graph. - * @param callback Params: componentType, dependencies. - * @param context Scope of callback. + /** + * @param targetNameList Target Component type list. + * Can be ['aa', 'bb', 'aa.xx'] + * @param fullNameList By which we can build dependency graph. + * @param callback Params: componentType, dependencies. + * @param context Scope of callback. */ entity.topologicalTravel = function (targetNameList, fullNameList, callback, context) { if (!targetNameList.length) { @@ -16134,27 +16138,27 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ - /** - * Language: English. + /** + * Language: English. */ var langEN = { time: { @@ -16290,23 +16294,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var langZH = { time: { @@ -16724,8 +16728,8 @@ return textEl.getBoundingRect(); } - /** - * Add a comma each three digit. + /** + * Add a comma each three digit. */ function addCommas(x) { @@ -16748,12 +16752,12 @@ return str; } var normalizeCssArray$1 = normalizeCssArray; - /** - * Make value user readable for tooltip and label. - * "User readable": - * Try to not print programmer-specific text like NaN, Infinity, null, undefined. - * Avoid to display an empty string, which users can not recognize there is - * a value and it might look like a bug. + /** + * Make value user readable for tooltip and label. + * "User readable": + * Try to not print programmer-specific text like NaN, Infinity, null, undefined. + * Avoid to display an empty string, which users can not recognize there is + * a value and it might look like a bug. */ function makeValueReadable(value, valueType, useUTC) { @@ -16794,9 +16798,9 @@ var wrapVar = function (varName, seriesIdx) { return '{' + varName + (seriesIdx == null ? '' : seriesIdx) + '}'; }; - /** - * Template formatter - * @param {Array.|Object} paramsList + /** + * Template formatter + * @param {Array.|Object} paramsList */ @@ -16867,15 +16871,15 @@ }; } } - /** - * @deprecated Use `time/format` instead. - * ISO Date format - * @param {string} tpl - * @param {number} value - * @param {boolean} [isUTC=false] Default in local time. - * see `module:echarts/scale/Time` - * and `module:echarts/util/number#parseDate`. - * @inner + /** + * @deprecated Use `time/format` instead. + * ISO Date format + * @param {string} tpl + * @param {number} value + * @param {boolean} [isUTC=false] Default in local time. + * see `module:echarts/scale/Time` + * and `module:echarts/util/number#parseDate`. + * @inner */ function formatTime(tpl, value, isUTC) { @@ -16899,27 +16903,27 @@ tpl = tpl.replace('MM', pad(M, 2)).replace('M', M).replace('yyyy', y).replace('yy', pad(y % 100 + '', 2)).replace('dd', pad(d, 2)).replace('d', d).replace('hh', pad(h, 2)).replace('h', h).replace('mm', pad(m, 2)).replace('m', m).replace('ss', pad(s, 2)).replace('s', s).replace('SSS', pad(S, 3)); return tpl; } - /** - * Capital first - * @param {string} str - * @return {string} + /** + * Capital first + * @param {string} str + * @return {string} */ function capitalFirst(str) { return str ? str.charAt(0).toUpperCase() + str.substr(1) : str; } - /** - * @return Never be null/undefined. + /** + * @return Never be null/undefined. */ function convertToColorString(color, defaultColor) { defaultColor = defaultColor || 'transparent'; return isString(color) ? color : isObject(color) ? color.colorStops && (color.colorStops[0] || {}).color || defaultColor : defaultColor; } - /** - * open new tab - * @param link url - * @param target blank or self + /** + * open new tab + * @param link url + * @param target blank or self */ function windowOpen(link, target) { @@ -16934,13 +16938,13 @@ } var each$1 = each; - /** - * @public + /** + * @public */ var LOCATION_PARAMS = ['left', 'right', 'top', 'bottom', 'width', 'height']; - /** - * @public + /** + * @public */ var HV_NAMES = [['width', 'left', 'right'], ['height', 'top', 'bottom']]; @@ -17003,37 +17007,37 @@ orient === 'horizontal' ? x = nextX + gap : y = nextY + gap; }); } - /** - * VBox or HBox layouting - * @param {string} orient - * @param {module:zrender/graphic/Group} group - * @param {number} gap - * @param {number} [width=Infinity] - * @param {number} [height=Infinity] + /** + * VBox or HBox layouting + * @param {string} orient + * @param {module:zrender/graphic/Group} group + * @param {number} gap + * @param {number} [width=Infinity] + * @param {number} [height=Infinity] */ var box = boxLayout; - /** - * VBox layouting - * @param {module:zrender/graphic/Group} group - * @param {number} gap - * @param {number} [width=Infinity] - * @param {number} [height=Infinity] + /** + * VBox layouting + * @param {module:zrender/graphic/Group} group + * @param {number} gap + * @param {number} [width=Infinity] + * @param {number} [height=Infinity] */ var vbox = curry(boxLayout, 'vertical'); - /** - * HBox layouting - * @param {module:zrender/graphic/Group} group - * @param {number} gap - * @param {number} [width=Infinity] - * @param {number} [height=Infinity] + /** + * HBox layouting + * @param {module:zrender/graphic/Group} group + * @param {number} gap + * @param {number} [width=Infinity] + * @param {number} [height=Infinity] */ var hbox = curry(boxLayout, 'horizontal'); - /** - * Parse position info. + /** + * Parse position info. */ function getLayoutRect(positionInfo, containerRect, margin) { @@ -17133,45 +17137,45 @@ rect.margin = margin; return rect; } - /** - * Position a zr element in viewport - * Group position is specified by either - * {left, top}, {right, bottom} - * If all properties exists, right and bottom will be igonred. - * - * Logic: - * 1. Scale (against origin point in parent coord) - * 2. Rotate (against origin point in parent coord) - * 3. Translate (with el.position by this method) - * So this method only fixes the last step 'Translate', which does not affect - * scaling and rotating. - * - * If be called repeatedly with the same input el, the same result will be gotten. - * - * Return true if the layout happened. - * - * @param el Should have `getBoundingRect` method. - * @param positionInfo - * @param positionInfo.left - * @param positionInfo.top - * @param positionInfo.right - * @param positionInfo.bottom - * @param positionInfo.width Only for opt.boundingModel: 'raw' - * @param positionInfo.height Only for opt.boundingModel: 'raw' - * @param containerRect - * @param margin - * @param opt - * @param opt.hv Only horizontal or only vertical. Default to be [1, 1] - * @param opt.boundingMode - * Specify how to calculate boundingRect when locating. - * 'all': Position the boundingRect that is transformed and uioned - * both itself and its descendants. - * This mode simplies confine the elements in the bounding - * of their container (e.g., using 'right: 0'). - * 'raw': Position the boundingRect that is not transformed and only itself. - * This mode is useful when you want a element can overflow its - * container. (Consider a rotated circle needs to be located in a corner.) - * In this mode positionInfo.width/height can only be number. + /** + * Position a zr element in viewport + * Group position is specified by either + * {left, top}, {right, bottom} + * If all properties exists, right and bottom will be igonred. + * + * Logic: + * 1. Scale (against origin point in parent coord) + * 2. Rotate (against origin point in parent coord) + * 3. Translate (with el.position by this method) + * So this method only fixes the last step 'Translate', which does not affect + * scaling and rotating. + * + * If be called repeatedly with the same input el, the same result will be gotten. + * + * Return true if the layout happened. + * + * @param el Should have `getBoundingRect` method. + * @param positionInfo + * @param positionInfo.left + * @param positionInfo.top + * @param positionInfo.right + * @param positionInfo.bottom + * @param positionInfo.width Only for opt.boundingModel: 'raw' + * @param positionInfo.height Only for opt.boundingModel: 'raw' + * @param containerRect + * @param margin + * @param opt + * @param opt.hv Only horizontal or only vertical. Default to be [1, 1] + * @param opt.boundingMode + * Specify how to calculate boundingRect when locating. + * 'all': Position the boundingRect that is transformed and uioned + * both itself and its descendants. + * This mode simplies confine the elements in the bounding + * of their container (e.g., using 'right: 0'). + * 'raw': Position the boundingRect that is not transformed and only itself. + * This mode is useful when you want a element can overflow its + * container. (Consider a rotated circle needs to be located in a corner.) + * In this mode positionInfo.width/height can only be number. */ function positionElement(el, positionInfo, containerRect, margin, opt, out) { @@ -17233,28 +17237,28 @@ type: layoutMode } : null; } - /** - * Consider Case: - * When default option has {left: 0, width: 100}, and we set {right: 0} - * through setOption or media query, using normal zrUtil.merge will cause - * {right: 0} does not take effect. - * - * @example - * ComponentModel.extend({ - * init: function () { - * ... - * let inputPositionParams = layout.getLayoutParams(option); - * this.mergeOption(inputPositionParams); - * }, - * mergeOption: function (newOption) { - * newOption && zrUtil.merge(thisOption, newOption, true); - * layout.mergeLayoutParam(thisOption, newOption); - * } - * }); - * - * @param targetOption - * @param newOption - * @param opt + /** + * Consider Case: + * When default option has {left: 0, width: 100}, and we set {right: 0} + * through setOption or media query, using normal zrUtil.merge will cause + * {right: 0} does not take effect. + * + * @example + * ComponentModel.extend({ + * init: function () { + * ... + * let inputPositionParams = layout.getLayoutParams(option); + * this.mergeOption(inputPositionParams); + * }, + * mergeOption: function (newOption) { + * newOption && zrUtil.merge(thisOption, newOption, true); + * layout.mergeLayoutParam(thisOption, newOption); + * } + * }); + * + * @param targetOption + * @param newOption + * @param opt */ function mergeLayoutParam(targetOption, newOption, opt) { @@ -17333,17 +17337,17 @@ }); } } - /** - * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. + /** + * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. */ function getLayoutParams(source) { return copyLayoutParams({}, source); } - /** - * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. - * @param {Object} source - * @return {Object} Result contains those props. + /** + * Retrieve 'left', 'right', 'top', 'bottom', 'width', 'height' from object. + * @param {Object} source + * @return {Object} Result contains those props. */ function copyLayoutParams(target, source) { @@ -17391,65 +17395,65 @@ mergeLayoutParam(this.option, option, layoutMode); } }; - /** - * Called immediately after `init` or `mergeOption` of this instance called. + /** + * Called immediately after `init` or `mergeOption` of this instance called. */ ComponentModel.prototype.optionUpdated = function (newCptOption, isInit) {}; - /** - * [How to declare defaultOption]: - * - * (A) If using class declaration in typescript (since echarts 5): - * ```ts - * import {ComponentOption} from '../model/option.js'; - * export interface XxxOption extends ComponentOption { - * aaa: number - * } - * export class XxxModel extends Component { - * static type = 'xxx'; - * static defaultOption: XxxOption = { - * aaa: 123 - * } - * } - * Component.registerClass(XxxModel); - * ``` - * ```ts - * import {inheritDefaultOption} from '../util/component.js'; - * import {XxxModel, XxxOption} from './XxxModel.js'; - * export interface XxxSubOption extends XxxOption { - * bbb: number - * } - * class XxxSubModel extends XxxModel { - * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, { - * bbb: 456 - * }) - * fn() { - * let opt = this.getDefaultOption(); - * // opt is {aaa: 123, bbb: 456} - * } - * } - * ``` - * - * (B) If using class extend (previous approach in echarts 3 & 4): - * ```js - * let XxxComponent = Component.extend({ - * defaultOption: { - * xx: 123 - * } - * }) - * ``` - * ```js - * let XxxSubComponent = XxxComponent.extend({ - * defaultOption: { - * yy: 456 - * }, - * fn: function () { - * let opt = this.getDefaultOption(); - * // opt is {xx: 123, yy: 456} - * } - * }) - * ``` + /** + * [How to declare defaultOption]: + * + * (A) If using class declaration in typescript (since echarts 5): + * ```ts + * import {ComponentOption} from '../model/option.js'; + * export interface XxxOption extends ComponentOption { + * aaa: number + * } + * export class XxxModel extends Component { + * static type = 'xxx'; + * static defaultOption: XxxOption = { + * aaa: 123 + * } + * } + * Component.registerClass(XxxModel); + * ``` + * ```ts + * import {inheritDefaultOption} from '../util/component.js'; + * import {XxxModel, XxxOption} from './XxxModel.js'; + * export interface XxxSubOption extends XxxOption { + * bbb: number + * } + * class XxxSubModel extends XxxModel { + * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, { + * bbb: 456 + * }) + * fn() { + * let opt = this.getDefaultOption(); + * // opt is {aaa: 123, bbb: 456} + * } + * } + * ``` + * + * (B) If using class extend (previous approach in echarts 3 & 4): + * ```js + * let XxxComponent = Component.extend({ + * defaultOption: { + * xx: 123 + * } + * }) + * ``` + * ```js + * let XxxSubComponent = XxxComponent.extend({ + * defaultOption: { + * yy: 456 + * }, + * fn: function () { + * let opt = this.getDefaultOption(); + * // opt is {xx: 123, yy: 456} + * } + * }) + * ``` */ @@ -17487,13 +17491,13 @@ return fields.defaultOption; }; - /** - * Notice: always force to input param `useDefault` in case that forget to consider it. - * The same behavior as `modelUtil.parseFinder`. - * - * @param useDefault In many cases like series refer axis and axis refer grid, - * If axis index / axis id not specified, use the first target as default. - * In other cases like dataZoom refer axis, if not specified, measn no refer. + /** + * Notice: always force to input param `useDefault` in case that forget to consider it. + * The same behavior as `modelUtil.parseFinder`. + * + * @param useDefault In many cases like series refer axis and axis refer grid, + * If axis index / axis id not specified, use the first target as default. + * In other cases like dataZoom refer axis, if not specified, measn no refer. */ @@ -17518,10 +17522,10 @@ height: boxLayoutModel.get('height') }; }; - /** - * Get key for zlevel. - * If developers don't configure zlevel. We will assign zlevel to series based on the key. - * For example, lines with trail effect and progressive series will in an individual zlevel. + /** + * Get key for zlevel. + * If developers don't configure zlevel. We will assign zlevel to series based on the key. + * For example, lines with trail effect and progressive series will in an individual zlevel. */ @@ -17592,27 +17596,33 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ - var platform = ''; // Navigator not exists in node + var platform = ''; + + // Process.versions.node exists in node - if (typeof navigator !== 'undefined') { + if ( + typeof process !== 'undefined' && + process.versions && + typeof process.versions.node === 'string' + ) { /* global navigator */ platform = navigator.platform || ''; } @@ -17717,28 +17727,28 @@ }; var innerGlobalModel = makeInner(); - /** - * MUST be called before mergeOption of all series. + /** + * MUST be called before mergeOption of all series. */ function resetSourceDefaulter(ecModel) { // `datasetMap` is used to make default encode. innerGlobalModel(ecModel).datasetMap = createHashMap(); } - /** - * [The strategy of the arrengment of data dimensions for dataset]: - * "value way": all axes are non-category axes. So series one by one take - * several (the number is coordSysDims.length) dimensions from dataset. - * The result of data arrengment of data dimensions like: - * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y | - * "category way": at least one axis is category axis. So the the first data - * dimension is always mapped to the first category axis and shared by - * all of the series. The other data dimensions are taken by series like - * "value way" does. - * The result of data arrengment of data dimensions like: - * | ser_shared_x | ser0_y | ser1_y | ser2_y | - * - * @return encode Never be `null/undefined`. + /** + * [The strategy of the arrengment of data dimensions for dataset]: + * "value way": all axes are non-category axes. So series one by one take + * several (the number is coordSysDims.length) dimensions from dataset. + * The result of data arrengment of data dimensions like: + * | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y | + * "category way": at least one axis is category axis. So the the first data + * dimension is always mapped to the first category axis and shared by + * all of the series. The other data dimensions are taken by series like + * "value way" does. + * The result of data arrengment of data dimensions like: + * | ser_shared_x | ser0_y | ser1_y | ser2_y | + * + * @return encode Never be `null/undefined`. */ function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) { @@ -17817,10 +17827,10 @@ encodeSeriesName.length && (encode.seriesName = encodeSeriesName); return encode; } - /** - * Work for data like [{name: ..., value: ...}, ...]. - * - * @return encode Never be `null/undefined`. + /** + * Work for data like [{name: ..., value: ...}, ...]. + * + * @return encode Never be `null/undefined`. */ function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) { @@ -17903,8 +17913,8 @@ return encode; } - /** - * @return If return null/undefined, indicate that should not use datasetModel. + /** + * @return If return null/undefined, indicate that should not use datasetModel. */ function querySeriesUpstreamDatasetModel(seriesModel) { @@ -17922,8 +17932,8 @@ }, SINGLE_REFERRING).models[0]; } } - /** - * @return Always return an array event empty. + /** + * @return Always return an array event empty. */ function queryDatasetUpstreamDatasetModels(datasetModel) { @@ -17938,10 +17948,10 @@ id: datasetModel.get('fromDatasetId', true) }, SINGLE_REFERRING).models; } - /** - * The rule should not be complex, otherwise user might not - * be able to known where the data is wrong. - * The code is ugly, but how to make it neat? + /** + * The rule should not be complex, otherwise user might not + * be able to known where the data is wrong. + * The code is ugly, but how to make it neat? */ function guessOrdinal(source, dimIndex) { @@ -18125,11 +18135,11 @@ return palettes[paletteNum - 1]; } - /** - * @param name MUST NOT be null/undefined. Otherwise call this function - * twise with the same parameters will get different result. - * @param scope default this. - * @return Can be null/undefined + /** + * @param name MUST NOT be null/undefined. Otherwise call this function + * twise with the same parameters will get different result. + * @param scope default this. + * @return Can be null/undefined */ @@ -18271,12 +18281,12 @@ this._resetOption(null, innerOpt); }; - /** - * @param type null/undefined: reset all. - * 'recreate': force recreate all. - * 'timeline': only reset timeline option - * 'media': only reset media query option - * @return Whether option changed. + /** + * @param type null/undefined: reset all. + * 'recreate': force recreate all. + * 'timeline': only reset timeline option + * 'media': only reset media query option + * @return Whether option changed. */ @@ -18511,8 +18521,8 @@ reCreateSeriesIndices(this); } }; - /** - * Get option for output (cloned option and inner info removed) + /** + * Get option for output (cloned option and inner info removed) */ @@ -18560,8 +18570,8 @@ GlobalModel.prototype.getUpdatePayload = function () { return this._payload; }; - /** - * @param idx If not specified, return the first one. + /** + * @param idx If not specified, return the first one. */ @@ -18582,8 +18592,8 @@ } } }; - /** - * @return Never be null/undefined. + /** + * @return Never be null/undefined. */ @@ -18624,22 +18634,22 @@ return filterBySubType(result, condition); }; - /** - * The interface is different from queryComponents, - * which is convenient for inner usage. - * - * @usage - * let result = findComponents( - * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}} - * ); - * let result = findComponents( - * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}} - * ); - * let result = findComponents( - * {mainType: 'series', - * filter: function (model, index) {...}} - * ); - * // result like [component0, componnet1, ...] + /** + * The interface is different from queryComponents, + * which is convenient for inner usage. + * + * @usage + * let result = findComponents( + * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}} + * ); + * let result = findComponents( + * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}} + * ); + * let result = findComponents( + * {mainType: 'series', + * filter: function (model, index) {...}} + * ); + * // result like [component0, componnet1, ...] */ @@ -18692,8 +18702,8 @@ } } }; - /** - * Get series list before filtered by name. + /** + * Get series list before filtered by name. */ @@ -18703,17 +18713,17 @@ return !!oneSeries && nameStr != null && oneSeries.name === nameStr; }); }; - /** - * Get series list before filtered by index. + /** + * Get series list before filtered by index. */ GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) { return this._componentsMap.get('series')[seriesIndex]; }; - /** - * Get series list before filtered by type. - * FIXME: rename to getRawSeriesByType? + /** + * Get series list before filtered by type. + * FIXME: rename to getRawSeriesByType? */ @@ -18722,8 +18732,8 @@ return !!oneSeries && oneSeries.subType === subType; }); }; - /** - * Get all series before filtered. + /** + * Get all series before filtered. */ @@ -18732,17 +18742,17 @@ return !!oneSeries; }); }; - /** - * Count series before filtered. + /** + * Count series before filtered. */ GlobalModel.prototype.getSeriesCount = function () { return this._componentsCount.get('series'); }; - /** - * After filtering, series may be different - * from raw series. + /** + * After filtering, series may be different + * from raw series. */ @@ -18754,11 +18764,11 @@ cb.call(context, series, rawSeriesIndex); }, this); }; - /** - * Iterate raw series before filtered. - * - * @param {Function} cb - * @param {*} context + /** + * Iterate raw series before filtered. + * + * @param {Function} cb + * @param {*} context */ @@ -18767,9 +18777,9 @@ series && cb.call(context, series, series.componentIndex); }); }; - /** - * After filtering, series may be different. - * from raw series. + /** + * After filtering, series may be different. + * from raw series. */ @@ -18783,8 +18793,8 @@ } }, this); }; - /** - * Iterate raw series before filtered of given type. + /** + * Iterate raw series before filtered of given type. */ @@ -19018,9 +19028,9 @@ var QUERY_REG = /^(min|max)?(.+)$/; // Key: mainType // type FakeComponentsMap = HashMap<(MappingExistingItem & { subType: string })[]>; - /** - * TERM EXPLANATIONS: - * See `ECOption` and `ECUnitOption` in `src/util/types.ts`. + /** + * TERM EXPLANATIONS: + * See `ECOption` and `ECUnitOption` in `src/util/types.ts`. */ var OptionManager = @@ -19037,9 +19047,9 @@ function OptionManager(api) { this._timelineOptions = []; this._mediaList = []; - /** - * -1, means default. - * empty means no media. + /** + * -1, means default. + * empty means no media. */ this._currentMediaIndices = []; @@ -19174,66 +19184,66 @@ return OptionManager; }(); - /** - * [RAW_OPTION_PATTERNS] - * (Note: "series: []" represents all other props in `ECUnitOption`) - * - * (1) No prop "baseOption" declared: - * Root option is used as "baseOption" (except prop "options" and "media"). - * ```js - * option = { - * series: [], - * timeline: {}, - * options: [], - * }; - * option = { - * series: [], - * media: {}, - * }; - * option = { - * series: [], - * timeline: {}, - * options: [], - * media: {}, - * } - * ``` - * - * (2) Prop "baseOption" declared: - * If "baseOption" declared, `ECUnitOption` props can only be declared - * inside "baseOption" except prop "timeline" (compat ec2). - * ```js - * option = { - * baseOption: { - * timeline: {}, - * series: [], - * }, - * options: [] - * }; - * option = { - * baseOption: { - * series: [], - * }, - * media: [] - * }; - * option = { - * baseOption: { - * timeline: {}, - * series: [], - * }, - * options: [] - * media: [] - * }; - * option = { - * // ec3 compat ec2: allow (only) `timeline` declared - * // outside baseOption. Keep this setting for compat. - * timeline: {}, - * baseOption: { - * series: [], - * }, - * options: [], - * media: [] - * }; - * ``` + /** + * [RAW_OPTION_PATTERNS] + * (Note: "series: []" represents all other props in `ECUnitOption`) + * + * (1) No prop "baseOption" declared: + * Root option is used as "baseOption" (except prop "options" and "media"). + * ```js + * option = { + * series: [], + * timeline: {}, + * options: [], + * }; + * option = { + * series: [], + * media: {}, + * }; + * option = { + * series: [], + * timeline: {}, + * options: [], + * media: {}, + * } + * ``` + * + * (2) Prop "baseOption" declared: + * If "baseOption" declared, `ECUnitOption` props can only be declared + * inside "baseOption" except prop "timeline" (compat ec2). + * ```js + * option = { + * baseOption: { + * timeline: {}, + * series: [], + * }, + * options: [] + * }; + * option = { + * baseOption: { + * series: [], + * }, + * media: [] + * }; + * option = { + * baseOption: { + * timeline: {}, + * series: [], + * }, + * options: [] + * media: [] + * }; + * option = { + * // ec3 compat ec2: allow (only) `timeline` declared + * // outside baseOption. Keep this setting for compat. + * timeline: {}, + * baseOption: { + * series: [], + * }, + * options: [], + * media: [] + * }; + * ``` */ @@ -19314,10 +19324,10 @@ mediaList: mediaList }; } - /** - * @see - * Support: width, height, aspectRatio - * Can use max or min as prefix. + /** + * @see + * Support: width, height, aspectRatio + * Can use max or min as prefix. */ @@ -20083,9 +20093,9 @@ function isSourceInstance(val) { return val instanceof SourceImpl; } - /** - * Create a source from option. - * NOTE: Created source is immutable. Don't change any properties in it. + /** + * Create a source from option. + * NOTE: Created source is immutable. Don't change any properties in it. */ function createSource(sourceData, thisMetaRawOption, // can be null. If not provided, auto detect it from `sourceData`. @@ -20104,8 +20114,8 @@ }); return source; } - /** - * Wrap original series data for some compatibility cases. + /** + * Wrap original series data for some compatibility cases. */ function createSourceFromSeriesDataOption(data) { @@ -20114,8 +20124,8 @@ sourceFormat: isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL }); } - /** - * Clone source but excludes source data. + /** + * Clone source but excludes source data. */ function cloneSourceShallow(source) { @@ -20128,8 +20138,8 @@ dimensionsDetectedCount: source.dimensionsDetectedCount }); } - /** - * Note: An empty array will be detected as `SOURCE_FORMAT_ARRAY_ROWS`. + /** + * Note: An empty array will be detected as `SOURCE_FORMAT_ARRAY_ROWS`. */ function detectSourceFormat(data) { @@ -20167,9 +20177,9 @@ return sourceFormat; } - /** - * Determine the source definitions from data standalone dimensions definitions - * are not specified. + /** + * Determine the source definitions from data standalone dimensions definitions + * are not specified. */ function determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader, // standalone raw dimensions definition, like: @@ -20356,30 +20366,30 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var _a, _b, _c; // TODO var providerMethods; var mountMethods; - /** - * If normal array used, mutable chunk size is supported. - * If typed array used, chunk size must be fixed. + /** + * If normal array used, mutable chunk size is supported. + * If typed array used, chunk size must be fixed. */ var DefaultDataProvider = @@ -20701,8 +20711,8 @@ /** @class */ function () { function DataFormatMixin() {} - /** - * Get params for formatter + /** + * Get params for formatter */ @@ -20739,15 +20749,15 @@ $vars: ['seriesName', 'name', 'value'] }; }; - /** - * Format label - * @param dataIndex - * @param status 'normal' by default - * @param dataType - * @param labelDimIndex Only used in some chart that - * use formatter in different dimensions, like radar. - * @param formatter Formatter given outside. - * @return return null/undefined if no formatter + /** + * Format label + * @param dataIndex + * @param status 'normal' by default + * @param dataType + * @param labelDimIndex Only used in some chart that + * use formatter in different dimensions, like radar. + * @param formatter Formatter given outside. + * @return return null/undefined if no formatter */ @@ -20806,19 +20816,19 @@ }); } }; - /** - * Get raw value in option + /** + * Get raw value in option */ DataFormatMixin.prototype.getRawValue = function (idx, dataType) { return retrieveRawValue(this.getData(dataType), idx); }; - /** - * Should be implemented. - * @param {number} dataIndex - * @param {boolean} [multipleSeries=false] - * @param {string} [dataType] + /** + * Should be implemented. + * @param {number} dataIndex + * @param {boolean} [multipleSeries=false] + * @param {string} [dataType] */ @@ -20839,8 +20849,8 @@ // markers: Dictionary; // }; - /** - * For backward compat, normalize the return from `formatTooltip`. + /** + * For backward compat, normalize the return from `formatTooltip`. */ function normalizeTooltipFormatResult(result) { @@ -20874,9 +20884,9 @@ }; } - /** - * @param {Object} define - * @return See the return of `createTask`. + /** + * @param {Object} define + * @return See the return of `createTask`. */ function createTask(define) { @@ -20894,12 +20904,12 @@ this._onDirty = define.onDirty; this._dirty = true; } - /** - * @param step Specified step. - * @param skip Skip customer perform call. - * @param modBy Sampling window size. - * @param modDataCount Sampling count. - * @return whether unfinished. + /** + * @param step Specified step. + * @param skip Skip customer perform call. + * @param modBy Sampling window size. + * @param modDataCount Sampling count. + * @return whether unfinished. */ @@ -21053,9 +21063,9 @@ Task.prototype.unfinished = function () { return this._progress && this._dueIndex < this._dueEnd; }; - /** - * @param downTask The downstream task. - * @return The downstream task. + /** + * @param downTask The downstream task. + * @return The downstream task. */ @@ -21218,13 +21228,13 @@ // } // }; - /** - * Convert raw the value in to inner value in List. - * - * [Performance sensitive] - * - * [Caution]: this is the key logic of user value parser. - * For backward compatibility, do not modify it until you have to! + /** + * Convert raw the value in to inner value in List. + * + * [Performance sensitive] + * + * [Caution]: this is the key logic of user value parser. + * For backward compatibility, do not modify it until you have to! */ function parseDataValue(value, // For high performance, do not omit the second param. @@ -21270,11 +21280,11 @@ var SortOrderComparator = /** @class */ function () { - /** - * @param order by default: 'asc' - * @param incomparable by default: Always on the tail. - * That is, if 'asc' => 'max', if 'desc' => 'min' - * See the definition of "incomparable" in [SORT_COMPARISON_RULE]. + /** + * @param order by default: 'asc' + * @param incomparable by default: Always on the tail. + * That is, if 'asc' => 'max', if 'desc' => 'min' + * See the definition of "incomparable" in [SORT_COMPARISON_RULE]. */ function SortOrderComparator(order, incomparable) { var isDesc = order === 'desc'; @@ -21323,9 +21333,9 @@ return SortOrderComparator; }(); - /** - * TODO: disable writable. - * This structure will be exposed to users. + /** + * TODO: disable writable. + * This structure will be exposed to users. */ var ExternalSource = @@ -21346,22 +21356,22 @@ ExternalSource.prototype.cloneRawData = function () { return; }; - /** - * @return If dimension not found, return null/undefined. + /** + * @return If dimension not found, return null/undefined. */ ExternalSource.prototype.getDimensionInfo = function (dim) { return; }; - /** - * dimensions defined if and only if either: - * (a) dataset.dimensions are declared. - * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`). - * If dimensions are defined, `dimensionInfoAll` is corresponding to - * the defined dimensions. - * Otherwise, `dimensionInfoAll` is determined by data columns. - * @return Always return an array (even empty array). + /** + * dimensions defined if and only if either: + * (a) dataset.dimensions are declared. + * (b) dataset data include dimensions definitions in data (detected or via specified `sourceHeader`). + * If dimensions are defined, `dimensionInfoAll` is corresponding to + * the defined dimensions. + * Otherwise, `dimensionInfoAll` is determined by data columns. + * @return Always return an array (even empty array). */ @@ -21372,10 +21382,10 @@ ExternalSource.prototype.count = function () { return; }; - /** - * Only support by dimension index. - * No need to support by dimension name in transform function, - * because transform function is not case-specific, no need to use name literally. + /** + * Only support by dimension index. + * No need to support by dimension name in transform function, + * because transform function is not case-specific, no need to use name literally. */ @@ -21713,27 +21723,27 @@ var resultMetaRawOption; var firstUpSource = upSourceList[0]; - /** - * Intuitively, the end users known the content of the original `dataset.source`, - * calucating the transform result in mind. - * Suppose the original `dataset.source` is: - * ```js - * [ - * ['product', '2012', '2013', '2014', '2015'], - * ['AAA', 41.1, 30.4, 65.1, 53.3], - * ['BBB', 86.5, 92.1, 85.7, 83.1], - * ['CCC', 24.1, 67.2, 79.5, 86.4] - * ] - * ``` - * The dimension info have to be detected from the source data. - * Some of the transformers (like filter, sort) will follow the dimension info - * of upstream, while others use new dimensions (like aggregate). - * Transformer can output a field `dimensions` to define the its own output dimensions. - * We also allow transformers to ignore the output `dimensions` field, and - * inherit the upstream dimensions definition. It can reduce the burden of handling - * dimensions in transformers. - * - * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`. + /** + * Intuitively, the end users known the content of the original `dataset.source`, + * calucating the transform result in mind. + * Suppose the original `dataset.source` is: + * ```js + * [ + * ['product', '2012', '2013', '2014', '2015'], + * ['AAA', 41.1, 30.4, 65.1, 53.3], + * ['BBB', 86.5, 92.1, 85.7, 83.1], + * ['CCC', 24.1, 67.2, 79.5, 86.4] + * ] + * ``` + * The dimension info have to be detected from the source data. + * Some of the transformers (like filter, sort) will follow the dimension info + * of upstream, while others use new dimensions (like aggregate). + * Transformer can output a field `dimensions` to define the its own output dimensions. + * We also allow transformers to ignore the output `dimensions` field, and + * inherit the upstream dimensions definition. It can reduce the burden of handling + * dimensions in transformers. + * + * See also [DIMENSION_INHERIT_RULE] in `sourceManager.ts`. */ if (firstUpSource && resultIndex === 0 // If transformer returns `dimensions`, it means that the transformer has different @@ -21780,8 +21790,8 @@ var CtorUint16Array = typeof Uint16Array === UNDEFINED ? Array : Uint16Array; var CtorInt32Array = typeof Int32Array === UNDEFINED ? Array : Int32Array; var CtorFloat64Array = typeof Float64Array === UNDEFINED ? Array : Float64Array; - /** - * Multi dimensional data store + /** + * Multi dimensional data store */ var dataCtors = { @@ -21830,8 +21840,8 @@ store[dimIdx] = new DataCtor(end); } } - /** - * Basically, DataStore API keep immutable. + /** + * Basically, DataStore API keep immutable. */ var DataStore = @@ -21846,8 +21856,8 @@ this._rawCount = 0; this._calcDimNameToIdx = createHashMap(); } - /** - * Initialize from data + /** + * Initialize from data */ @@ -21888,20 +21898,20 @@ DataStore.prototype.getProvider = function () { return this._provider; }; - /** - * Caution: even when a `source` instance owned by a series, the created data store - * may still be shared by different sereis (the source hash does not use all `source` - * props, see `sourceManager`). In this case, the `source` props that are not used in - * hash (like `source.dimensionDefine`) probably only belongs to a certain series and - * thus should not be fetch here. + /** + * Caution: even when a `source` instance owned by a series, the created data store + * may still be shared by different sereis (the source hash does not use all `source` + * props, see `sourceManager`). In this case, the `source` props that are not used in + * hash (like `source.dimensionDefine`) probably only belongs to a certain series and + * thus should not be fetch here. */ DataStore.prototype.getSource = function () { return this._provider.getSource(); }; - /** - * @caution Only used in dataStack. + /** + * @caution Only used in dataStack. */ @@ -21966,8 +21976,8 @@ var item = this._dimensions[dimIndex]; return item && item.property; }; - /** - * Caution: Can be only called on raw data (before `this._indices` created). + /** + * Caution: Can be only called on raw data (before `this._indices` created). */ @@ -22088,8 +22098,8 @@ DataStore.prototype.count = function () { return this._count; }; - /** - * Get value. Return NaN if idx is out of range. + /** + * Get value. Return NaN if idx is out of range. */ @@ -22124,8 +22134,8 @@ return values; }; - /** - * @param dim concrete dim + /** + * @param dim concrete dim */ @@ -22137,8 +22147,8 @@ var dimStore = this._chunks[dim]; return dimStore ? dimStore[rawIdx] : NaN; }; - /** - * Get sum of data in one dimension + /** + * Get sum of data in one dimension */ @@ -22158,8 +22168,8 @@ return sum; }; - /** - * Get median of data in one dimension + /** + * Get median of data in one dimension */ @@ -22180,8 +22190,8 @@ return len === 0 ? 0 : len % 2 === 1 ? sortedDimDataArray[(len - 1) / 2] : (sortedDimDataArray[len / 2] + sortedDimDataArray[len / 2 - 1]) / 2; }; - /** - * Retrieve the index with given raw data index. + /** + * Retrieve the index with given raw data index. */ @@ -22220,13 +22230,13 @@ return -1; }; - /** - * Retrieve the index of nearest value. - * @param dim - * @param value - * @param [maxDistance=Infinity] - * @return If and only if multiple indices have - * the same value, they are put to the result. + /** + * Retrieve the index of nearest value. + * @param dim + * @param value + * @param [maxDistance=Infinity] + * @return If and only if multiple indices have + * the same value, they are put to the result. */ @@ -22303,8 +22313,8 @@ return newIndices; }; - /** - * Data filter. + /** + * Data filter. */ @@ -22361,9 +22371,9 @@ return newStore; }; - /** - * Select data in range. (For optimization of filter) - * (Manually inline code, support 5 million data filtering in data zoom.) + /** + * Select data in range. (For optimization of filter) + * (Manually inline code, support 5 million data filtering in data zoom.) */ @@ -22489,8 +22499,8 @@ // return result; // } - /** - * Data mapping to a new List with given dimensions + /** + * Data mapping to a new List with given dimensions */ @@ -22502,8 +22512,8 @@ return target; }; - /** - * @caution Danger!! Only used in dataStack. + /** + * @caution Danger!! Only used in dataStack. */ @@ -22561,10 +22571,10 @@ } } }; - /** - * Large data down sampling using largest-triangle-three-buckets - * @param {string} valueDimension - * @param {number} targetCount + /** + * Large data down sampling using largest-triangle-three-buckets + * @param {string} valueDimension + * @param {number} targetCount */ @@ -22652,9 +22662,9 @@ target.getRawIndex = this._getRawIdx; return target; }; - /** - * Large data down sampling on given dimension - * @param sampleIndex Sample index for name and id + /** + * Large data down sampling on given dimension + * @param sampleIndex Sample index for name and id */ @@ -22704,13 +22714,13 @@ return target; }; - /** - * Data iteration - * @param ctx default this - * @example - * list.each('x', function (x, idx) {}); - * list.each(['x', 'y'], function (x, y, idx) {}); - * list.each(function (idx) {}) + /** + * Data iteration + * @param ctx default this + * @example + * list.each('x', function (x, idx) {}); + * list.each(['x', 'y'], function (x, y, idx) {}); + * list.each(function (idx) {}) */ @@ -22752,8 +22762,8 @@ } } }; - /** - * Get extent of data in one dimension + /** + * Get extent of data in one dimension */ @@ -22799,8 +22809,8 @@ this._extent[dim] = dimExtent; return dimExtent; }; - /** - * Get raw data item + /** + * Get raw data item */ @@ -22820,10 +22830,10 @@ return this._provider.getItem(rawIdx); } }; - /** - * Clone shallow. - * - * @param clonedDims Determine which dims to clone. Will share the data if not specified. + /** + * Clone shallow. + * + * @param clonedDims Determine which dims to clone. Will share the data if not specified. */ @@ -22931,95 +22941,95 @@ return DataStore; }(); - /** - * [REQUIREMENT_MEMO]: - * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option. - * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and - * `root-dataset`. Them on `series` has higher priority. - * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might - * confuse users: whether those props indicate how to visit the upstream source or visit - * the transform result source, and some transforms has nothing to do with these props, - * and some transforms might have multiple upstream. - * (3) Transforms should specify `metaRawOption` in each output, just like they can be - * declared in `root-dataset`. - * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms. - * That is for reducing complexity in transforms. - * PENDING: Whether to provide transposition transform? - * - * [IMPLEMENTAION_MEMO]: - * "sourceVisitConfig" are calculated from `metaRawOption` and `data`. - * They will not be calculated until `source` is about to be visited (to prevent from - * duplicate calcuation). `source` is visited only in series and input to transforms. - * - * [DIMENSION_INHERIT_RULE]: - * By default the dimensions are inherited from ancestors, unless a transform return - * a new dimensions definition. - * Consider the case: - * ```js - * dataset: [{ - * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...] - * }, { - * transform: { type: 'filter', ... } - * }] - * dataset: [{ - * dimension: ['Product', 'Sales', 'Prise'], - * source: [ ['Cookies', 321, 44.21], ...] - * }, { - * transform: { type: 'filter', ... } - * }] - * ``` - * The two types of option should have the same behavior after transform. - * - * - * [SCENARIO]: - * (1) Provide source data directly: - * ```js - * series: { - * encode: {...}, - * dimensions: [...] - * seriesLayoutBy: 'row', - * data: [[...]] - * } - * ``` - * (2) Series refer to dataset. - * ```js - * series: [{ - * encode: {...} - * // Ignore datasetIndex means `datasetIndex: 0` - * // and the dimensions defination in dataset is used - * }, { - * encode: {...}, - * seriesLayoutBy: 'column', - * datasetIndex: 1 - * }] - * ``` - * (3) dataset transform - * ```js - * dataset: [{ - * source: [...] - * }, { - * source: [...] - * }, { - * // By default from 0. - * transform: { type: 'filter', config: {...} } - * }, { - * // Piped. - * transform: [ - * { type: 'filter', config: {...} }, - * { type: 'sort', config: {...} } - * ] - * }, { - * id: 'regressionData', - * fromDatasetIndex: 1, - * // Third-party transform - * transform: { type: 'ecStat:regression', config: {...} } - * }, { - * // retrieve the extra result. - * id: 'regressionFormula', - * fromDatasetId: 'regressionData', - * fromTransformResult: 1 - * }] - * ``` + /** + * [REQUIREMENT_MEMO]: + * (0) `metaRawOption` means `dimensions`/`sourceHeader`/`seriesLayoutBy` in raw option. + * (1) Keep support the feature: `metaRawOption` can be specified both on `series` and + * `root-dataset`. Them on `series` has higher priority. + * (2) Do not support to set `metaRawOption` on a `non-root-dataset`, because it might + * confuse users: whether those props indicate how to visit the upstream source or visit + * the transform result source, and some transforms has nothing to do with these props, + * and some transforms might have multiple upstream. + * (3) Transforms should specify `metaRawOption` in each output, just like they can be + * declared in `root-dataset`. + * (4) At present only support visit source in `SERIES_LAYOUT_BY_COLUMN` in transforms. + * That is for reducing complexity in transforms. + * PENDING: Whether to provide transposition transform? + * + * [IMPLEMENTAION_MEMO]: + * "sourceVisitConfig" are calculated from `metaRawOption` and `data`. + * They will not be calculated until `source` is about to be visited (to prevent from + * duplicate calcuation). `source` is visited only in series and input to transforms. + * + * [DIMENSION_INHERIT_RULE]: + * By default the dimensions are inherited from ancestors, unless a transform return + * a new dimensions definition. + * Consider the case: + * ```js + * dataset: [{ + * source: [ ['Product', 'Sales', 'Prise'], ['Cookies', 321, 44.21], ...] + * }, { + * transform: { type: 'filter', ... } + * }] + * dataset: [{ + * dimension: ['Product', 'Sales', 'Prise'], + * source: [ ['Cookies', 321, 44.21], ...] + * }, { + * transform: { type: 'filter', ... } + * }] + * ``` + * The two types of option should have the same behavior after transform. + * + * + * [SCENARIO]: + * (1) Provide source data directly: + * ```js + * series: { + * encode: {...}, + * dimensions: [...] + * seriesLayoutBy: 'row', + * data: [[...]] + * } + * ``` + * (2) Series refer to dataset. + * ```js + * series: [{ + * encode: {...} + * // Ignore datasetIndex means `datasetIndex: 0` + * // and the dimensions defination in dataset is used + * }, { + * encode: {...}, + * seriesLayoutBy: 'column', + * datasetIndex: 1 + * }] + * ``` + * (3) dataset transform + * ```js + * dataset: [{ + * source: [...] + * }, { + * source: [...] + * }, { + * // By default from 0. + * transform: { type: 'filter', config: {...} } + * }, { + * // Piped. + * transform: [ + * { type: 'filter', config: {...} }, + * { type: 'sort', config: {...} } + * ] + * }, { + * id: 'regressionData', + * fromDatasetIndex: 1, + * // Third-party transform + * transform: { type: 'ecStat:regression', config: {...} } + * }, { + * // retrieve the extra result. + * id: 'regressionFormula', + * fromDatasetId: 'regressionData', + * fromTransformResult: 1 + * }] + * ``` */ var SourceManager = @@ -23035,8 +23045,8 @@ this._dirty = true; this._sourceHost = sourceHost; } - /** - * Mark dirty. + /** + * Mark dirty. */ @@ -23056,17 +23066,17 @@ this._versionSignBase = 0; } }; - /** - * For detecting whether the upstream source is dirty, so that - * the local cached source (in `_sourceList`) should be discarded. + /** + * For detecting whether the upstream source is dirty, so that + * the local cached source (in `_sourceList`) should be discarded. */ SourceManager.prototype._getVersionSign = function () { return this._sourceHost.uid + '_' + this._versionSignBase; }; - /** - * Always return a source instance. Otherwise throw error. + /** + * Always return a source instance. Otherwise throw error. */ @@ -23224,9 +23234,9 @@ } } }; - /** - * @param sourceIndex By default 0, means "main source". - * In most cases there is only one source. + /** + * @param sourceIndex By default 0, means "main source". + * In most cases there is only one source. */ @@ -23243,13 +23253,13 @@ return source; }; - /** - * - * Get a data store which can be shared across series. - * Only available for series. - * - * @param seriesDimRequest Dimensions that are generated in series. - * Should have been sorted by `storeDimIndex` asc. + /** + * + * Get a data store which can be shared across series. + * Only available for series. + * + * @param seriesDimRequest Dimensions that are generated in series. + * Should have been sorted by `storeDimIndex` asc. */ @@ -23290,9 +23300,9 @@ return cachedStore; }; - /** - * PENDING: Is it fast enough? - * If no upstream, return empty array. + /** + * PENDING: Is it fast enough? + * If no upstream, return empty array. */ @@ -23514,8 +23524,8 @@ return renderMode === 'richText' ? (noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameRichText(ctx, readableName, nameStyle)) // Value has commas inside, so use ' ' as delimiter for multiple values. + (noValue ? '' : wrapInlineValueRichText(ctx, readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)) : wrapBlockHTML((noMarker ? '' : markerStr) + (noName ? '' : wrapInlineNameHTML(readableName, !noMarker, nameStyle)) + (noValue ? '' : wrapInlineValueHTML(readableValueList, valueAlignRight, valueCloseToMarker, valueStyle)), topMarginForOuterGap); } - /** - * @return markupText. null/undefined means no content. + /** + * @return markupText. null/undefined means no content. */ @@ -23589,10 +23599,10 @@ return padding != null ? padding // We give slightly different to look pretty. : renderMode === 'richText' ? [8, 10] : 10; } - /** - * The major feature is generate styles for `renderMode: 'richText'`. - * But it also serves `renderMode: 'html'` to provide - * "renderMode-independent" API. + /** + * The major feature is generate styles for `renderMode: 'richText'`. + * But it also serves `renderMode: 'html'` to provide + * "renderMode-independent" API. */ var TooltipMarkupStyleCreator = @@ -23630,20 +23640,20 @@ return marker.content; } }; - /** - * @usage - * ```ts - * const styledText = markupStyleCreator.wrapRichTextStyle([ - * // The styles will be auto merged. - * { - * fontSize: 12, - * color: 'blue' - * }, - * { - * padding: 20 - * } - * ]); - * ``` + /** + * @usage + * ```ts + * const styledText = markupStyleCreator.wrapRichTextStyle([ + * // The styles will be auto merged. + * { + * fontSize: 12, + * color: 'blue' + * }, + * { + * padding: 20 + * } + * ]); + * ``` */ @@ -23834,8 +23844,8 @@ this._initSelectedMapFromData(data); }; - /** - * Util for merge default and theme to option + /** + * Util for merge default and theme to option */ @@ -23900,17 +23910,17 @@ } } }; - /** - * Init a data structure from data related option in series - * Must be overridden. + /** + * Init a data structure from data related option in series + * Must be overridden. */ SeriesModel.prototype.getInitialData = function (option, ecModel) { return; }; - /** - * Append data to list + /** + * Append data to list */ @@ -23921,11 +23931,11 @@ var data = this.getRawData(); data.appendData(params.data); }; - /** - * Consider some method like `filter`, `map` need make new data, - * We should make sure that `seriesModel.getData()` get correct - * data in the stream procedure. So we fetch data from upstream - * each time `task.perform` called. + /** + * Consider some method like `filter`, `map` need make new data, + * We should make sure that `seriesModel.getData()` get correct + * data in the stream procedure. So we fetch data from upstream + * each time `task.perform` called. */ @@ -23993,8 +24003,8 @@ SeriesModel.prototype.getSource = function () { return this.getSourceManager().getSource(); }; - /** - * Get data before processed + /** + * Get data before processed */ @@ -24010,11 +24020,11 @@ SeriesModel.prototype.isColorBySeries = function () { return this.getColorBy() === 'series'; }; - /** - * Get base axis if has coordinate system and has axis. - * By default use coordSys.getBaseAxis(); - * Can be overridden for some chart. - * @return {type} description + /** + * Get base axis if has coordinate system and has axis. + * By default use coordSys.getBaseAxis(); + * Can be overridden for some chart. + * @return {type} description */ @@ -24023,19 +24033,19 @@ return coordSys && coordSys.getBaseAxis && coordSys.getBaseAxis(); }; - /** - * Default tooltip formatter - * - * @param dataIndex - * @param multipleSeries - * @param dataType - * @param renderMode valid values: 'html'(by default) and 'richText'. - * 'html' is used for rendering tooltip in extra DOM form, and the result - * string is used as DOM HTML content. - * 'richText' is used for rendering tooltip in rich text form, for those where - * DOM operation is not supported. - * @return formatted tooltip with `html` and `markers` - * Notice: The override method can also return string + /** + * Default tooltip formatter + * + * @param dataIndex + * @param multipleSeries + * @param dataType + * @param renderMode valid values: 'html'(by default) and 'richText'. + * 'html' is used for rendering tooltip in extra DOM form, and the result + * string is used as DOM HTML content. + * 'richText' is used for rendering tooltip in rich text form, for those where + * DOM operation is not supported. + * @return formatted tooltip with `html` and `markers` + * Notice: The override method can also return string */ @@ -24081,25 +24091,25 @@ return color; }; - /** - * Use `data.mapDimensionsAll(coordDim)` instead. - * @deprecated + /** + * Use `data.mapDimensionsAll(coordDim)` instead. + * @deprecated */ SeriesModel.prototype.coordDimToDataDim = function (coordDim) { return this.getRawData().mapDimensionsAll(coordDim); }; - /** - * Get progressive rendering count each step + /** + * Get progressive rendering count each step */ SeriesModel.prototype.getProgressive = function () { return this.get('progressive'); }; - /** - * Get progressive rendering count each step + /** + * Get progressive rendering count each step */ @@ -24280,10 +24290,10 @@ mixin(SeriesModel, DataFormatMixin); mixin(SeriesModel, PaletteMixin); mountExtend(SeriesModel, ComponentModel); - /** - * MUST be called after `prepareSource` called - * Here we need to make auto series, especially for auto legend. But we - * do not modify series.name in option to avoid side effects. + /** + * MUST be called after `prepareSource` called + * Here we need to make auto series, especially for auto legend. But we + * do not modify series.name in option to avoid side effects. */ function autoSeriesName(seriesModel) { @@ -24385,19 +24395,19 @@ ComponentView.prototype.updateVisual = function (model, ecModel, api, payload) {// Do nothing; }; - /** - * Hook for toggle blur target series. - * Can be used in marker for blur or leave blur the markers + /** + * Hook for toggle blur target series. + * Can be used in marker for blur or leave blur the markers */ ComponentView.prototype.toggleBlurSeries = function (seriesModels, isBlur, ecModel) {// Do nothing; }; - /** - * Traverse the new rendered elements. - * - * It will traverse the new added element in progressive rendering. - * And traverse all in normal rendering. + /** + * Traverse the new rendered elements. + * + * It will traverse the new added element in progressive rendering. + * And traverse all in normal rendering. */ @@ -24414,8 +24424,8 @@ enableClassExtend(ComponentView); enableClassManagement(ComponentView); - /** - * @return {string} If large mode changed, return string 'reset'; + /** + * @return {string} If large mode changed, return string 'reset'; */ function createRenderPlanner() { @@ -24459,8 +24469,8 @@ throw new Error('render method must been implemented'); } }; - /** - * Highlight series or specified data item. + /** + * Highlight series or specified data item. */ @@ -24477,8 +24487,8 @@ toggleHighlight(data, payload, 'emphasis'); }; - /** - * Downplay series or specified data item. + /** + * Downplay series or specified data item. */ @@ -24495,16 +24505,16 @@ toggleHighlight(data, payload, 'normal'); }; - /** - * Remove self. + /** + * Remove self. */ ChartView.prototype.remove = function (ecModel, api) { this.group.removeAll(); }; - /** - * Dispose self. + /** + * Dispose self. */ @@ -24523,11 +24533,11 @@ ChartView.prototype.updateVisual = function (seriesModel, ecModel, api, payload) { this.render(seriesModel, ecModel, api, payload); }; - /** - * Traverse the new rendered elements. - * - * It will traverse the new added element in progressive rendering. - * And traverse all in normal rendering. + /** + * Traverse the new rendered elements. + * + * It will traverse the new added element in progressive rendering. + * And traverse all in normal rendering. */ @@ -24546,8 +24556,8 @@ return ChartView; }(); - /** - * Set state of single element + /** + * Set state of single element */ function elSetState(el, state, highlightDigit) { @@ -24640,35 +24650,35 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var ORIGIN_METHOD = '\0__throttleOriginMethod'; var RATE = '\0__throttleRate'; var THROTTLE_TYPE = '\0__throttleType'; - /** - * @public - * @param {(Function)} fn - * @param {number} [delay=0] Unit: ms. - * @param {boolean} [debounce=false] - * true: If call interval less than `delay`, only the last call works. - * false: If call interval less than `delay, call works on fixed rate. - * @return {(Function)} throttled fn. + /** + * @public + * @param {(Function)} fn + * @param {number} [delay=0] Unit: ms. + * @param {boolean} [debounce=false] + * true: If call interval less than `delay`, only the last call works. + * false: If call interval less than `delay, call works on fixed rate. + * @return {(Function)} throttled fn. */ function throttle(fn, delay, debounce) { @@ -24723,9 +24733,9 @@ lastCall = currCall; }; - /** - * Clear throttle. - * @public + /** + * Clear throttle. + * @public */ @@ -24735,8 +24745,8 @@ timer = null; } }; - /** - * Enable debounce once. + /** + * Enable debounce once. */ @@ -24746,26 +24756,26 @@ return cb; } - /** - * Create throttle method or update throttle rate. - * - * @example - * ComponentView.prototype.render = function () { - * ... - * throttle.createOrUpdate( - * this, - * '_dispatchAction', - * this.model.get('throttle'), - * 'fixRate' - * ); - * }; - * ComponentView.prototype.remove = function () { - * throttle.clear(this, '_dispatchAction'); - * }; - * ComponentView.prototype.dispose = function () { - * throttle.clear(this, '_dispatchAction'); - * }; - * + /** + * Create throttle method or update throttle rate. + * + * @example + * ComponentView.prototype.render = function () { + * ... + * throttle.createOrUpdate( + * this, + * '_dispatchAction', + * this.model.get('throttle'), + * 'fixRate' + * ); + * }; + * ComponentView.prototype.remove = function () { + * throttle.clear(this, '_dispatchAction'); + * }; + * ComponentView.prototype.dispose = function () { + * throttle.clear(this, '_dispatchAction'); + * }; + * */ function createOrUpdate(obj, fnAttr, rate, throttleType) { @@ -24792,8 +24802,8 @@ return fn; } - /** - * Clear throttle. Example see throttle.createOrUpdate. + /** + * Clear throttle. Example see throttle.createOrUpdate. */ function clear(obj, fnAttr) { @@ -24994,13 +25004,13 @@ }; var PI$3 = Math.PI; - /** - * @param {module:echarts/ExtensionAPI} api - * @param {Object} [opts] - * @param {string} [opts.text] - * @param {string} [opts.color] - * @param {string} [opts.textColor] - * @return {module:zrender/Element} + /** + * @param {module:echarts/ExtensionAPI} api + * @param {Object} [opts] + * @param {string} [opts.text] + * @param {string} [opts.color] + * @param {string} [opts.textColor] + * @return {module:zrender/Element} */ function defaultLoading(api, opts) { @@ -25183,12 +25193,12 @@ Scheduler.prototype.getPipeline = function (pipelineId) { return this._pipelineMap.get(pipelineId); }; - /** - * Current, progressive rendering starts from visual and layout. - * Always detect render mode in the same stage, avoiding that incorrect - * detection caused by data filtering. - * Caution: - * `updateStreamModes` use `seriesModel.getData()`. + /** + * Current, progressive rendering starts from visual and layout. + * Always detect render mode in the same stage, avoiding that incorrect + * detection caused by data filtering. + * Caution: + * `updateStreamModes` use `seriesModel.getData()`. */ @@ -25568,12 +25578,12 @@ function seriesTaskCount(context) { return context.data.count(); } - /** - * Only some legacy stage handlers (usually in echarts extensions) are pure function. - * To ensure that they can work normally, they should work in block mode, that is, - * they should not be started util the previous tasks finished. So they cause the - * progressive rendering disabled. We try to detect the series type, to narrow down - * the block range to only the series type they concern, but not all series. + /** + * Only some legacy stage handlers (usually in echarts extensions) are pure function. + * To ensure that they can work normally, they should work in block mode, that is, + * they should not be started util the previous tasks finished. So they cause the + * progressive rendering disabled. We try to detect the series type, to narrow down + * the block range to only the series type they concern, but not all series. */ @@ -25638,23 +25648,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var colorAll = ['#37A2DA', '#32C5E9', '#67E0E3', '#9FE6B8', '#FFDB5C', '#ff9f7f', '#fb7293', '#E062AE', '#E690D1', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF']; var lightTheme = { @@ -25686,23 +25696,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var contrastColor = '#B9B8CE'; var backgroundColor = '#100C2A'; @@ -25885,22 +25895,22 @@ }; theme.categoryAxis.splitLine.show = false; - /** - * Usage of query: - * `chart.on('click', query, handler);` - * The `query` can be: - * + The component type query string, only `mainType` or `mainType.subType`, - * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'. - * + The component query object, like: - * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`, - * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`. - * + The data query object, like: - * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`. - * + The other query object (cmponent customized query), like: - * `{element: 'some'}` (only available in custom series). - * - * Caveat: If a prop in the `query` object is `null/undefined`, it is the - * same as there is no such prop in the `query` object. + /** + * Usage of query: + * `chart.on('click', query, handler);` + * The `query` can be: + * + The component type query string, only `mainType` or `mainType.subType`, + * like: 'xAxis', 'series', 'xAxis.category' or 'series.line'. + * + The component query object, like: + * `{seriesIndex: 2}`, `{seriesName: 'xx'}`, `{seriesId: 'some'}`, + * `{xAxisIndex: 2}`, `{xAxisName: 'xx'}`, `{xAxisId: 'some'}`. + * + The data query object, like: + * `{dataIndex: 123}`, `{dataType: 'link'}`, `{name: 'some'}`. + * + The other query object (cmponent customized query), like: + * `{element: 'some'}` (only available in custom series). + * + * Caveat: If a prop in the `query` object is `null/undefined`, it is the + * same as there is no such prop in the `query` object. */ var ECEventProcessor = @@ -26118,23 +26128,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function getItemVisualFromData(data, dataIndex, key) { switch (key) { @@ -26283,23 +26293,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function findEventDispatcher(target, det, returnFirstMatch) { var found; @@ -26361,9 +26371,9 @@ return WeakMap; }()); - /** - * Triangle shape - * @inner + /** + * Triangle shape + * @inner */ var Triangle = Path.extend({ @@ -26385,9 +26395,9 @@ path.closePath(); } }); - /** - * Diamond shape - * @inner + /** + * Diamond shape + * @inner */ var Diamond = Path.extend({ @@ -26410,9 +26420,9 @@ path.closePath(); } }); - /** - * Pin shape - * @inner + /** + * Pin shape + * @inner */ var Pin = Path.extend({ @@ -26448,9 +26458,9 @@ path.closePath(); } }); - /** - * Arrow shape - * @inner + /** + * Arrow shape + * @inner */ var Arrow = Path.extend({ @@ -26475,8 +26485,8 @@ ctx.closePath(); } }); - /** - * Map of path constructors + /** + * Map of path constructors */ // TODO Use function to build symbol path. @@ -26608,8 +26618,8 @@ this.markRedraw(); } } - /** - * Create a symbol element with given symbol configuration: shape, x, y, width, height, color + /** + * Create a symbol element with given symbol configuration: shape, x, y, width, height, color */ @@ -27327,11 +27337,11 @@ var decalMap = new WeakMap(); var decalCache = new LRU(100); var decalKeys = ['symbol', 'symbolSize', 'symbolKeepAspect', 'color', 'backgroundColor', 'dashArrayX', 'dashArrayY', 'maxTileWidth', 'maxTileHeight']; - /** - * Create or update pattern image from decal options - * - * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal - * @return {Pattern} pattern with generated image, null if no decal + /** + * Create or update pattern image from decal options + * + * @param {InnerDecalObject | 'none'} decalObject decal options, 'none' if no decal + * @return {Pattern} pattern with generated image, null if no decal */ function createOrUpdatePatternFromDecal(decalObject, api) { @@ -27437,23 +27447,23 @@ pattern.svgElement = svgRoot; pattern.svgWidth = pSize.width; pattern.svgHeight = pSize.height; - /** - * Get minimum length that can make a repeatable pattern. - * - * @return {Object} pattern width and height + /** + * Get minimum length that can make a repeatable pattern. + * + * @return {Object} pattern width and height */ function getPatternSize() { - /** - * For example, if dash is [[3, 2], [2, 1]] for X, it looks like - * |--- --- --- --- --- ... - * |-- -- -- -- -- -- -- -- ... - * |--- --- --- --- --- ... - * |-- -- -- -- -- -- -- -- ... - * So the minimum length of X is 15, - * which is the least common multiple of `3 + 2` and `2 + 1` - * |--- --- --- |--- --- ... - * |-- -- -- -- -- |-- -- -- ... + /** + * For example, if dash is [[3, 2], [2, 1]] for X, it looks like + * |--- --- --- --- --- ... + * |-- -- -- -- -- -- -- -- ... + * |--- --- --- --- --- ... + * |-- -- -- -- -- -- -- -- ... + * So the minimum length of X is 15, + * which is the least common multiple of `3 + 2` and `2 + 1` + * |--- --- --- |--- --- ... + * |-- -- -- -- -- |-- -- -- ... */ var width = 1; @@ -27590,11 +27600,11 @@ } } } - /** - * Convert symbol array into normalized array - * - * @param {string | (string | string[])[]} symbol symbol input - * @return {string[][]} normolized symbol array + /** + * Convert symbol array into normalized array + * + * @param {string | (string | string[])[]} symbol symbol input + * @return {string[][]} normolized symbol array */ function normalizeSymbolArray(symbol) { @@ -27631,11 +27641,11 @@ return result; } - /** - * Convert dash input into dashArray - * - * @param {DecalDashArrayX} dash dash input - * @return {number[][]} normolized dash array + /** + * Convert dash input into dashArray + * + * @param {DecalDashArrayX} dash dash input + * @return {number[][]} normolized dash array */ @@ -27648,9 +27658,9 @@ var dashValue = Math.ceil(dash); return [[dashValue, dashValue]]; } - /** - * [20, 5] should be normalized into [[20, 5]], - * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]] + /** + * [20, 5] should be normalized into [[20, 5]], + * while [20, [5, 10]] should be normalized into [[20, 20], [5, 10]] */ @@ -27690,11 +27700,11 @@ return result; } - /** - * Convert dash input into dashArray - * - * @param {DecalDashArrayY} dash dash input - * @return {number[]} normolized dash array + /** + * Convert dash input into dashArray + * + * @param {DecalDashArrayY} dash dash input + * @return {number[]} normolized dash array */ @@ -27713,13 +27723,13 @@ }); return dash.length % 2 ? dashValue.concat(dashValue) : dashValue; } - /** - * Get block length of each line. A block is the length of dash line and space. - * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after - * that, so the block length of this line is 5. - * - * @param {number[][]} dash dash array of X or Y - * @return {number[]} block length of each line + /** + * Get block length of each line. A block is the length of dash line and space. + * For example, a line with [4, 1] has a dash line of 4 and a space of 1 after + * that, so the block length of this line is 5. + * + * @param {number[][]} dash dash array of X or Y + * @return {number[]} block length of each line */ @@ -28173,8 +28183,8 @@ triggerUpdatedEvent.call(this, silent); } }; - /** - * @deprecated + /** + * @deprecated */ @@ -28204,9 +28214,9 @@ /* eslint-disable-next-line */ || env.hasGlobalWindow && window.devicePixelRatio || 1; }; - /** - * Get canvas which has all thing rendered - * @deprecated Use renderToCanvas instead. + /** + * Get canvas which has all thing rendered + * @deprecated Use renderToCanvas instead. */ @@ -28248,8 +28258,8 @@ useViewBox: opts.useViewBox }); }; - /** - * Get svg data url + /** + * Get svg data url */ @@ -28402,10 +28412,10 @@ ECharts.prototype.convertFromPixel = function (finder, value) { return doConvertPixel(this, 'convertFromPixel', finder, value); }; - /** - * Is the specified coordinate systems or components contain the given pixel point. - * @param {Array|number} value - * @return {boolean} result + /** + * Is the specified coordinate systems or components contain the given pixel point. + * @param {Array|number} value + * @return {boolean} result */ @@ -28443,20 +28453,20 @@ }, this); return !!result; }; - /** - * Get visual from series or data. - * @param finder - * If string, e.g., 'series', means {seriesIndex: 0}. - * If Object, could contain some of these properties below: - * { - * seriesIndex / seriesId / seriesName, - * dataIndex / dataIndexInside - * } - * If dataIndex is not specified, series visual will be fetched, - * but not data item visual. - * If all of seriesIndex, seriesId, seriesName are not specified, - * visual will be fetched from first series. - * @param visualType 'color', 'symbol', 'symbolSize' + /** + * Get visual from series or data. + * @param finder + * If string, e.g., 'series', means {seriesIndex: 0}. + * If Object, could contain some of these properties below: + * { + * seriesIndex / seriesId / seriesName, + * dataIndex / dataIndexInside + * } + * If dataIndex is not specified, series visual will be fetched, + * but not data item visual. + * If all of seriesIndex, seriesId, seriesName are not specified, + * visual will be fetched from first series. + * @param visualType 'color', 'symbol', 'symbolSize' */ @@ -28477,16 +28487,16 @@ var dataIndexInside = parsedFinder.hasOwnProperty('dataIndexInside') ? parsedFinder.dataIndexInside : parsedFinder.hasOwnProperty('dataIndex') ? data.indexOfRawIndex(parsedFinder.dataIndex) : null; return dataIndexInside != null ? getItemVisualFromData(data, dataIndexInside, visualType) : getVisualFromData(data, visualType); }; - /** - * Get view of corresponding component model + /** + * Get view of corresponding component model */ ECharts.prototype.getViewOfComponentModel = function (componentModel) { return this._componentsMap[componentModel.__viewId]; }; - /** - * Get view of corresponding series model + /** + * Get view of corresponding series model */ @@ -28637,8 +28647,8 @@ chart._dom = chart._model = chart._chartsMap = chart._componentsMap = chart._chartsViews = chart._componentsViews = chart._scheduler = chart._api = chart._zr = chart._throttledZrFlush = chart._theme = chart._coordSysMgr = chart._messageCenter = null; delete instances$1[chart.id]; }; - /** - * Resize the chart + /** + * Resize the chart */ @@ -28728,8 +28738,8 @@ this._loadingFX = el; zr.add(el); }; - /** - * Hide loading effect + /** + * Hide loading effect */ @@ -28748,14 +28758,14 @@ payload.type = eventActionMap[eventObj.type]; return payload; }; - /** - * @param opt If pass boolean, means opt.silent - * @param opt.silent Default `false`. Whether trigger events. - * @param opt.flush Default `undefined`. - * true: Flush immediately, and then pixel in canvas can be fetched - * immediately. Caution: it might affect performance. - * false: Not flush. - * undefined: Auto decide whether perform flush. + /** + * @param opt If pass boolean, means opt.silent + * @param opt.silent Default `false`. Whether trigger events. + * @param opt.flush Default `undefined`. + * true: Flush immediately, and then pixel in canvas can be fetched + * immediately. Caution: it might affect performance. + * false: Not flush. + * undefined: Auto decide whether perform flush. */ @@ -28851,8 +28861,8 @@ prepareView(ecIns, false); scheduler.plan(); }; - /** - * Prepare view instances of charts and components + /** + * Prepare view instances of charts and components */ @@ -29347,17 +29357,17 @@ triggerUpdatedEvent = function (silent) { !silent && this.trigger('updated'); }; - /** - * Event `rendered` is triggered when zr - * rendered. It is useful for realtime - * snapshot (reflect animation). - * - * Event `finished` is triggered when: - * (1) zrender rendering finished. - * (2) initial animation finished. - * (3) progressive rendering finished. - * (4) no pending action. - * (5) no delayed setOption needs to be processed. + /** + * Event `rendered` is triggered when zr + * rendered. It is useful for realtime + * snapshot (reflect animation). + * + * Event `finished` is triggered when: + * (1) zrender rendering finished. + * (2) initial animation finished. + * (3) progressive rendering finished. + * (4) no pending action. + * (5) no delayed setOption needs to be processed. */ @@ -29505,8 +29515,8 @@ updateStates(componentModel, componentView); }); }; - /** - * Render each chart and component + /** + * Render each chart and component */ @@ -29635,8 +29645,8 @@ }); } } - /** - * Update chart and blend. + /** + * Update chart and blend. */ function updateBlend(seriesModel, chartView) { @@ -29905,8 +29915,8 @@ var echartsProto = ECharts.prototype; echartsProto.on = createRegisterEventWithLowercaseECharts('on'); echartsProto.off = createRegisterEventWithLowercaseECharts('off'); - /** - * @deprecated + /** + * @deprecated */ // @ts-ignore @@ -29938,8 +29948,8 @@ } var actions = {}; - /** - * Map eventType to actionType + /** + * Map eventType to actionType */ var eventActionMap = {}; @@ -29953,15 +29963,15 @@ var idBase = +new Date() - 0; var groupIdBase = +new Date() - 0; var DOM_ATTRIBUTE_KEY = '_echarts_instance_'; - /** - * @param opts.devicePixelRatio Use window.devicePixelRatio by default - * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart. - * @param opts.width Use clientWidth of the input `dom` by default. - * Can be 'auto' (the same as null/undefined) - * @param opts.height Use clientHeight of the input `dom` by default. - * Can be 'auto' (the same as null/undefined) - * @param opts.locale Specify the locale. - * @param opts.useDirtyRect Enable dirty rectangle rendering or not. + /** + * @param opts.devicePixelRatio Use window.devicePixelRatio by default + * @param opts.renderer Can choose 'canvas' or 'svg' to render the chart. + * @param opts.width Use clientWidth of the input `dom` by default. + * Can be 'auto' (the same as null/undefined) + * @param opts.height Use clientHeight of the input `dom` by default. + * Can be 'auto' (the same as null/undefined) + * @param opts.locale Specify the locale. + * @param opts.useDirtyRect Enable dirty rectangle rendering or not. */ function init$1(dom, theme, opts) { @@ -29999,22 +30009,22 @@ lifecycle.trigger('afterinit', chart); return chart; } - /** - * @usage - * (A) - * ```js - * let chart1 = echarts.init(dom1); - * let chart2 = echarts.init(dom2); - * chart1.group = 'xxx'; - * chart2.group = 'xxx'; - * echarts.connect('xxx'); - * ``` - * (B) - * ```js - * let chart1 = echarts.init(dom1); - * let chart2 = echarts.init(dom2); - * echarts.connect('xxx', [chart1, chart2]); - * ``` + /** + * @usage + * (A) + * ```js + * let chart1 = echarts.init(dom1); + * let chart2 = echarts.init(dom2); + * chart1.group = 'xxx'; + * chart2.group = 'xxx'; + * echarts.connect('xxx'); + * ``` + * (B) + * ```js + * let chart1 = echarts.init(dom1); + * let chart2 = echarts.init(dom2); + * echarts.connect('xxx', [chart1, chart2]); + * ``` */ function connect(groupId) { @@ -30040,14 +30050,14 @@ function disconnect(groupId) { connectedGroups[groupId] = false; } - /** - * Alias and backward compatibility - * @deprecated + /** + * Alias and backward compatibility + * @deprecated */ var disConnect = disconnect; - /** - * Dispose a chart instance + /** + * Dispose a chart instance */ function dispose$1(chart) { @@ -30068,15 +30078,15 @@ function getInstanceById(key) { return instances$1[key]; } - /** - * Register theme + /** + * Register theme */ function registerTheme(name, theme) { themeStorage[name] = theme; } - /** - * Register option preprocessor + /** + * Register option preprocessor */ function registerPreprocessor(preprocessorFunc) { @@ -30087,17 +30097,17 @@ function registerProcessor(priority, processor) { normalizeRegister(dataProcessorFuncs, priority, processor, PRIORITY_PROCESSOR_DEFAULT); } - /** - * Register postIniter - * @param {Function} postInitFunc + /** + * Register postIniter + * @param {Function} postInitFunc */ function registerPostInit(postInitFunc) { registerUpdateLifecycle('afterinit', postInitFunc); } - /** - * Register postUpdater - * @param {Function} postUpdateFunc + /** + * Register postUpdater + * @param {Function} postUpdateFunc */ function registerPostUpdate(postUpdateFunc) { @@ -30139,10 +30149,10 @@ function registerCoordinateSystem(type, coordSysCreator) { CoordinateSystemManager.register(type, coordSysCreator); } - /** - * Get dimensions of specified coordinate system. - * @param {string} type - * @return {Array.} + /** + * Get dimensions of specified coordinate system. + * @param {string} type + * @return {Array.} */ function getCoordinateSystemDimensions(type) { @@ -30194,21 +30204,21 @@ function registerLoading(name, loadingFx) { loadingEffects[name] = loadingFx; } - /** - * ZRender need a canvas context to do measureText. - * But in node environment canvas may be created by node-canvas. - * So we need to specify how to create a canvas instead of using document.createElement('canvas') - * - * - * @deprecated use setPlatformAPI({ createCanvas }) instead. - * - * @example - * let Canvas = require('canvas'); - * let echarts = require('echarts'); - * echarts.setCanvasCreator(function () { - * // Small size is enough. - * return new Canvas(32, 32); - * }); + /** + * ZRender need a canvas context to do measureText. + * But in node environment canvas may be created by node-canvas. + * So we need to specify how to create a canvas instead of using document.createElement('canvas') + * + * + * @deprecated use setPlatformAPI({ createCanvas }) instead. + * + * @example + * let Canvas = require('canvas'); + * let echarts = require('echarts'); + * echarts.setCanvasCreator(function () { + * // Small size is enough. + * return new Canvas(32, 32); + * }); */ function setCanvasCreator(creator) { @@ -30220,9 +30230,9 @@ createCanvas: creator }); } - /** - * The parameters and usage: see `geoSourceManager.registerMap`. - * Compatible with previous `echarts.registerMap`. + /** + * The parameters and usage: see `geoSourceManager.registerMap`. + * Compatible with previous `echarts.registerMap`. */ function registerMap(mapName, geoJson, specialAreas) { @@ -30234,8 +30244,8 @@ return getMap && getMap(mapName); } var registerTransform = registerExternalTransform; - /** - * Globa dispatchAction to a specified chart instance. + /** + * Globa dispatchAction to a specified chart instance. */ // export function dispatchAction(payload: { chartId: string } & Payload, opt?: Parameters[1]) { // if (!payload || !payload.chartId) { @@ -30379,23 +30389,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function dataIndexMapValueLength(valNumOrArrLengthMoreThan2) { return valNumOrArrLengthMoreThan2 == null ? 0 : valNumOrArrLengthMoreThan2.length || 1; @@ -30408,8 +30418,8 @@ var DataDiffer = /** @class */ function () { - /** - * @param context Can be visited by this.context in callback. + /** + * @param context Can be visited by this.context in callback. */ function DataDiffer(oldArr, newArr, oldKeyGetter, newKeyGetter, context, // By default: 'oneToOne'. diffMode) { @@ -30421,8 +30431,8 @@ this.context = context; this._diffModeMultiple = diffMode === 'multiple'; } - /** - * Callback function when add a data + /** + * Callback function when add a data */ @@ -30430,8 +30440,8 @@ this._add = func; return this; }; - /** - * Callback function when update a data + /** + * Callback function when update a data */ @@ -30439,8 +30449,8 @@ this._update = func; return this; }; - /** - * Callback function when update a data and only work in `cbMode: 'byKey'`. + /** + * Callback function when update a data and only work in `cbMode: 'byKey'`. */ @@ -30448,8 +30458,8 @@ this._updateManyToOne = func; return this; }; - /** - * Callback function when update a data and only work in `cbMode: 'byKey'`. + /** + * Callback function when update a data and only work in `cbMode: 'byKey'`. */ @@ -30457,8 +30467,8 @@ this._updateOneToMany = func; return this; }; - /** - * Callback function when update a data and only work in `cbMode: 'byKey'`. + /** + * Callback function when update a data and only work in `cbMode: 'byKey'`. */ @@ -30466,8 +30476,8 @@ this._updateManyToMany = func; return this; }; - /** - * Callback function when remove a data + /** + * Callback function when remove a data */ @@ -30516,30 +30526,30 @@ this._performRestAdd(newDataKeyArr, newDataIndexMap); }; - /** - * For example, consider the case: - * oldData: [o0, o1, o2, o3, o4, o5, o6, o7], - * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8], - * Where: - * o0, o1, n0 has key 'a' (many to one) - * o5, n4, n5, n6 has key 'b' (one to many) - * o2, n1 has key 'c' (one to one) - * n2, n3 has key 'd' (add) - * o3, o4 has key 'e' (remove) - * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove) - * Then: - * (The order of the following directives are not ensured.) - * this._updateManyToOne(n0, [o0, o1]); - * this._updateOneToMany([n4, n5, n6], o5); - * this._update(n1, o2); - * this._remove(o3); - * this._remove(o4); - * this._remove(o6); - * this._remove(o7); - * this._add(n2); - * this._add(n3); - * this._add(n7); - * this._add(n8); + /** + * For example, consider the case: + * oldData: [o0, o1, o2, o3, o4, o5, o6, o7], + * newData: [n0, n1, n2, n3, n4, n5, n6, n7, n8], + * Where: + * o0, o1, n0 has key 'a' (many to one) + * o5, n4, n5, n6 has key 'b' (one to many) + * o2, n1 has key 'c' (one to one) + * n2, n3 has key 'd' (add) + * o3, o4 has key 'e' (remove) + * o6, o7, n7, n8 has key 'f' (many to many, treated as add and remove) + * Then: + * (The order of the following directives are not ensured.) + * this._updateManyToOne(n0, [o0, o1]); + * this._updateOneToMany([n4, n5, n6], o5); + * this._update(n1, o2); + * this._remove(o3); + * this._remove(o4); + * this._remove(o6); + * this._remove(o7); + * this._add(n2); + * this._add(n3); + * this._add(n7); + * this._add(n8); */ @@ -30661,12 +30671,12 @@ encode: this._encode }; }; - /** - * Get all data store dimension names. - * Theoretically a series data store is defined both by series and used dataset (if any). - * If some dimensions are omitted for performance reason in `this.dimensions`, - * the dimension name may not be auto-generated if user does not specify a dimension name. - * In this case, the dimension name is `null`/`undefined`. + /** + * Get all data store dimension names. + * Theoretically a series data store is defined both by series and used dataset (if any). + * If some dimensions are omitted for performance reason in `this.dimensions`, + * the dimension name may not be auto-generated if user does not specify a dimension name. + * In this case, the dimension name is `null`/`undefined`. */ @@ -30796,42 +30806,42 @@ var SeriesDimensionDefine = /** @class */ function () { - /** - * @param opt All of the fields will be shallow copied. + /** + * @param opt All of the fields will be shallow copied. */ function SeriesDimensionDefine(opt) { - /** - * The format of `otherDims` is: - * ```js - * { - * tooltip?: number - * label?: number - * itemName?: number - * seriesName?: number - * } - * ``` - * - * A `series.encode` can specified these fields: - * ```js - * encode: { - * // "3, 1, 5" is the index of data dimension. - * tooltip: [3, 1, 5], - * label: [0, 3], - * ... - * } - * ``` - * `otherDims` is the parse result of the `series.encode` above, like: - * ```js - * // Suppose the index of this data dimension is `3`. - * this.otherDims = { - * // `3` is at the index `0` of the `encode.tooltip` - * tooltip: 0, - * // `3` is at the index `1` of the `encode.label` - * label: 1 - * }; - * ``` - * - * This prop should never be `null`/`undefined` after initialized. + /** + * The format of `otherDims` is: + * ```js + * { + * tooltip?: number + * label?: number + * itemName?: number + * seriesName?: number + * } + * ``` + * + * A `series.encode` can specified these fields: + * ```js + * encode: { + * // "3, 1, 5" is the index of data dimension. + * tooltip: [3, 1, 5], + * label: [0, 3], + * ... + * } + * ``` + * `otherDims` is the parse result of the `series.encode` above, like: + * ```js + * // Suppose the index of this data dimension is `3`. + * this.otherDims = { + * // `3` is at the index `0` of the `encode.tooltip` + * tooltip: 0, + * // `3` is at the index `1` of the `encode.label` + * label: 1 + * }; + * ``` + * + * This prop should never be `null`/`undefined` after initialized. */ this.otherDims = {}; @@ -30851,16 +30861,16 @@ number: 'n', time: 't' }; - /** - * Represents the dimension requirement of a series. - * - * NOTICE: - * When there are too many dimensions in dataset and many series, only the used dimensions - * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`. - * But users may query data by other unused dimension names. - * In this case, users can only query data if and only if they have defined dimension names - * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from - * `source` dimensions. + /** + * Represents the dimension requirement of a series. + * + * NOTICE: + * When there are too many dimensions in dataset and many series, only the used dimensions + * (i.e., used by coord sys and declared in `series.encode`) are add to `dimensionDefineList`. + * But users may query data by other unused dimension names. + * In this case, users can only query data if and only if they have defined dimension names + * via ec option, so we provide `getDimensionIndexFromSource`, which only query them from + * `source` dimensions. */ var SeriesDataSchema = @@ -30890,22 +30900,22 @@ this._dimNameMap = ensureSourceDimNameMap(this.source); } }; - /** - * @caution Can only be used when `dimensionOmitted: true`. - * - * Get index by user defined dimension name (i.e., not internal generate name). - * That is, get index from `dimensionsDefine`. - * If no `dimensionsDefine`, or no name get, return -1. + /** + * @caution Can only be used when `dimensionOmitted: true`. + * + * Get index by user defined dimension name (i.e., not internal generate name). + * That is, get index from `dimensionsDefine`. + * If no `dimensionsDefine`, or no name get, return -1. */ SeriesDataSchema.prototype.getSourceDimensionIndex = function (dimName) { return retrieve2(this._dimNameMap.get(dimName), -1); }; - /** - * @caution Can only be used when `dimensionOmitted: true`. - * - * Notice: may return `null`/`undefined` if user not specify dimension names. + /** + * @caution Can only be used when `dimensionOmitted: true`. + * + * Notice: may return `null`/`undefined` if user not specify dimension names. */ @@ -31074,10 +31084,10 @@ var SeriesData = /** @class */ function () { - /** - * @param dimensionsInput.dimensions - * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...]. - * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius + /** + * @param dimensionsInput.dimensions + * For example, ['someDimName', {name: 'someDimName', type: 'someDimType'}, ...]. + * Dimensions should be concrete names like x, y, z, lng, lat, angle, radius */ function SeriesData(dimensionsInput, hostModel) { this.type = 'list'; @@ -31188,22 +31198,22 @@ }); } } - /** - * - * Get concrete dimension name by dimension name or dimension index. - * If input a dimension name, do not validate whether the dimension name exits. - * - * @caution - * @param dim Must make sure the dimension is `SeriesDimensionLoose`. - * Because only those dimensions will have auto-generated dimension names if not - * have a user-specified name, and other dimensions will get a return of null/undefined. - * - * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples: - * ```js - * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx); - * ``` - * - * @return Concrete dim name. + /** + * + * Get concrete dimension name by dimension name or dimension index. + * If input a dimension name, do not validate whether the dimension name exits. + * + * @caution + * @param dim Must make sure the dimension is `SeriesDimensionLoose`. + * Because only those dimensions will have auto-generated dimension names if not + * have a user-specified name, and other dimensions will get a return of null/undefined. + * + * @notice Because of this reason, should better use `getDimensionIndex` instead, for examples: + * ```js + * const val = data.getStore().get(data.getDimensionIndex(dim), dataIdx); + * ``` + * + * @return Concrete dim name. */ @@ -31234,9 +31244,9 @@ return sourceDimDef.name; } }; - /** - * Get dimension index in data store. Return -1 if not found. - * Can be used to index value from getRawValue. + /** + * Get dimension index in data store. Return -1 if not found. + * Can be used to index value from getRawValue. */ @@ -31255,24 +31265,24 @@ return dimInfo ? dimInfo.storeDimIndex : this._dimOmitted ? this._schema.getSourceDimensionIndex(dim) : -1; }; - /** - * The meanings of the input parameter `dim`: - * - * + If dim is a number (e.g., `1`), it means the index of the dimension. - * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'. - * + If dim is a number-like string (e.g., `"1"`): - * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`, - * it means that concrete name. - * + If not, it will be converted to a number, which means the index of the dimension. - * (why? because of the backward compatibility. We have been tolerating number-like string in - * dimension setting, although now it seems that it is not a good idea.) - * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`, - * if no dimension name is defined as `"1"`. - * + If dim is a not-number-like string, it means the concrete dim name. - * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`, - * or customized in `dimensions` property of option like `"age"`. - * - * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`). + /** + * The meanings of the input parameter `dim`: + * + * + If dim is a number (e.g., `1`), it means the index of the dimension. + * For example, `getDimension(0)` will return 'x' or 'lng' or 'radius'. + * + If dim is a number-like string (e.g., `"1"`): + * + If there is the same concrete dim name defined in `series.dimensions` or `dataset.dimensions`, + * it means that concrete name. + * + If not, it will be converted to a number, which means the index of the dimension. + * (why? because of the backward compatibility. We have been tolerating number-like string in + * dimension setting, although now it seems that it is not a good idea.) + * For example, `visualMap[i].dimension: "1"` is the same meaning as `visualMap[i].dimension: 1`, + * if no dimension name is defined as `"1"`. + * + If dim is a not-number-like string, it means the concrete dim name. + * For example, it can be be default name `"x"`, `"y"`, `"z"`, `"lng"`, `"lat"`, `"angle"`, `"radius"`, + * or customized in `dimensions` property of option like `"age"`. + * + * @return recognized `DimensionIndex`. Otherwise return null/undefined (means that dim is `DimensionName`). */ @@ -31294,11 +31304,11 @@ return dimIdx; }; - /** - * Get type and calculation info of particular dimension - * @param dim - * Dimension can be concrete names like x, y, z, lng, lat, angle, radius - * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius' + /** + * Get type and calculation info of particular dimension + * @param dim + * Dimension can be concrete names like x, y, z, lng, lat, angle, radius + * Or a ordinal number. For example getDimensionInfo(0) will return 'x' or 'lng' or 'radius' */ @@ -31315,8 +31325,8 @@ return dimensionInfos[dimName]; }; }; - /** - * concrete dimension name list on coord. + /** + * concrete dimension name list on coord. */ @@ -31344,14 +31354,14 @@ SeriesData.prototype.getStore = function () { return this._store; }; - /** - * Initialize from data - * @param data source or data or data store. - * @param nameList The name of a datum is used on data diff and - * default label/tooltip. - * A name can be specified in encode.itemName, - * or dataItem.name (only for series option data), - * or provided in nameList from outside. + /** + * Initialize from data + * @param data source or data or data store. + * @param nameList The name of a datum is used on data diff and + * default label/tooltip. + * A name can be specified in encode.itemName, + * or dataItem.name (only for series option data), + * or provided in nameList from outside. */ @@ -31390,8 +31400,8 @@ this._dimSummary = summarizeDimensions(this, this._schema); this.userOutput = this._dimSummary.userOutput; }; - /** - * Caution: Can be only called on raw data (before `this._indices` created). + /** + * Caution: Can be only called on raw data (before `this._indices` created). */ @@ -31400,20 +31410,20 @@ this._doInit(range[0], range[1]); }; - /** - * Caution: Can be only called on raw data (before `this._indices` created). - * This method does not modify `rawData` (`dataProvider`), but only - * add values to store. - * - * The final count will be increased by `Math.max(values.length, names.length)`. - * - * @param values That is the SourceType: 'arrayRows', like - * [ - * [12, 33, 44], - * [NaN, 43, 1], - * ['-', 'asdf', 0] - * ] - * Each item is exactly corresponding to a dimension. + /** + * Caution: Can be only called on raw data (before `this._indices` created). + * This method does not modify `rawData` (`dataProvider`), but only + * add values to store. + * + * The final count will be increased by `Math.max(values.length, names.length)`. + * + * @param values That is the SourceType: 'arrayRows', like + * [ + * [12, 33, 44], + * [NaN, 43, 1], + * ['-', 'asdf', 0] + * ] + * Each item is exactly corresponding to a dimension. */ @@ -31514,28 +31524,28 @@ prepareInvertedIndex(this); }; - /** - * PENDING: In fact currently this function is only used to short-circuit - * the calling of `scale.unionExtentFromData` when data have been filtered by modules - * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on - * an axis, but if a "axis related data filter module" is used, the extent of the axis have - * been fixed and no need to calling `scale.unionExtentFromData` actually. - * But if we add "custom data filter" in future, which is not "axis related", this method may - * be still needed. - * - * Optimize for the scenario that data is filtered by a given extent. - * Consider that if data amount is more than hundreds of thousand, - * extent calculation will cost more than 10ms and the cache will - * be erased because of the filtering. + /** + * PENDING: In fact currently this function is only used to short-circuit + * the calling of `scale.unionExtentFromData` when data have been filtered by modules + * like "dataZoom". `scale.unionExtentFromData` is used to calculate data extent for series on + * an axis, but if a "axis related data filter module" is used, the extent of the axis have + * been fixed and no need to calling `scale.unionExtentFromData` actually. + * But if we add "custom data filter" in future, which is not "axis related", this method may + * be still needed. + * + * Optimize for the scenario that data is filtered by a given extent. + * Consider that if data amount is more than hundreds of thousand, + * extent calculation will cost more than 10ms and the cache will + * be erased because of the filtering. */ SeriesData.prototype.getApproximateExtent = function (dim) { return this._approximateExtent[dim] || this._store.getDataExtent(this._getStoreDimIndex(dim)); }; - /** - * Calculate extent on a filtered data might be time consuming. - * Approximate extent is only used for: calculate extent of filtered data outside. + /** + * Calculate extent on a filtered data might be time consuming. + * Approximate extent is only used for: calculate extent of filtered data outside. */ @@ -31551,11 +31561,11 @@ SeriesData.prototype.setCalculationInfo = function (key, value) { isObject$2(key) ? extend(this._calculationInfo, key) : this._calculationInfo[key] = value; }; - /** - * @return Never be null/undefined. `number` will be converted to string. Because: - * In most cases, name is used in display, where returning a string is more convenient. - * In other cases, name is used in query (see `indexOfName`), where we can keep the - * rule that name `2` equals to name `'2'`. + /** + * @return Never be null/undefined. `number` will be converted to string. Because: + * In most cases, name is used in display, where returning a string is more convenient. + * In other cases, name is used in query (see `indexOfName`), where we can keep the + * rule that name `2` equals to name `'2'`. */ @@ -31585,11 +31595,11 @@ return ordinal; }; - /** - * @return Never null/undefined. `number` will be converted to string. Because: - * In all cases having encountered at present, id is used in making diff comparison, which - * are usually based on hash map. We can keep the rule that the internal id are always string - * (treat `2` is the same as `'2'`) to make the related logic simple. + /** + * @return Never null/undefined. `number` will be converted to string. Because: + * In all cases having encountered at present, id is used in making diff comparison, which + * are usually based on hash map. We can keep the rule that the internal id are always string + * (treat `2` is the same as `'2'`) to make the related logic simple. */ @@ -31600,10 +31610,10 @@ SeriesData.prototype.count = function () { return this._store.count(); }; - /** - * Get value. Return NaN if idx is out of range. - * - * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead. + /** + * Get value. Return NaN if idx is out of range. + * + * @notice Should better to use `data.getStore().get(dimIndex, dataIdx)` instead. */ @@ -31615,8 +31625,8 @@ return store.get(dimInfo.storeDimIndex, idx); } }; - /** - * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead. + /** + * @notice Should better to use `data.getStore().getByRawIndex(dimIndex, dataIdx)` instead. */ @@ -31653,9 +31663,9 @@ return _this._getStoreDimIndex(dim); }), idx) : store.getValues(dimensions); }; - /** - * If value is NaN. Including '-' - * Only check the coord dimensions. + /** + * If value is NaN. Including '-' + * Only check the coord dimensions. */ @@ -31673,8 +31683,8 @@ return true; }; - /** - * Retrieve the index with given name + /** + * Retrieve the index with given name */ @@ -31695,12 +31705,12 @@ SeriesData.prototype.indexOfRawIndex = function (rawIndex) { return this._store.indexOfRawIndex(rawIndex); }; - /** - * Only support the dimension which inverted index created. - * Do not support other cases until required. - * @param dim concrete dim - * @param value ordinal index - * @return rawIndex + /** + * Only support the dimension which inverted index created. + * Do not support other cases until required. + * @param dim concrete dim + * @param value ordinal index + * @return rawIndex */ @@ -31721,13 +31731,13 @@ return rawIndex; }; - /** - * Retrieve the index of nearest value - * @param dim - * @param value - * @param [maxDistance=Infinity] - * @return If and only if multiple indices has - * the same value, they are put to the result. + /** + * Retrieve the index of nearest value + * @param dim + * @param value + * @param [maxDistance=Infinity] + * @return If and only if multiple indices has + * the same value, they are put to the result. */ @@ -31764,9 +31774,9 @@ this._store = this._store.filter(dimIndices, fCtx ? bind(cb, fCtx) : cb); return this; }; - /** - * Select data in range. (For optimization of filter) - * (Manually inline code, support 5 million data filtering in data zoom.) + /** + * Select data in range. (For optimization of filter) + * (Manually inline code, support 5 million data filtering in data zoom.) */ @@ -31836,9 +31846,9 @@ this._store.modify(dimIndices, fCtx ? bind(cb, fCtx) : cb); }; - /** - * Large data down sampling on given dimension - * @param sampleIndex Sample index for name and id + /** + * Large data down sampling on given dimension + * @param sampleIndex Sample index for name and id */ @@ -31847,10 +31857,10 @@ list._store = this._store.downSample(this._getStoreDimIndex(dimension), rate, sampleValue, sampleIndex); return list; }; - /** - * Large data down sampling using largest-triangle-three-buckets - * @param {string} valueDimension - * @param {number} targetCount + /** + * Large data down sampling using largest-triangle-three-buckets + * @param {string} valueDimension + * @param {number} targetCount */ @@ -31863,8 +31873,8 @@ SeriesData.prototype.getRawDataItem = function (idx) { return this._store.getRawDataItem(idx); }; - /** - * Get model of one data item. + /** + * Get model of one data item. */ // TODO: Type of data item @@ -31874,8 +31884,8 @@ var dataItem = this.getRawDataItem(idx); return new Model(dataItem, hostModel, hostModel && hostModel.ecModel); }; - /** - * Create a data differ + /** + * Create a data differ */ @@ -31887,8 +31897,8 @@ return getId(thisList, idx); }); }; - /** - * Get visual property. + /** + * Get visual property. */ @@ -31906,8 +31916,8 @@ this._visual[kvObj] = val; } }; - /** - * Get visual property of single data item + /** + * Get visual property of single data item */ // eslint-disable-next-line @@ -31923,16 +31933,16 @@ return val; }; - /** - * If exists visual property of single data item + /** + * If exists visual property of single data item */ SeriesData.prototype.hasItemVisual = function () { return this._itemVisuals.length > 0; }; - /** - * Make sure itemVisual property is unique + /** + * Make sure itemVisual property is unique */ // TODO: use key to save visual to reduce memory. @@ -31973,8 +31983,8 @@ itemVisual[key] = value; } }; - /** - * Clear itemVisuals and list visual. + /** + * Clear itemVisuals and list visual. */ @@ -31986,40 +31996,40 @@ SeriesData.prototype.setLayout = function (key, val) { isObject$2(key) ? extend(this._layout, key) : this._layout[key] = val; }; - /** - * Get layout property. + /** + * Get layout property. */ SeriesData.prototype.getLayout = function (key) { return this._layout[key]; }; - /** - * Get layout of single data item + /** + * Get layout of single data item */ SeriesData.prototype.getItemLayout = function (idx) { return this._itemLayouts[idx]; }; - /** - * Set layout of single data item + /** + * Set layout of single data item */ SeriesData.prototype.setItemLayout = function (idx, layout, merge) { this._itemLayouts[idx] = merge ? extend(this._itemLayouts[idx] || {}, layout) : layout; }; - /** - * Clear all layout of single data item + /** + * Clear all layout of single data item */ SeriesData.prototype.clearItemLayouts = function () { this._itemLayouts.length = 0; }; - /** - * Set graphic element relative to data. It can be set as null + /** + * Set graphic element relative to data. It can be set as null */ @@ -32040,9 +32050,9 @@ } }); }; - /** - * Shallow clone a new list except visual and layout properties, and graph elements. - * New list only change the indices. + /** + * Shallow clone a new list except visual and layout properties, and graph elements. + * New list only change the indices. */ @@ -32055,8 +32065,8 @@ list._store = this._store; return list; }; - /** - * Wrap some method to add more feature + /** + * Wrap some method to add more feature */ @@ -32108,8 +32118,8 @@ getIdNameFromStore = function (data, dimIdx, idx) { return convertOptionIdName(data._getCategory(dimIdx, idx), null); }; - /** - * @see the comment of `List['getId']`. + /** + * @see the comment of `List['getId']`. */ @@ -32134,8 +32144,8 @@ return dimensions; }; - /** - * Data in excludeDimensions is copied, otherwise transferred. + /** + * Data in excludeDimensions is copied, otherwise transferred. */ @@ -32192,24 +32202,24 @@ return SeriesData; }(); - /** - * For outside usage compat (like echarts-gl are using it). + /** + * For outside usage compat (like echarts-gl are using it). */ function createDimensions(source, opt) { return prepareSeriesDataSchema(source, opt).dimensions; } - /** - * This method builds the relationship between: - * + "what the coord sys or series requires (see `coordDimensions`)", - * + "what the user defines (in `encode` and `dimensions`, see `opt.dimensionsDefine` and `opt.encodeDefine`)" - * + "what the data source provids (see `source`)". - * - * Some guess strategy will be adapted if user does not define something. - * If no 'value' dimension specified, the first no-named dimension will be - * named as 'value'. - * - * @return The results are always sorted by `storeDimIndex` asc. + /** + * This method builds the relationship between: + * + "what the coord sys or series requires (see `coordDimensions`)", + * + "what the user defines (in `encode` and `dimensions`, see `opt.dimensionsDefine` and `opt.encodeDefine`)" + * + "what the data source provids (see `source`)". + * + * Some guess strategy will be adapted if user does not define something. + * If no 'value' dimension specified, the first no-named dimension will be + * named as 'value'. + * + * @return The results are always sorted by `storeDimIndex` asc. */ function prepareSeriesDataSchema( // TODO: TYPE completeDimensions type @@ -32504,25 +32514,25 @@ return name; } - /** - * @class - * For example: - * { - * coordSysName: 'cartesian2d', - * coordSysDims: ['x', 'y', ...], - * axisMap: HashMap({ - * x: xAxisModel, - * y: yAxisModel - * }), - * categoryAxisMap: HashMap({ - * x: xAxisModel, - * y: undefined - * }), - * // The index of the first category axis in `coordSysDims`. - * // `null/undefined` means no category axis exists. - * firstCategoryDimIndex: 1, - * // To replace user specified encode. - * } + /** + * @class + * For example: + * { + * coordSysName: 'cartesian2d', + * coordSysDims: ['x', 'y', ...], + * axisMap: HashMap({ + * x: xAxisModel, + * y: yAxisModel + * }), + * categoryAxisMap: HashMap({ + * x: xAxisModel, + * y: undefined + * }), + * // The index of the first category axis in `coordSysDims`. + * // `null/undefined` means no category axis exists. + * firstCategoryDimIndex: 1, + * // To replace user specified encode. + * } */ var CoordSysInfo = @@ -32650,25 +32660,25 @@ return axisModel.get('type') === 'category'; } - /** - * Note that it is too complicated to support 3d stack by value - * (have to create two-dimension inverted index), so in 3d case - * we just support that stacked by index. - * - * @param seriesModel - * @param dimensionsInput The same as the input of . - * The input will be modified. - * @param opt - * @param opt.stackedCoordDimension Specify a coord dimension if needed. - * @param opt.byIndex=false - * @return calculationInfo - * { - * stackedDimension: string - * stackedByDimension: string - * isStackedByIndex: boolean - * stackedOverDimension: string - * stackResultDimension: string - * } + /** + * Note that it is too complicated to support 3d stack by value + * (have to create two-dimension inverted index), so in 3d case + * we just support that stacked by index. + * + * @param seriesModel + * @param dimensionsInput The same as the input of . + * The input will be modified. + * @param opt + * @param opt.stackedCoordDimension Specify a coord dimension if needed. + * @param opt.byIndex=false + * @return calculationInfo + * { + * stackedDimension: string + * stackedByDimension: string + * isStackedByIndex: boolean + * stackedOverDimension: string + * stackResultDimension: string + * } */ function enableDataStack(seriesModel, dimensionsInput, opt) { @@ -32857,9 +32867,9 @@ return firstCategoryDimIndex; } - /** - * Caution: there are side effects to `sourceManager` in this method. - * Should better only be called in `Series['getInitialData']`. + /** + * Caution: there are side effects to `sourceManager` in this method. + * Should better only be called in `Series['getInitialData']`. */ @@ -32936,8 +32946,8 @@ Scale.prototype.getSetting = function (name) { return this._setting[name]; }; - /** - * Set extent from data + /** + * Set extent from data */ @@ -32947,26 +32957,26 @@ other[1] > extent[1] && (extent[1] = other[1]); // not setExtent because in log axis it may transformed to power // this.setExtent(extent[0], extent[1]); }; - /** - * Set extent from data + /** + * Set extent from data */ Scale.prototype.unionExtentFromData = function (data, dim) { this.unionExtent(data.getApproximateExtent(dim)); }; - /** - * Get extent - * - * Extent is always in increase order. + /** + * Get extent + * + * Extent is always in increase order. */ Scale.prototype.getExtent = function () { return this._extent.slice(); }; - /** - * Set extent + /** + * Set extent */ @@ -32981,26 +32991,26 @@ thisExtent[1] = end; } }; - /** - * If value is in extent range + /** + * If value is in extent range */ Scale.prototype.isInExtentRange = function (value) { return this._extent[0] <= value && this._extent[1] >= value; }; - /** - * When axis extent depends on data and no data exists, - * axis ticks should not be drawn, which is named 'blank'. + /** + * When axis extent depends on data and no data exists, + * axis ticks should not be drawn, which is named 'blank'. */ Scale.prototype.isBlank = function () { return this._isBlank; }; - /** - * When axis extent depends on data and no data exists, - * axis ticks should not be drawn, which is named 'blank'. + /** + * When axis extent depends on data and no data exists, + * axis ticks should not be drawn, which is named 'blank'. */ @@ -33041,8 +33051,8 @@ // @ts-ignore return this._getOrCreateMap().get(category); }; - /** - * @return The ordinal. If not found, return NaN. + /** + * @return The ordinal. If not found, return NaN. */ @@ -33115,10 +33125,10 @@ function isIntervalOrLogScale(scale) { return scale.type === 'interval' || scale.type === 'log'; } - /** - * @param extent Both extent[0] and extent[1] should be valid number. - * Should be extent[0] < extent[1]. - * @param splitNumber splitNumber should be >= 1. + /** + * @param extent Both extent[0] and extent[1] should be valid number. + * Should be extent[0] < extent[1]. + * @param splitNumber splitNumber should be >= 1. */ function intervalScaleNiceTicks(extent, splitNumber, minInterval, maxInterval) { @@ -33159,8 +33169,8 @@ return round(f * exp10); } - /** - * @return interval precision + /** + * @return interval precision */ function getIntervalPrecision(interval) { @@ -33242,10 +33252,10 @@ rank = this.parse(rank); return contain$1(rank, this._extent) && this._ordinalMeta.categories[rank] != null; }; - /** - * Normalize given rank or name to linear [0, 1] - * @param val raw ordinal number. - * @return normalized value in [0, 1]. + /** + * Normalize given rank or name to linear [0, 1] + * @param val raw ordinal number. + * @return normalized value in [0, 1]. */ @@ -33253,9 +33263,9 @@ val = this._getTickNumber(this.parse(val)); return normalize$1(val, this._extent); }; - /** - * @param val normalized value in [0, 1]. - * @return raw ordinal number. + /** + * @param val normalized value in [0, 1]. + * @return raw ordinal number. */ @@ -33283,8 +33293,8 @@ // Not support. return; }; - /** - * @see `Ordinal['_ordinalNumbersByTick']` + /** + * @see `Ordinal['_ordinalNumbersByTick']` */ @@ -33325,20 +33335,20 @@ return ticksByOrdinalNumber && ordinal >= 0 && ordinal < ticksByOrdinalNumber.length ? ticksByOrdinalNumber[ordinal] : ordinal; }; - /** - * @usage - * ```js - * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal); - * - * // case0 - * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber]; - * // case1 - * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber]; - * // case2 - * const coord = axis.dataToCoord(ordinalNumber); - * ``` - * - * @param {OrdinalNumber} tickNumber index of display + /** + * @usage + * ```js + * const ordinalNumber = ordinalScale.getRawOrdinalNumber(tickVal); + * + * // case0 + * const rawOrdinalValue = axisModel.getCategories()[ordinalNumber]; + * // case1 + * const rawOrdinalValue = this._ordinalMeta.categories[ordinalNumber]; + * // case2 + * const coord = axis.dataToCoord(ordinalNumber); + * ``` + * + * @param {OrdinalNumber} tickNumber index of display */ @@ -33348,8 +33358,8 @@ return ordinalNumbersByTick && tickNumber >= 0 && tickNumber < ordinalNumbersByTick.length ? ordinalNumbersByTick[tickNumber] : tickNumber; }; - /** - * Get item on tick + /** + * Get item on tick */ @@ -33370,9 +33380,9 @@ OrdinalScale.prototype.unionExtentFromData = function (data, dim) { this.unionExtent(data.getApproximateExtent(dim)); }; - /** - * @override - * If value is in extent range + /** + * @override + * If value is in extent range */ @@ -33459,8 +33469,8 @@ this._niceExtent = this._extent.slice(); this._intervalPrecision = getIntervalPrecision(interval); }; - /** - * @param expandToNicedExtent Whether expand the ticks to niced extent. + /** + * @param expandToNicedExtent Whether expand the ticks to niced extent. */ @@ -33557,9 +33567,9 @@ return minorTicks; }; - /** - * @param opt.precision If 'auto', use nice presision. - * @param opt.pad returns 1.50 but not 1.5 if precision is 2. + /** + * @param opt.precision If 'auto', use nice presision. + * @param opt.pad returns 1.50 but not 1.5 if precision is 2. */ @@ -33582,8 +33592,8 @@ var dataNum = roundNumber(data.value, precision, true); return addCommas(dataNum); }; - /** - * @param splitNumber By default `5`. + /** + * @param splitNumber By default `5`. */ @@ -33696,22 +33706,22 @@ }); return seriesModels; } - /** - * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent - * values. - * This works for time axes, value axes, and log axes. - * For a single time axis, return value is in the form like - * {'x_0': [1000000]}. - * The value of 1000000 is in milliseconds. + /** + * Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent + * values. + * This works for time axes, value axes, and log axes. + * For a single time axis, return value is in the form like + * {'x_0': [1000000]}. + * The value of 1000000 is in milliseconds. */ function getValueAxesMinGaps(barSeries) { - /** - * Map from axis.index to values. - * For a single time axis, axisValues is in the form like - * {'x_0': [1495555200000, 1495641600000, 1495728000000]}. - * Items in axisValues[x], e.g. 1495555200000, are time values of all - * series. + /** + * Map from axis.index to values. + * For a single time axis, axisValues is in the form like + * {'x_0': [1495555200000, 1495641600000, 1495728000000]}. + * Items in axisValues[x], e.g. 1495555200000, are time values of all + * series. */ var axisValues = {}; each(barSeries, function (seriesModel) { @@ -34156,8 +34166,8 @@ _this.type = 'time'; return _this; } - /** - * Get label is mainly for other components like dataZoom, tooltip. + /** + * Get label is mainly for other components like dataZoom, tooltip. */ @@ -34171,8 +34181,8 @@ var lang = this.getSetting('locale'); return leveledFormat(tick, idx, labelFormatter, lang, isUTC); }; - /** - * @override + /** + * @override */ @@ -34261,11 +34271,11 @@ TimeScale.type = 'time'; return TimeScale; }(IntervalScale); - /** - * This implementation was originally copied from "d3.js" - * - * with some modifications made for this program. - * See the license statement at the head of this file. + /** + * This implementation was originally copied from "d3.js" + * + * with some modifications made for this program. + * See the license statement at the head of this file. */ @@ -34689,8 +34699,8 @@ _this._interval = 0; return _this; } - /** - * @param Whether expand the ticks to niced extent. + /** + * @param Whether expand the ticks to niced extent. */ @@ -34718,8 +34728,8 @@ end = mathLog(Math.max(0, end)) / base; intervalScaleProto.setExtent.call(this, start, end); }; - /** - * @return {number} end + /** + * @return {number} end */ @@ -34750,9 +34760,9 @@ // filter value that <= 0 this.unionExtent(data.getApproximateExtent(dim)); }; - /** - * Update interval and extent of intervals for nice ticks - * @param approxTickNum default 10 Given approx tick number + /** + * Update interval and extent of intervals for nice ticks + * @param approxTickNum default 10 Given approx tick number */ @@ -34828,9 +34838,9 @@ originalExtent) { this._prepareParams(scale, model, originalExtent); } - /** - * Parameters depending on outside (like model, user callback) - * are prepared and fixed here. + /** + * Parameters depending on outside (like model, user callback) + * are prepared and fixed here. */ @@ -34888,11 +34898,11 @@ } } }; - /** - * Calculate extent by prepared parameters. - * This method has no external dependency and can be called duplicatedly, - * getting the same result. - * If parameters changed, should call this method to recalcuate. + /** + * Calculate extent by prepared parameters. + * This method has no external dependency and can be called duplicatedly, + * getting the same result. + * If parameters changed, should call this method to recalcuate. */ @@ -35006,20 +35016,20 @@ min: '_dataMin', max: '_dataMax' }; - /** - * Get scale min max and related info only depends on model settings. - * This method can be called after coordinate system created. - * For example, in data processing stage. - * - * Scale extent info probably be required multiple times during a workflow. - * For example: - * (1) `dataZoom` depends it to get the axis extent in "100%" state. - * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified. - * (3) `coordSys.update` use it to finally decide the scale extent. - * But the callback of `min`/`max` should not be called multiple times. - * The code below should not be implemented repeatedly either. - * So we cache the result in the scale instance, which will be recreated at the beginning - * of the workflow (because `scale` instance will be recreated each round of the workflow). + /** + * Get scale min max and related info only depends on model settings. + * This method can be called after coordinate system created. + * For example, in data processing stage. + * + * Scale extent info probably be required multiple times during a workflow. + * For example: + * (1) `dataZoom` depends it to get the axis extent in "100%" state. + * (2) `processor/extentCalculator` depends it to make sure whether axis extent is specified. + * (3) `coordSys.update` use it to finally decide the scale extent. + * But the callback of `min`/`max` should not be called multiple times. + * The code below should not be implemented repeatedly either. + * So we cache the result in the scale instance, which will be recreated at the beginning + * of the workflow (because `scale` instance will be recreated each round of the workflow). */ function ensureScaleRawExtentInfo(scale, model, // Usually: data extent from all series on this axis. @@ -35040,14 +35050,14 @@ return minMax == null ? null : eqNaN(minMax) ? NaN : scale.parse(minMax); } - /** - * Get axis scale extent before niced. - * Item of returned array can only be number (including Infinity and NaN). - * - * Caution: - * Precondition of calling this method: - * The scale extent has been initialized using series data extent via - * `scale.setExtent` or `scale.unionExtentFromData`; + /** + * Get axis scale extent before niced. + * Item of returned array can only be number (including Infinity and NaN). + * + * Caution: + * Precondition of calling this method: + * The scale extent has been initialized using series data extent via + * `scale.setExtent` or `scale.unionExtentFromData`; */ function getScaleExtent(scale, model) { @@ -35167,8 +35177,8 @@ scale.setInterval && scale.setInterval(interval); } } - /** - * @param axisType Default retrieve from model.type + /** + * @param axisType Default retrieve from model.type */ function createScaleByModel(model, axisType) { @@ -35195,8 +35205,8 @@ } } } - /** - * Check if the axis cross 0 + /** + * Check if the axis cross 0 */ function ifAxisCrossZero(axis) { @@ -35205,13 +35215,13 @@ var max = dataExtent[1]; return !(min > 0 && max > 0 || min < 0 && max < 0); } - /** - * @param axis - * @return Label formatter function. - * param: {number} tickValue, - * param: {number} idx, the index in all ticks. - * If category axis, this param is not required. - * return: {string} label string. + /** + * @param axis + * @return Label formatter function. + * param: {number} tickValue, + * param: {number} idx, the index in all ticks. + * If category axis, this param is not required. + * return: {string} label string. */ function makeLabelFormatter(axis) { @@ -35264,9 +35274,9 @@ // in category axis. return axis.type === 'category' ? axis.scale.getLabel(tick) : tick.value; } - /** - * @param axis - * @return Be null/undefined if no labels. + /** + * @param axis + * @return Be null/undefined if no labels. */ function estimateLabelUnionRect(axis) { @@ -35319,9 +35329,9 @@ var rotatedRect = new BoundingRect(textRect.x, textRect.y, afterWidth, afterHeight); return rotatedRect; } - /** - * @param model axisLabelModel or axisTickModel - * @return {number|String} Can be null|'auto'|number|function + /** + * @param model axisLabelModel or axisTickModel + * @return {number|String} Can be null|'auto'|number|function */ @@ -35329,10 +35339,10 @@ var interval = model.get('interval'); return interval == null ? 'auto' : interval; } - /** - * Set `categoryInterval` as 0 implicitly indicates that - * show all labels regardless of overlap. - * @param {Object} axis axisModel.axis + /** + * Set `categoryInterval` as 0 implicitly indicates that + * show all labels regardless of overlap. + * @param {Object} axis axisModel.axis */ function shouldShowAllLabels(axis) { @@ -35389,23 +35399,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars var AxisModelCommonMixin = @@ -35417,9 +35427,9 @@ var option = this.option; return !option.scale; }; - /** - * Should be implemented by each axis model if necessary. - * @return coordinate system model + /** + * Should be implemented by each axis model if necessary. + * @return coordinate system model */ @@ -35430,8 +35440,8 @@ return AxisModelCommonMixin; }(); - /** - * Create a multi dimension List structure from seriesModel. + /** + * Create a multi dimension List structure from seriesModel. */ function createList(seriesModel) { @@ -35442,11 +35452,11 @@ enableDataStack: enableDataStack, getStackedDimension: getStackedDimension }; - /** - * Create scale - * @param {Array.} dataExtent - * @param {Object|module:echarts/Model} option If `optoin.type` - * is secified, it can only be `'value'` currently. + /** + * Create scale + * @param {Array.} dataExtent + * @param {Object|module:echarts/Model} option If `optoin.type` + * is secified, it can only be `'value'` currently. */ function createScale(dataExtent, option) { @@ -35468,15 +35478,15 @@ niceScaleExtent(scale, axisModel); return scale; } - /** - * Mixin common methods to axis model, - * - * Include methods - * `getFormattedLabels() => Array.` - * `getCategories() => Array.` - * `getMin(origin: boolean) => number` - * `getMax(origin: boolean) => number` - * `getNeedCrossZero() => boolean` + /** + * Mixin common methods to axis model, + * + * Include methods + * `getFormattedLabels() => Array.` + * `getCategories() => Array.` + * `getMin(origin: boolean) => number` + * `getMax(origin: boolean) => number` + * `getNeedCrossZero() => boolean` */ function mixinAxisModelCommonMethods(Model) { @@ -35579,10 +35589,10 @@ Region.prototype.setCenter = function (center) { this._center = center; }; - /** - * Get center point in data unit. That is, - * for GeoJSONRegion, the unit is lat/lng, - * for GeoSVGRegion, the unit is SVG local coord. + /** + * Get center point in data unit. That is, + * for GeoJSONRegion, the unit is lat/lng, + * for GeoSVGRegion, the unit is SVG local coord. */ @@ -35731,12 +35741,12 @@ return false; }; - /** - * Transform the raw coords to target bounding. - * @param x - * @param y - * @param width - * @param height + /** + * Transform the raw coords to target bounding. + * @param x + * @param y + * @param width + * @param height */ @@ -36039,13 +36049,13 @@ // Only ordinal scale support tick interval return axis.type === 'category' ? makeCategoryLabels(axis) : makeRealNumberLabels(axis); } - /** - * @param {module:echats/coord/Axis} axis - * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea. - * @return {Object} { - * ticks: Array. - * tickCategoryInterval: number - * } + /** + * @param {module:echats/coord/Axis} axis + * @param {module:echarts/model/Model} tickModel For example, can be axisTick, splitLine, splitArea. + * @return {Object} { + * ticks: Array. + * tickCategoryInterval: number + * } */ function createAxisTicks(axis, tickModel) { @@ -36172,10 +36182,10 @@ var result = inner$5(axis).autoInterval; return result != null ? result : inner$5(axis).autoInterval = axis.calculateCategoryInterval(); } - /** - * Calculate interval for category axis ticks and labels. - * To get precise result, at least one of `getRotate` and `isHorizontal` - * should be implemented in axis. + /** + * Calculate interval for category axis ticks and labels. + * To get precise result, at least one of `getRotate` and `isHorizontal` + * should be implemented in axis. */ @@ -36343,8 +36353,8 @@ } var NORMALIZED_EXTENT = [0, 1]; - /** - * Base class of Axis. + /** + * Base class of Axis. */ var Axis = @@ -36357,8 +36367,8 @@ this.scale = scale; this._extent = extent || [0, 0]; } - /** - * If axis extent contain given coord + /** + * If axis extent contain given coord */ @@ -36368,32 +36378,32 @@ var max = Math.max(extent[0], extent[1]); return coord >= min && coord <= max; }; - /** - * If axis extent contain given data + /** + * If axis extent contain given data */ Axis.prototype.containData = function (data) { return this.scale.contain(data); }; - /** - * Get coord extent. + /** + * Get coord extent. */ Axis.prototype.getExtent = function () { return this._extent.slice(); }; - /** - * Get precision used for formatting + /** + * Get precision used for formatting */ Axis.prototype.getPixelPrecision = function (dataExtent) { return getPixelPrecision(dataExtent || this.scale.getExtent(), this._extent); }; - /** - * Set coord extent + /** + * Set coord extent */ @@ -36402,8 +36412,8 @@ extent[0] = start; extent[1] = end; }; - /** - * Convert data to coord. Data is the rank if it has an ordinal scale + /** + * Convert data to coord. Data is the rank if it has an ordinal scale */ @@ -36419,8 +36429,8 @@ return linearMap(data, NORMALIZED_EXTENT, extent, clamp); }; - /** - * Convert coord to data. Data is the rank if it has an ordinal scale + /** + * Convert coord to data. Data is the rank if it has an ordinal scale */ @@ -36436,8 +36446,8 @@ var t = linearMap(coord, extent, NORMALIZED_EXTENT, clamp); return this.scale.scale(t); }; - /** - * Convert pixel point to data in axis + /** + * Convert pixel point to data in axis */ @@ -36445,14 +36455,14 @@ // Should be implemented in derived class if necessary. return; }; - /** - * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`, - * `axis.getTicksCoords` considers `onBand`, which is used by - * `boundaryGap:true` of category axis and splitLine and splitArea. - * @param opt.tickModel default: axis.model.getModel('axisTick') - * @param opt.clamp If `true`, the first and the last - * tick must be at the axis end points. Otherwise, clip ticks - * that outside the axis extent. + /** + * Different from `zrUtil.map(axis.getTicks(), axis.dataToCoord, axis)`, + * `axis.getTicksCoords` considers `onBand`, which is used by + * `boundaryGap:true` of category axis and splitLine and splitArea. + * @param opt.tickModel default: axis.model.getModel('axisTick') + * @param opt.clamp If `true`, the first and the last + * tick must be at the axis end points. Otherwise, clip ticks + * that outside the axis extent. */ @@ -36504,20 +36514,20 @@ Axis.prototype.getLabelModel = function () { return this.model.getModel('axisLabel'); }; - /** - * Notice here we only get the default tick model. For splitLine - * or splitArea, we should pass the splitLineModel or splitAreaModel - * manually when calling `getTicksCoords`. - * In GL, this method may be overridden to: - * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));` + /** + * Notice here we only get the default tick model. For splitLine + * or splitArea, we should pass the splitLineModel or splitAreaModel + * manually when calling `getTicksCoords`. + * In GL, this method may be overridden to: + * `axisModel.getModel('axisTick', grid3DModel.getModel('axisTick'));` */ Axis.prototype.getTickModel = function () { return this.model.getModel('axisTick'); }; - /** - * Get width of band + /** + * Get width of band */ @@ -36530,10 +36540,10 @@ var size = Math.abs(axisExtent[1] - axisExtent[0]); return Math.abs(size) / len; }; - /** - * Only be called in category axis. - * Can be overridden, consider other axes like in 3D. - * @return Auto interval for cateogry axis tick and label + /** + * Only be called in category axis. + * Can be overridden, consider other axes like in 3D. + * @return Auto interval for cateogry axis tick and label */ @@ -36680,10 +36690,10 @@ var tmpArr = []; var tmpProjPoint = new Point(); - /** - * Reduce the line segment attached to the label to limit the turn angle between two segments. - * @param linePoints - * @param minTurnAngle Radian of minimum turn angle. 0 - 180 + /** + * Reduce the line segment attached to the label to limit the turn angle between two segments. + * @param linePoints + * @param minTurnAngle Radian of minimum turn angle. 0 - 180 */ function limitTurnAngle(linePoints, minTurnAngle) { @@ -36736,9 +36746,9 @@ tmpProjPoint.toArray(linePoints[1]); } } - /** - * Limit the angle of line and the surface - * @param maxSurfaceAngle Radian of minimum turn angle. 0 - 180. 0 is same direction to normal. 180 is opposite + /** + * Limit the angle of line and the surface + * @param maxSurfaceAngle Radian of minimum turn angle. 0 - 180. 0 is same direction to normal. 180 is opposite */ function limitSurfaceAngle(linePoints, surfaceNormal, maxSurfaceAngle) { @@ -36850,8 +36860,8 @@ } } } - /** - * Create a label line if necessary and set it's style. + /** + * Create a label line if necessary and set it's style. */ @@ -37108,9 +37118,9 @@ } } } - /** - * Squeeze to allow overlap if there is no more space available. - * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds. + /** + * Squeeze to allow overlap if there is no more space available. + * Let other overlapping strategy like hideOverlap do the job instead of keep exceeding the bounds. */ @@ -37138,8 +37148,8 @@ return adjusted; } - /** - * Adjust labels on y direction to avoid overlap. + /** + * Adjust labels on y direction to avoid overlap. */ function shiftLayoutOnY(list, topBound, bottomBound, // If average the shifts on all labels and add them to 0 @@ -39776,8 +39786,8 @@ return LineSeriesModel; }(SeriesModel); - /** - * @return label string. Not null/undefined + /** + * @return label string. Not null/undefined */ function getDefaultLabel(data, dataIndex) { @@ -39851,9 +39861,9 @@ this._symbolType = symbolType; this.add(symbolPath); }; - /** - * Stop animation - * @param {boolean} toLastFrame + /** + * Stop animation + * @param {boolean} toLastFrame */ @@ -39864,39 +39874,39 @@ Symbol.prototype.getSymbolType = function () { return this._symbolType; }; - /** - * FIXME: - * Caution: This method breaks the encapsulation of this module, - * but it indeed brings convenience. So do not use the method - * unless you detailedly know all the implements of `Symbol`, - * especially animation. - * - * Get symbol path element. + /** + * FIXME: + * Caution: This method breaks the encapsulation of this module, + * but it indeed brings convenience. So do not use the method + * unless you detailedly know all the implements of `Symbol`, + * especially animation. + * + * Get symbol path element. */ Symbol.prototype.getSymbolPath = function () { return this.childAt(0); }; - /** - * Highlight symbol + /** + * Highlight symbol */ Symbol.prototype.highlight = function () { enterEmphasis(this.childAt(0)); }; - /** - * Downplay symbol + /** + * Downplay symbol */ Symbol.prototype.downplay = function () { leaveEmphasis(this.childAt(0)); }; - /** - * @param {number} zlevel - * @param {number} z + /** + * @param {number} zlevel + * @param {number} z */ @@ -39911,8 +39921,8 @@ symbolPath.draggable = draggable; symbolPath.cursor = !hasCursorOption && draggable ? 'move' : symbolPath.cursor; }; - /** - * Update symbol properties + /** + * Update symbol properties */ @@ -40181,8 +40191,8 @@ this.group = new Group(); this._SymbolCtor = SymbolCtor || Symbol; } - /** - * Update symbols draw by new data + /** + * Update symbols draw by new data */ @@ -40279,8 +40289,8 @@ this._data = null; this.group.removeAll(); }; - /** - * Update symbols draw by new data + /** + * Update symbols draw by new data */ SymbolDraw.prototype.incrementalUpdate = function (taskParams, data, opt) { @@ -40556,10 +40566,10 @@ function isPointNull(x, y) { return isNaN(x) || isNaN(y); } - /** - * Draw smoothed line in non-monotone, in may cause undesired curve in extreme - * situations. This should be used when points are non-monotone neither in x or - * y dimension. + /** + * Draw smoothed line in non-monotone, in may cause undesired curve in extreme + * situations. This should be used when points are non-monotone neither in x or + * y dimension. */ @@ -41044,23 +41054,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function isCoordinateSystemType(coordSys, type) { return coordSys.type === type; @@ -41194,11 +41204,11 @@ stepPoints.push(points[i++], points[i++]); return stepPoints; } - /** - * Clip color stops to edge. Avoid creating too large gradients. - * Which may lead to blurry when GPU acceleration is enabled. See #15680 - * - * The stops has been sorted from small to large. + /** + * Clip color stops to edge. Avoid creating too large gradients. + * Which may lead to blurry when GPU acceleration is enabled. See #15680 + * + * The stops has been sorted from small to large. */ @@ -42153,8 +42163,8 @@ } } }; - /** - * @private + /** + * @private */ // FIXME Two value axis @@ -42628,8 +42638,8 @@ createInvertedIndices: !!this.get('realtimeSort', true) || null }); }; - /** - * @override + /** + * @override */ @@ -42637,8 +42647,8 @@ // Do not support progressive in normal mode. return this.get('large') ? this.get('progressive') : false; }; - /** - * @override + /** + * @override */ @@ -42688,8 +42698,8 @@ return BarSeriesModel; }(BaseBarSeriesModel); - /** - * Sausage: similar to sector, but have half circle on both sides + /** + * Sausage: similar to sector, but have half circle on both sides */ var SausageShape = @@ -42921,12 +42931,12 @@ } var rotate = Math.PI * 1.5 - anchorAngle; - /** - * TODO: labels with rotate > Math.PI / 2 should be rotate another - * half round flipped to increase readability. However, only middle - * position supports this for now, because in other positions, the - * anchor point is not at the center of the text, so the positions - * after rotating is not as expected. + /** + * TODO: labels with rotate > Math.PI / 2 should be rotate another + * half round flipped to increase readability. However, only middle + * position supports this for now, because in other positions, the + * anchor point is not at the center of the text, so the positions + * after rotating is not as expected. */ if (mappedSectorPosition === 'middle' && rotate > Math.PI / 2 && rotate < Math.PI * 1.5) { @@ -43130,13 +43140,13 @@ var el = elementCreator[coord.type](seriesModel, data, dataIndex, layout, isHorizontalOrRadial, animationModel, baseAxis.model, false, roundCap); if (realtimeSortCfg) { - /** - * Force label animation because even if the element is - * ignored because it's clipped, it may not be clipped after - * changing order. Then, if not using forceLabelAnimation, - * the label animation was never started, in which case, - * the label will be the final value and doesn't have label - * animation. + /** + * Force label animation because even if the element is + * ignored because it's clipped, it may not be clipped after + * changing order. Then, if not using forceLabelAnimation, + * the label animation was never started, in which case, + * the label will be the final value and doesn't have label + * animation. */ el.forceLabelAnimation = true; } @@ -43221,11 +43231,11 @@ var labelInnerStore = labelInner(textEl); if (labelInnerStore.prevValue != null) { - /** - * Set preValue to be value so that no new label - * should be started, otherwise, it will take a full - * `animationDurationUpdate` time to finish the - * animation, which is not expected. + /** + * Set preValue to be value so that no new label + * should be started, otherwise, it will take a full + * `animationDurationUpdate` time to finish the + * animation, which is not expected. */ labelInnerStore.prevValue = labelInnerStore.value; } @@ -43367,10 +43377,10 @@ return false; }; - /* - * Consider the case when A and B changed order, whose representing - * bars are both out of sight, we don't wish to trigger reorder action - * as long as the order in the view doesn't change. + /* + * Consider the case when A and B changed order, whose representing + * bars are both out of sight, we don't wish to trigger reorder action + * as long as the order in the view doesn't change. */ @@ -43955,14 +43965,14 @@ registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout('bar')); // Down sample after filter registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample('bar')); - /** - * @payload - * @property {string} [componentType=series] - * @property {number} [dx] - * @property {number} [dy] - * @property {number} [zoom] - * @property {number} [originX] - * @property {number} [originY] + /** + * @payload + * @property {string} [componentType=series] + * @property {number} [dx] + * @property {number} [dy] + * @property {number} [zoom] + * @property {number} [originX] + * @property {number} [originY] */ registers.registerAction({ @@ -44168,23 +44178,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function dataFilter(seriesType) { return { @@ -44392,15 +44402,15 @@ } } } - /** - * Set max width of each label, and then wrap each label to the max width. - * - * @param layout label layout - * @param availableWidth max width for the label to display - * @param forceRecalculate recaculate the text layout even if the current width - * is smaller than `availableWidth`. This is useful when the text was previously - * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in - * which case, previous wrapping should be redo. + /** + * Set max width of each label, and then wrap each label to the max width. + * + * @param layout label layout + * @param availableWidth max width for the label to display + * @param forceRecalculate recaculate the text layout even if the current width + * is smaller than `availableWidth`. This is useful when the text was previously + * wrapped by calling `constrainTextWidth` but now `availableWidth` changed, in + * which case, previous wrapping should be redo. */ @@ -44703,8 +44713,8 @@ } } - /** - * Piece of pie including Sector, Label, LabelLine + /** + * Piece of pie including Sector, Label, LabelLine */ var PiePiece = @@ -44964,15 +44974,15 @@ return PieView; }(ChartView); - /** - * [Usage]: - * (1) - * createListSimply(seriesModel, ['value']); - * (2) - * createListSimply(seriesModel, { - * coordDimensions: ['value'], - * dimensionsCount: 5 - * }); + /** + * [Usage]: + * (1) + * createListSimply(seriesModel, ['value']); + * (2) + * createListSimply(seriesModel, { + * coordDimensions: ['value'], + * dimensionsCount: 5 + * }); */ function createSeriesDataSimply(seriesModel, opt, nameList) { @@ -45012,28 +45022,28 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ - /** - * LegendVisualProvider is an bridge that pick encoded color from data and - * provide to the legend component. + /** + * LegendVisualProvider is an bridge that pick encoded color from data and + * provide to the legend component. */ var LegendVisualProvider = /** @class */ @@ -45088,8 +45098,8 @@ function PieSeriesModel() { return _super !== null && _super.apply(this, arguments) || this; } - /** - * @overwrite + /** + * @overwrite */ @@ -45102,16 +45112,16 @@ this._defaultLabelLine(option); }; - /** - * @overwrite + /** + * @overwrite */ PieSeriesModel.prototype.mergeOption = function () { _super.prototype.mergeOption.apply(this, arguments); }; - /** - * @overwrite + /** + * @overwrite */ @@ -45121,8 +45131,8 @@ encodeDefaulter: curry(makeSeriesEncodeForNameBased, this) }); }; - /** - * @overwrite + /** + * @overwrite */ @@ -45563,8 +45573,8 @@ function LargeSymbolDraw() { this.group = new Group(); } - /** - * Update symbols draw by new data + /** + * Update symbols draw by new data */ @@ -46033,23 +46043,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var AXIS_TYPES = { value: 1, @@ -46058,9 +46068,9 @@ log: 1 }; - /** - * Generate sub axis model class - * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ... + /** + * Generate sub axis model class + * @param axisName 'x' 'y' 'radius' 'angle' 'parallel' ... */ function axisModelCreator(registers, axisName, BaseAxisModelClass, extraDefaultOption) { @@ -46099,9 +46109,9 @@ this.__ordinalMeta = OrdinalMeta.createByAxisModel(this); } }; - /** - * Should not be called before all of 'getInitailData' finished. - * Because categories are collected during initializing data. + /** + * Should not be called before all of 'getInitailData' finished. + * Because categories are collected during initializing data. */ @@ -46192,9 +46202,9 @@ _this.dimensions = cartesian2DDimensions; return _this; } - /** - * Calculate an affine transform matrix if two axes are time or value. - * It's mainly for accelartion on the large time series data. + /** + * Calculate an affine transform matrix if two axes are time or value. + * It's mainly for accelartion on the large time series data. */ @@ -46226,8 +46236,8 @@ var m = this._transform = [scaleX, 0, 0, scaleY, translateX, translateY]; this._invTransform = invert([], m); }; - /** - * Base axis will be used on stacking. + /** + * Base axis will be used on stacking. */ @@ -46300,9 +46310,9 @@ Cartesian2D.prototype.getOtherAxis = function (axis) { return this.getAxis(axis.dim === 'x' ? 'y' : 'x'); }; - /** - * Get rect area of cartesian. - * Area will have a contain function to determine if a point is in the coordinate system. + /** + * Get rect area of cartesian. + * Area will have a contain function to determine if a point is in the coordinate system. */ @@ -46326,9 +46336,9 @@ function Axis2D(dim, scale, coordExtent, axisType, position) { var _this = _super.call(this, dim, scale, coordExtent) || this; - /** - * Index of axis, can be used as key - * Injected outside. + /** + * Index of axis, can be used as key + * Injected outside. */ @@ -46342,13 +46352,13 @@ var position = this.position; return position === 'top' || position === 'bottom'; }; - /** - * Each item cooresponds to this.getExtent(), which - * means globalExtent[0] may greater than globalExtent[1], - * unless `asc` is input. - * - * @param {boolean} [asc] - * @return {Array.} + /** + * Each item cooresponds to this.getExtent(), which + * means globalExtent[0] may greater than globalExtent[1], + * unless `asc` is input. + * + * @param {boolean} [asc] + * @return {Array.} */ @@ -46363,9 +46373,9 @@ Axis2D.prototype.pointToData = function (point, clamp) { return this.coordToData(this.toLocalCoord(point[this.dim === 'x' ? 0 : 1]), clamp); }; - /** - * Set ordinalSortInfo - * @param info new OrdinalSortInfo + /** + * Set ordinalSortInfo + * @param info new OrdinalSortInfo */ @@ -46381,9 +46391,9 @@ return Axis2D; }(Axis); - /** - * Can only be called after coordinate system creation stage. - * (Can be called before coordinate system update stage). + /** + * Can only be called after coordinate system creation stage. + * (Can be called before coordinate system update stage). */ function layout$1(gridModel, axisModel, opt) { @@ -46651,8 +46661,8 @@ this.resize(this.model, api); }; - /** - * Resize the grid + /** + * Resize the grid */ @@ -46738,8 +46748,8 @@ Grid.prototype.getCartesians = function () { return this._coordsList.slice(); }; - /** - * @implements + /** + * @implements */ @@ -46748,8 +46758,8 @@ return target.cartesian ? target.cartesian.dataToPoint(value) : target.axis ? target.axis.toGlobalCoord(target.axis.dataToCoord(value)) : null; }; - /** - * @implements + /** + * @implements */ @@ -46791,8 +46801,8 @@ axis: axis }; }; - /** - * @implements + /** + * @implements */ @@ -46803,8 +46813,8 @@ return coord.containPoint(point); } }; - /** - * Initialize cartesian coordinate systems + /** + * Initialize cartesian coordinate systems */ @@ -46897,8 +46907,8 @@ }; } }; - /** - * Update cartesian properties from series. + /** + * Update cartesian properties from series. */ @@ -46937,8 +46947,8 @@ }); } }; - /** - * @param dim 'x' or 'y' or 'auto' or null/undefined + /** + * @param dim 'x' or 'y' or 'auto' or null/undefined */ @@ -46999,8 +47009,8 @@ Grid.dimensions = cartesian2DDimensions; return Grid; }(); - /** - * Check if the axis is used in the specified grid. + /** + * Check if the axis is used in the specified grid. */ @@ -47075,27 +47085,27 @@ } var PI$5 = Math.PI; - /** - * A final axis is translated and rotated from a "standard axis". - * So opt.position and opt.rotation is required. - * - * A standard axis is and axis from [0, 0] to [0, axisExtent[1]], - * for example: (0, 0) ------------> (0, 50) - * - * nameDirection or tickDirection or labelDirection is 1 means tick - * or label is below the standard axis, whereas is -1 means above - * the standard axis. labelOffset means offset between label and axis, - * which is useful when 'onZero', where axisLabel is in the grid and - * label in outside grid. - * - * Tips: like always, - * positive rotation represents anticlockwise, and negative rotation - * represents clockwise. - * The direction of position coordinate is the same as the direction - * of screen coordinate. - * - * Do not need to consider axis 'inverse', which is auto processed by - * axis extent. + /** + * A final axis is translated and rotated from a "standard axis". + * So opt.position and opt.rotation is required. + * + * A standard axis is and axis from [0, 0] to [0, axisExtent[1]], + * for example: (0, 0) ------------> (0, 50) + * + * nameDirection or tickDirection or labelDirection is 1 means tick + * or label is below the standard axis, whereas is -1 means above + * the standard axis. labelOffset means offset between label and axis, + * which is useful when 'onZero', where axisLabel is in the grid and + * label in outside grid. + * + * Tips: like always, + * positive rotation represents anticlockwise, and negative rotation + * represents clockwise. + * The direction of position coordinate is the same as the direction + * of screen coordinate. + * + * Do not need to consider axis 'inverse', which is auto processed by + * axis extent. */ var AxisBuilder = @@ -47657,26 +47667,26 @@ function collect(ecModel, api) { var result = { - /** - * key: makeKey(axis.model) - * value: { - * axis, - * coordSys, - * axisPointerModel, - * triggerTooltip, - * triggerEmphasis, - * involveSeries, - * snap, - * seriesModels, - * seriesDataCount - * } + /** + * key: makeKey(axis.model) + * value: { + * axis, + * coordSys, + * axisPointerModel, + * triggerTooltip, + * triggerEmphasis, + * involveSeries, + * snap, + * seriesModels, + * seriesDataCount + * } */ axesInfo: {}, seriesInvolved: false, - /** - * key: makeKey(coordSys.model) - * value: Object: key makeKey(axis.model), value: axisInfo + /** + * key: makeKey(coordSys.model) + * value: Object: key makeKey(axis.model), value: axisInfo */ coordSysAxesInfo: {}, coordSysMap: {} @@ -47836,19 +47846,19 @@ }); }); } - /** - * For example: - * { - * axisPointer: { - * links: [{ - * xAxisIndex: [2, 4], - * yAxisIndex: 'all' - * }, { - * xAxisId: ['a5', 'a7'], - * xAxisName: 'xxx' - * }] - * } - * } + /** + * For example: + * { + * axisPointer: { + * links: [{ + * xAxisIndex: [2, 4], + * yAxisIndex: 'all' + * }, { + * xAxisId: ['a5', 'a7'], + * xAxisName: 'xxx' + * }] + * } + * } */ @@ -47926,9 +47936,9 @@ function isHandleTrigger(axisPointerModel) { return !!axisPointerModel.get(['handle', 'show']); } - /** - * @param {module:echarts/model/Model} model - * @return {string} unique key + /** + * @param {module:echarts/model/Model} model + * @return {string} unique key */ @@ -47937,8 +47947,8 @@ } var axisPointerClazz = {}; - /** - * Base class of AxisView. + /** + * Base class of AxisView. */ var AxisView = @@ -47952,8 +47962,8 @@ _this.type = AxisView.type; return _this; } - /** - * @override + /** + * @override */ @@ -47969,16 +47979,16 @@ this._doUpdateAxisPointerClass(axisModel, api, true); }; - /** - * Action handler. + /** + * Action handler. */ AxisView.prototype.updateAxisPointer = function (axisModel, ecModel, api, payload) { this._doUpdateAxisPointerClass(axisModel, api, false); }; - /** - * @override + /** + * @override */ @@ -47986,8 +47996,8 @@ var axisPointer = this._axisPointer; axisPointer && axisPointer.remove(api); }; - /** - * @override + /** + * @override */ @@ -48135,8 +48145,8 @@ _this.axisPointerClass = 'CartesianAxisPointer'; return _this; } - /** - * @override + /** + * @override */ @@ -48402,8 +48412,8 @@ var inner$7 = makeInner(); var clone$3 = clone; var bind$1 = bind; - /** - * Base axis pointer class in 2D. + /** + * Base axis pointer class in 2D. */ var BaseAxisPointer = @@ -48411,15 +48421,15 @@ function () { function BaseAxisPointer() { this._dragging = false; - /** - * In px, arbitrary value. Do not set too small, - * no animation is ok for most cases. + /** + * In px, arbitrary value. Do not set too small, + * no animation is ok for most cases. */ this.animationThreshold = 15; } - /** - * @implement + /** + * @implement */ @@ -48480,24 +48490,24 @@ this._renderHandle(value); }; - /** - * @implement + /** + * @implement */ BaseAxisPointer.prototype.remove = function (api) { this.clear(api); }; - /** - * @implement + /** + * @implement */ BaseAxisPointer.prototype.dispose = function (api) { this.clear(api); }; - /** - * @protected + /** + * @protected */ @@ -48533,16 +48543,16 @@ return animation === true; }; - /** - * add {pointer, label, graphicKey} to elOption - * @protected + /** + * add {pointer, label, graphicKey} to elOption + * @protected */ BaseAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {// Should be implemenented by sub-class. }; - /** - * @protected + /** + * @protected */ @@ -48554,8 +48564,8 @@ group.add(pointerEl); } }; - /** - * @protected + /** + * @protected */ @@ -48566,8 +48576,8 @@ updateLabelShowHide(labelEl, axisPointerModel); } }; - /** - * @protected + /** + * @protected */ @@ -48581,8 +48591,8 @@ }); } }; - /** - * @protected + /** + * @protected */ @@ -48602,8 +48612,8 @@ updateLabelShowHide(labelEl, axisPointerModel); } }; - /** - * @private + /** + * @private */ @@ -48682,8 +48692,8 @@ this._doDispatchAxisPointer(); }; - /** - * Throttled method. + /** + * Throttled method. */ @@ -48730,8 +48740,8 @@ type: 'hideTip' }); }; - /** - * @private + /** + * @private */ @@ -48753,8 +48763,8 @@ clear(this, '_doDispatchAxisPointer'); }; - /** - * @protected + /** + * @protected */ @@ -48833,8 +48843,8 @@ return style; } - /** - * @param {Function} labelPos {align, verticalAlign, position} + /** + * @param {Function} labelPos {align, verticalAlign, position} */ function buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos) { @@ -48969,8 +48979,8 @@ function CartesianAxisPointer() { return _super !== null && _super.apply(this, arguments) || this; } - /** - * @override + /** + * @override */ @@ -48993,8 +49003,8 @@ buildCartesianSingleLabelElOption( // @ts-ignore value, elOption, layoutInfo, axisModel, axisPointerModel, api); }; - /** - * @override + /** + * @override */ @@ -49011,8 +49021,8 @@ rotation: layoutInfo.rotation + (layoutInfo.labelDirection < 0 ? Math.PI : 0) }; }; - /** - * @override + /** + * @override */ @@ -49150,12 +49160,12 @@ var inner$8 = makeInner(); var each$3 = each; - /** - * @param {string} key - * @param {module:echarts/ExtensionAPI} api - * @param {Function} handler - * param: {string} currTrigger - * param: {Array.} point + /** + * @param {string} key + * @param {module:echarts/ExtensionAPI} api + * @param {Function} handler + * param: {string} currTrigger + * param: {Array.} point */ function register(key, api, handler) { @@ -49299,10 +49309,10 @@ return AxisPointerView; }(ComponentView); - /** - * @param finder contains {seriesIndex, dataIndex, dataIndexInside} - * @param ecModel - * @return {point: [x, y], el: ...} point Will not be null. + /** + * @param finder contains {seriesIndex, dataIndex, dataIndexInside} + * @param ecModel + * @return {point: [x, y], el: ...} point Will not be null. */ function findPointFromSeries(finder, ecModel) { @@ -49361,11 +49371,11 @@ } var inner$9 = makeInner(); - /** - * Basic logic: check all axis, if they do not demand show/highlight, - * then hide/downplay them. - * - * @return content of event obj for echarts.connect. + /** + * Basic logic: check all axis, if they do not demand show/highlight, + * then hide/downplay them. + * + * @return content of event obj for echarts.connect. */ function axisTrigger(payload, ecModel, api) { @@ -49936,19 +49946,19 @@ return item != null; }); }; - /** - * Convert - * [{ - * type: 'group', - * id: 'xx', - * children: [{type: 'circle'}, {type: 'polygon'}] - * }] - * to - * [ - * {type: 'group', id: 'xx'}, - * {type: 'circle', parentId: 'xx'}, - * {type: 'polygon', parentId: 'xx'} - * ] + /** + * Convert + * [{ + * type: 'group', + * id: 'xx', + * children: [{type: 'circle'}, {type: 'polygon'}] + * }] + * to + * [ + * {type: 'group', id: 'xx'}, + * {type: 'circle', parentId: 'xx'}, + * {type: 'polygon', parentId: 'xx'} + * ] */ @@ -49992,8 +50002,8 @@ return GraphicComponentModel; }(ComponentModel); - /** - * Whether need to call `convertEC4CompatibleStyle`. + /** + * Whether need to call `convertEC4CompatibleStyle`. */ function isEC4CompatibleStyle(style, elType, hasOwnTextContentOption, hasOwnTextConfig) { @@ -50009,12 +50019,12 @@ return style && (style.legacy || style.legacy !== false && !hasOwnTextContentOption && !hasOwnTextConfig && elType !== 'tspan' // Difficult to detect whether legacy for a "text" el. && (elType === 'text' || hasOwn(style, 'text'))); } - /** - * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format. - * @param hostStyle The properties might be modified. - * @return If be text el, `textContentStyle` and `textConfig` will not be returned. - * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area - * retried from the `hostStyle`. + /** + * `EC4CompatibleStyle` is style that might be in echarts4 format or echarts5 format. + * @param hostStyle The properties might be modified. + * @return If be text el, `textContentStyle` and `textConfig` will not be returned. + * Otherwise a `textContentStyle` and `textConfig` will be created, whose props area + * retried from the `hostStyle`. */ function convertFromEC4CompatibleStyle(hostStyle, elType, isNormal) { @@ -50069,8 +50079,8 @@ textContent: textContent }; } - /** - * The result will be set to `out`. + /** + * The result will be set to `out`. */ function convertEC4CompatibleRichItem(out, richItem) { @@ -50610,9 +50620,9 @@ var getStateToRestore = makeInner(); var KEYFRAME_EXCLUDE_KEYS = ['percent', 'easing', 'shape', 'style', 'extra']; - /** - * Stop previous keyframe animation and restore the attributes. - * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set. + /** + * Stop previous keyframe animation and restore the attributes. + * Avoid new keyframe animation starts with wrong internal state when the percent: 0 is not set. */ function stopPreviousKeyframeAnimationAndRestore(el) { @@ -50771,8 +50781,8 @@ this._relocate(graphicModel, api); }; - /** - * Update graphic elements. + /** + * Update graphic elements. */ @@ -50912,8 +50922,8 @@ } }); }; - /** - * Locate graphic elements. + /** + * Locate graphic elements. */ @@ -50993,8 +51003,8 @@ } } }; - /** - * Clear all elements. + /** + * Clear all elements. */ @@ -51160,9 +51170,9 @@ return axisDim + 'Axis'; } - /** - * If two dataZoomModels has the same axis controlled, we say that they are 'linked'. - * This function finds all linked dataZoomModels start from the given payload. + /** + * If two dataZoomModels has the same axis controlled, we say that they are 'linked'. + * This function finds all linked dataZoomModels start from the given payload. */ function findEffectedDataZooms(ecModel, payload) { @@ -51222,24 +51232,24 @@ return effectedModels; } - /** - * Find the first target coordinate system. - * Available after model built. - * - * @return Like { - * grid: [ - * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1}, - * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0}, - * ... - * ], // cartesians must not be null/undefined. - * polar: [ - * {model: coord0, axisModels: [axis4], coordIndex: 0}, - * ... - * ], // polars must not be null/undefined. - * singleAxis: [ - * {model: coord0, axisModels: [], coordIndex: 0} - * ] - * } + /** + * Find the first target coordinate system. + * Available after model built. + * + * @return Like { + * grid: [ + * {model: coord0, axisModels: [axis1, axis3], coordIndex: 1}, + * {model: coord1, axisModels: [axis0, axis2], coordIndex: 0}, + * ... + * ], // cartesians must not be null/undefined. + * polar: [ + * {model: coord0, axisModels: [axis4], coordIndex: 0}, + * ... + * ], // polars must not be null/undefined. + * singleAxis: [ + * {model: coord0, axisModels: [], coordIndex: 0} + * ] + * } */ function collectReferCoordSysModelInfo(dataZoomModel) { @@ -51308,21 +51318,21 @@ _this.type = DataZoomModel.type; _this._autoThrottle = true; _this._noTarget = true; - /** - * It is `[rangeModeForMin, rangeModeForMax]`. - * The optional values for `rangeMode`: - * + `'value'` mode: the axis extent will always be determined by - * `dataZoom.startValue` and `dataZoom.endValue`, despite - * how data like and how `axis.min` and `axis.max` are. - * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`, - * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`, - * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`. - * Axis extent will be determined by the result of the percent of `[dMin, dMax]`. - * - * For example, when users are using dynamic data (update data periodically via `setOption`), - * if in `'value`' mode, the window will be kept in a fixed value range despite how - * data are appended, while if in `'percent'` mode, whe window range will be changed alone with - * the appended data (suppose `axis.min` and `axis.max` are not specified). + /** + * It is `[rangeModeForMin, rangeModeForMax]`. + * The optional values for `rangeMode`: + * + `'value'` mode: the axis extent will always be determined by + * `dataZoom.startValue` and `dataZoom.endValue`, despite + * how data like and how `axis.min` and `axis.max` are. + * + `'percent'` mode: `100` represents 100% of the `[dMin, dMax]`, + * where `dMin` is `axis.min` if `axis.min` specified, otherwise `data.extent[0]`, + * and `dMax` is `axis.max` if `axis.max` specified, otherwise `data.extent[1]`. + * Axis extent will be determined by the result of the percent of `[dMin, dMax]`. + * + * For example, when users are using dynamic data (update data periodically via `setOption`), + * if in `'value`' mode, the window will be kept in a fixed value range despite how + * data are appended, while if in `'percent'` mode, whe window range will be changed alone with + * the appended data (suppose `axis.min` and `axis.max` are not specified). */ _this._rangePropMode = ['percent', 'percent']; @@ -51331,26 +51341,26 @@ DataZoomModel.prototype.init = function (option, parentModel, ecModel) { var inputRawOption = retrieveRawOption(option); - /** - * Suppose a "main process" start at the point that model prepared (that is, - * model initialized or merged or method called in `action`). - * We should keep the `main process` idempotent, that is, given a set of values - * on `option`, we get the same result. - * - * But sometimes, values on `option` will be updated for providing users - * a "final calculated value" (`dataZoomProcessor` will do that). Those value - * should not be the base/input of the `main process`. - * - * So in that case we should save and keep the input of the `main process` - * separately, called `settledOption`. - * - * For example, consider the case: - * (Step_1) brush zoom the grid by `toolbox.dataZoom`, - * where the original input `option.startValue`, `option.endValue` are earsed by - * calculated value. - * (Step)2) click the legend to hide and show a series, - * where the new range is calculated by the earsed `startValue` and `endValue`, - * which brings incorrect result. + /** + * Suppose a "main process" start at the point that model prepared (that is, + * model initialized or merged or method called in `action`). + * We should keep the `main process` idempotent, that is, given a set of values + * on `option`, we get the same result. + * + * But sometimes, values on `option` will be updated for providing users + * a "final calculated value" (`dataZoomProcessor` will do that). Those value + * should not be the base/input of the `main process`. + * + * So in that case we should save and keep the input of the `main process` + * separately, called `settledOption`. + * + * For example, consider the case: + * (Step_1) brush zoom the grid by `toolbox.dataZoom`, + * where the original input `option.startValue`, `option.endValue` are earsed by + * calculated value. + * (Step)2) click the legend to hide and show a series, + * where the new range is calculated by the earsed `startValue` and `endValue`, + * which brings incorrect result. */ this.settledOption = inputRawOption; @@ -51557,8 +51567,8 @@ }, this); return firstAxisModel; }; - /** - * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel + /** + * @param {Function} callback param: axisModel, dimNames, axisIndex, dataZoomModel, ecModel */ @@ -51569,8 +51579,8 @@ }); }); }; - /** - * @return If not found, return null/undefined. + /** + * @return If not found, return null/undefined. */ @@ -51581,8 +51591,8 @@ return axisModel.__dzAxisProxy; } }; - /** - * @return If not found, return null/undefined. + /** + * @return If not found, return null/undefined. */ @@ -51597,8 +51607,8 @@ return this.ecModel.getComponent(getAxisMainType(axisDim), axisIndex); } }; - /** - * If not specified, set to undefined. + /** + * If not specified, set to undefined. */ @@ -51638,10 +51648,10 @@ return axisProxy.getDataPercentWindow(); } }; - /** - * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0); - * - * @return [startValue, endValue] value can only be '-' or finite number. + /** + * For example, chart.getModel().getComponent('dataZoom').getValueRange('y', 0); + * + * @return [startValue, endValue] value can only be '-' or finite number. */ @@ -51656,9 +51666,9 @@ return this.getAxisProxy(axisDim, axisIndex).getDataValueWindow(); } }; - /** - * @param axisModel If axisModel given, find axisProxy - * corresponding to the axisModel + /** + * @param axisModel If axisModel given, find axisProxy + * corresponding to the axisModel */ @@ -51720,10 +51730,10 @@ }; return DataZoomModel; }(ComponentModel); - /** - * Retrieve those raw params from option, which will be cached separately, - * because they will be overwritten by normalized/calculated values in the main - * process. + /** + * Retrieve those raw params from option, which will be cached separately, + * because they will be overwritten by normalized/calculated values in the main + * process. */ @@ -51813,44 +51823,44 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ - /** - * Calculate slider move result. - * Usage: - * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as - * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`. - * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`. - * - * @param delta Move length. - * @param handleEnds handleEnds[0] can be bigger then handleEnds[1]. - * handleEnds will be modified in this method. - * @param extent handleEnds is restricted by extent. - * extent[0] should less or equals than extent[1]. - * @param handleIndex Can be 'all', means that both move the two handleEnds. - * @param minSpan The range of dataZoom can not be smaller than that. - * If not set, handle0 and cross handle1. If set as a non-negative - * number (including `0`), handles will push each other when reaching - * the minSpan. - * @param maxSpan The range of dataZoom can not be larger than that. - * @return The input handleEnds. + /** + * Calculate slider move result. + * Usage: + * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as + * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`. + * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`. + * + * @param delta Move length. + * @param handleEnds handleEnds[0] can be bigger then handleEnds[1]. + * handleEnds will be modified in this method. + * @param extent handleEnds is restricted by extent. + * extent[0] should less or equals than extent[1]. + * @param handleIndex Can be 'all', means that both move the two handleEnds. + * @param minSpan The range of dataZoom can not be smaller than that. + * If not set, handle0 and cross handle1. If set as a non-negative + * number (including `0`), handles will push each other when reaching + * the minSpan. + * @param maxSpan The range of dataZoom can not be larger than that. + * @return The input handleEnds. */ function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) { delta = delta || 0; @@ -51915,12 +51925,12 @@ var each$4 = each; var asc$1 = asc; - /** - * Operate single axis. - * One axis can only operated by one axis operator. - * Different dataZoomModels may be defined to operate the same axis. - * (i.e. 'inside' data zoom and 'slider' data zoom components) - * So dataZoomModels share one axisProxy in that case. + /** + * Operate single axis. + * One axis can only operated by one axis operator. + * Different dataZoomModels may be defined to operate the same axis. + * (i.e. 'inside' data zoom and 'slider' data zoom components) + * So dataZoomModels share one axisProxy in that case. */ var AxisProxy = @@ -51936,24 +51946,24 @@ // */ // this.hasSeriesStacked; } - /** - * Whether the axisProxy is hosted by dataZoomModel. + /** + * Whether the axisProxy is hosted by dataZoomModel. */ AxisProxy.prototype.hostedBy = function (dataZoomModel) { return this._dataZoomModel === dataZoomModel; }; - /** - * @return Value can only be NaN or finite value. + /** + * @return Value can only be NaN or finite value. */ AxisProxy.prototype.getDataValueWindow = function () { return this._valueWindow.slice(); }; - /** - * @return {Array.} + /** + * @return {Array.} */ @@ -51983,8 +51993,8 @@ AxisProxy.prototype.getMinMaxSpan = function () { return clone(this._minMaxSpan); }; - /** - * Only calculate by given range and this._dataExtent, do not change anything. + /** + * Only calculate by given range and this._dataExtent, do not change anything. */ @@ -52059,10 +52069,10 @@ percentWindow: percentWindow }; }; - /** - * Notice: reset should not be called before series.restoreData() is called, - * so it is recommended to be called in "process stage" but not "model init - * stage". + /** + * Notice: reset should not be called before series.restoreData() is called, + * so it is recommended to be called in "process stage" but not "model init + * stage". */ @@ -52479,12 +52489,12 @@ return ToolboxModel; }(ComponentModel); - /** - * Layout list like component. - * It will box layout each items in group of component and then position the whole group in the viewport - * @param {module:zrender/group/Group} group - * @param {module:echarts/model/Component} componentModel - * @param {module:echarts/ExtensionAPI} + /** + * Layout list like component. + * It will box layout each items in group of component and then position the whole group in the viewport + * @param {module:zrender/group/Group} group + * @param {module:echarts/model/Component} componentModel + * @param {module:echarts/ExtensionAPI} */ function layout$2(group, componentModel, api) { @@ -53080,10 +53090,10 @@ var BLOCK_SPLITER = new Array(60).join('-'); var ITEM_SPLITER = '\t'; - /** - * Group series into two types - * 1. on category axis, like line, bar - * 2. others, like scatter, pie + /** + * Group series into two types + * 1. on category axis, like line, bar + * 2. others, like scatter, pie */ function groupSeries(ecModel) { @@ -53126,9 +53136,9 @@ meta: meta }; } - /** - * Assemble content of series on cateogory axis - * @inner + /** + * Assemble content of series on cateogory axis + * @inner */ @@ -53166,8 +53176,8 @@ }); return tables.join('\n\n' + BLOCK_SPLITER + '\n\n'); } - /** - * Assemble content of other series + /** + * Assemble content of other series */ @@ -53204,8 +53214,8 @@ function trim$1(str) { return str.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } - /** - * If a block is tsv format + /** + * If a block is tsv format */ @@ -53219,9 +53229,9 @@ } var itemSplitRegex = new RegExp('[' + ITEM_SPLITER + ']+', 'g'); - /** - * @param {string} tsv - * @return {Object} + /** + * @param {string} tsv + * @return {Object} */ function parseTSVContents(tsv) { @@ -53478,8 +53488,8 @@ return DataView; }(ToolboxFeature); - /** - * @inner + /** + * @inner */ @@ -53540,9 +53550,9 @@ var each$5 = each; var inner$b = makeInner(); - /** - * @param ecModel - * @param newSnapshot key is dataZoomId + /** + * @param ecModel + * @param newSnapshot key is dataZoomId */ function push(ecModel, newSnapshot) { @@ -53604,9 +53614,9 @@ function count(ecModel) { return getStoreSnapshots(ecModel).length; } - /** - * History length of each dataZoom may be different. - * this._history[0] is used to store origin range. + /** + * History length of each dataZoom may be different. + * this._history[0] is used to store origin range. */ function getStoreSnapshots(ecModel) { @@ -53678,12 +53688,12 @@ function getStore(zr) { return zr[ATTR] || (zr[ATTR] = {}); } - /** - * payload: { - * type: 'takeGlobalCursor', - * key: 'dataZoomSelect', or 'brush', or ..., - * If no userKey, release global cursor. - * } + /** + * payload: { + * type: 'takeGlobalCursor', + * key: 'dataZoomSelect', or 'brush', or ..., + * If no userKey, release global cursor. + * } */ // TODO: SELF REGISTERED. @@ -53729,14 +53739,14 @@ removeOnClick: false }; var baseUID = 0; - /** - * params: - * areas: Array., coord relates to container group, - * If no container specified, to global. - * opt { - * isEnd: boolean, - * removeOnClick: boolean - * } + /** + * params: + * areas: Array., coord relates to container group, + * If no container specified, to global. + * opt { + * isEnd: boolean, + * removeOnClick: boolean + * } */ var BrushController = @@ -53746,14 +53756,14 @@ function BrushController(zr) { var _this = _super.call(this) || this; - /** - * @internal + /** + * @internal */ _this._track = []; - /** - * @internal + /** + * @internal */ _this._covers = []; @@ -53771,8 +53781,8 @@ }, _this); return _this; } - /** - * If set to `false`, select disabled. + /** + * If set to `false`, select disabled. */ @@ -53808,8 +53818,8 @@ }); this._brushType = this._brushOption = null; }; - /** - * @param panelOpts If not pass, it is global brush. + /** + * @param panelOpts If not pass, it is global brush. */ @@ -53851,10 +53861,10 @@ // each(this._covers, cb, context); // } - /** - * Update covers. - * @param coverConfigList - * If coverConfigList is null/undefined, all covers removed. + /** + * Update covers. + * @param coverConfigList + * If coverConfigList is null/undefined, all covers removed. */ @@ -54380,8 +54390,8 @@ var zr = controller._zr; return x < 0 || x > zr.getWidth() || y < 0 || y > zr.getHeight(); } - /** - * key: brushType + /** + * key: brushType */ @@ -54511,32 +54521,32 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ var IRRELEVANT_EXCLUDES = { 'axisPointer': 1, 'tooltip': 1, 'brush': 1 }; - /** - * Avoid that: mouse click on a elements that is over geo or graph, - * but roam is triggered. + /** + * Avoid that: mouse click on a elements that is over geo or graph, + * but roam is triggered. */ function onIrrelevantElement(e, api, targetCoordSysModel) { @@ -54579,10 +54589,10 @@ var BrushTargetManager = /** @class */ function () { - /** - * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid - * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]} - * @param opt.include include coordinate system types. + /** + * @param finder contains Index/Id/Name of xAxis/yAxis/geo/grid + * Each can be {number|Array.}. like: {xAxisIndex: [3, 4]} + * @param opt.include include coordinate system types. */ function BrushTargetManager(finder, ecModel, opt) { var _this = this; @@ -54629,10 +54639,10 @@ } }, this); }; - /** - * the `areas` is `BrushModel.areas`. - * Called in layout stage. - * convert `area.coordRange` to global range and set panelId to `area.range`. + /** + * the `areas` is `BrushModel.areas`. + * Called in layout stage. + * convert `area.coordRange` to global range and set panelId to `area.range`. */ @@ -54681,10 +54691,10 @@ var targetInfo = this.findTargetInfo(area, ecModel); return targetInfo === true || targetInfo && indexOf(targetInfo.coordSyses, seriesModel.coordinateSystem) >= 0; }; - /** - * If return Object, a coord found. - * If return true, global found. - * Otherwise nothing found. + /** + * If return Object, a coord found. + * If return true, global found. + * Otherwise nothing found. */ @@ -55338,10 +55348,10 @@ var translate = "translate" + (is3d ? '3d' : '') + "(" + x0 + "," + y0 + (is3d ? ',0' : '') + ")"; return toString ? 'top:0;left:0;' + CSS_TRANSFORM_VENDOR + ':' + translate + ';' : [['top', 0], ['left', 0], [TRANSFORM_VENDOR, translate]]; } - /** - * @param {Object} textStyle - * @return {string} - * @inner + /** + * @param {Object} textStyle + * @return {string} + * @inner */ @@ -55503,8 +55513,8 @@ } }; } - /** - * Update when tooltip is rendered + /** + * Update when tooltip is rendered */ @@ -55616,9 +55626,9 @@ }); } }; - /** - * when `alwaysShowContent` is true, - * move the tooltip after chart resized + /** + * when `alwaysShowContent` is true, + * move the tooltip after chart resized */ @@ -55678,8 +55688,8 @@ this._zr = api.getZr(); makeStyleCoord$1(this._styleCoord, this._zr, api.getWidth() / 2, api.getHeight() / 2); } - /** - * Update when tooltip is rendered + /** + * Update when tooltip is rendered */ @@ -55698,8 +55708,8 @@ this.el.show(); this._show = true; }; - /** - * Set tooltip content + /** + * Set tooltip content */ @@ -55790,9 +55800,9 @@ el.markRedraw(); } }; - /** - * when `alwaysShowContent` is true, - * move the tooltip after chart resized + /** + * when `alwaysShowContent` is true, + * move the tooltip after chart resized */ @@ -55962,21 +55972,21 @@ }); } }; - /** - * Show tip manually by - * dispatchAction({ - * type: 'showTip', - * x: 10, - * y: 10 - * }); - * Or - * dispatchAction({ - * type: 'showTip', - * seriesIndex: 0, - * dataIndex or dataIndexInside or name - * }); - * - * TODO Batch + /** + * Show tip manually by + * dispatchAction({ + * type: 'showTip', + * x: 10, + * y: 10 + * }); + * Or + * dispatchAction({ + * type: 'showTip', + * seriesIndex: 0, + * dataIndex or dataIndexInside or name + * }); + * + * TODO Batch */ @@ -56564,8 +56574,8 @@ TooltipView.type = 'tooltip'; return TooltipView; }(ComponentView); - /** - * From top to bottom. (the last one should be globalTooltipModel); + /** + * From top to bottom. (the last one should be globalTooltipModel); */ @@ -56693,16 +56703,16 @@ function isCenterAlign(align) { return align === 'center' || align === 'middle'; } - /** - * Find target component by payload like: - * ```js - * { legendId: 'some_id', name: 'xxx' } - * { toolboxIndex: 1, name: 'xxx' } - * { geoName: 'some_name', name: 'xxx' } - * ``` - * PENDING: at present only - * - * If not found, return null/undefined. + /** + * Find target component by payload like: + * ```js + * { legendId: 'some_id', name: 'xxx' } + * { toolboxIndex: 1, name: 'xxx' } + * { geoName: 'some_name', name: 'xxx' } + * ``` + * PENDING: at present only + * + * If not found, return null/undefined. */ @@ -56749,13 +56759,13 @@ use(install$7); registers.registerComponentModel(TooltipModel); registers.registerComponentView(TooltipView); - /** - * @action - * @property {string} type - * @property {number} seriesIndex - * @property {number} dataIndex - * @property {number} [x] - * @property {number} [y] + /** + * @action + * @property {string} type + * @property {number} seriesIndex + * @property {number} dataIndex + * @property {number} [x] + * @property {number} [y] */ registers.registerAction({ @@ -56999,15 +57009,15 @@ var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = MarkerModel.type; - /** - * If marker model is created by self from series + /** + * If marker model is created by self from series */ _this.createdBySelf = false; return _this; } - /** - * @overrite + /** + * @overrite */ @@ -57031,8 +57041,8 @@ var hostSeries = this.__hostSeries; return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled(); }; - /** - * @overrite + /** + * @overrite */ @@ -57205,10 +57215,10 @@ average: curry(markerTypeCalculatorWithExtent, 'average'), median: curry(markerTypeCalculatorWithExtent, 'median') }; - /** - * Transform markPoint data item to format used in List by do the following - * 1. Calculate statistic like `max`, `min`, `average` - * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array + /** + * Transform markPoint data item to format used in List by do the following + * 1. Calculate statistic like `max`, `min`, `average` + * 2. Convert `item.xAxis`, `item.yAxis` to `item.coord` array */ function dataTransform(seriesModel, item) { @@ -57281,9 +57291,9 @@ var dimItem = seriesModel.getData().getDimensionInfo(dataDim); return dimItem && dimItem.coordDim; } - /** - * Filter data which is out of coordinateSystem range - * [dataFilter description] + /** + * Filter data which is out of coordinateSystem range + * [dataFilter description] */ @@ -57710,8 +57720,8 @@ var symbolOffsetArr = normalizeSymbolOffset(symbolOffset || 0, symbolSizeArr); return symbolType + symbolSizeArr + symbolOffsetArr + (symbolRotate || '') + (symbolKeepAspect || ''); } - /** - * @inner + /** + * @inner */ @@ -59144,9 +59154,9 @@ potentialData.push(seriesModel.name); } }); - /** - * @type {Array.} - * @private + /** + * @type {Array.} + * @private */ this._availableNames = availableNames; // If legend.data is not specified in option, use availableNames as data, @@ -59170,9 +59180,9 @@ legendNameMap.set(dataItem.name, true); return new Model(dataItem, this, this.ecModel); }, this); - /** - * @type {Array.} - * @private + /** + * @type {Array.} + * @private */ this._data = filter(legendData, function (item) { @@ -59352,24 +59362,24 @@ this.group.add(this._selectorGroup = new Group$1()); this._isFirstRender = true; }; - /** - * @protected + /** + * @protected */ LegendView.prototype.getContentGroup = function () { return this._contentGroup; }; - /** - * @protected + /** + * @protected */ LegendView.prototype.getSelectorGroup = function () { return this._selectorGroup; }; - /** - * @override + /** + * @override */ @@ -59457,9 +59467,9 @@ var data = seriesModel.getData(); var lineVisualStyle = data.getVisual('legendLineStyle') || {}; var legendIcon = data.getVisual('legendIcon'); - /** - * `data.getVisual('style')` may be the color from the register - * in series. For example, for line series, + /** + * `data.getVisual('style')` may be the color from the register + * in series. For example, for line series, */ var style = data.getVisual('style'); @@ -59689,8 +59699,8 @@ return this.group.getBoundingRect(); } }; - /** - * @protected + /** + * @protected */ @@ -59704,9 +59714,9 @@ }(ComponentView); function getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) { - /** - * Use series style if is inherit; - * elsewise, use legend style + /** + * Use series style if is inherit; + * elsewise, use legend style */ function handleCommonProps(style, visualStyle) { // If lineStyle.width is 'auto', it is set to be 2 if series has border @@ -59727,24 +59737,24 @@ itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api); if (itemStyle.fill === 'inherit') { - /** - * Series with visualDrawType as 'stroke' should have - * series stroke as legend fill + /** + * Series with visualDrawType as 'stroke' should have + * series stroke as legend fill */ itemStyle.fill = itemVisualStyle[drawType]; } if (itemStyle.stroke === 'inherit') { - /** - * icon type with "emptyXXX" should use fill color - * in visual style + /** + * icon type with "emptyXXX" should use fill color + * in visual style */ itemStyle.stroke = itemVisualStyle[iconBrushType]; } if (itemStyle.opacity === 'inherit') { - /** - * Use lineStyle.opacity if drawType is stroke + /** + * Use lineStyle.opacity if drawType is stroke */ itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity; } @@ -59761,10 +59771,10 @@ if (!isSelected) { var borderWidth = legendItemModel.get('inactiveBorderWidth'); - /** - * Since stroke is set to be inactiveBorderColor, it may occur that - * there is no border in series but border in legend, so we need to - * use border only when series has border if is set to be auto + /** + * Since stroke is set to be inactiveBorderColor, it may occur that + * there is no border in series but border in legend, so we need to + * use border only when series has border if is set to be auto */ var visualHasBorder = itemStyle[iconBrushType]; @@ -59870,23 +59880,23 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function legendFilter(ecModel) { var legendModels = ecModel.findComponents({ @@ -59955,29 +59965,29 @@ } function installLegendAction(registers) { - /** - * @event legendToggleSelect - * @type {Object} - * @property {string} type 'legendToggleSelect' - * @property {string} [from] - * @property {string} name Series name or data item name + /** + * @event legendToggleSelect + * @type {Object} + * @property {string} type 'legendToggleSelect' + * @property {string} [from] + * @property {string} name Series name or data item name */ registers.registerAction('legendToggleSelect', 'legendselectchanged', curry(legendSelectActionHandler, 'toggleSelected')); registers.registerAction('legendAllSelect', 'legendselectall', curry(legendSelectActionHandler, 'allSelect')); registers.registerAction('legendInverseSelect', 'legendinverseselect', curry(legendSelectActionHandler, 'inverseSelect')); - /** - * @event legendSelect - * @type {Object} - * @property {string} type 'legendSelect' - * @property {string} name Series name or data item name + /** + * @event legendSelect + * @type {Object} + * @property {string} type 'legendSelect' + * @property {string} name Series name or data item name */ registers.registerAction('legendSelect', 'legendselected', curry(legendSelectActionHandler, 'select')); - /** - * @event legendUnSelect - * @type {Object} - * @property {string} type 'legendUnSelect' - * @property {string} name Series name or data item name + /** + * @event legendUnSelect + * @type {Object} + * @property {string} type 'legendUnSelect' + * @property {string} name Series name or data item name */ registers.registerAction('legendUnSelect', 'legendunselected', curry(legendSelectActionHandler, 'unSelect')); @@ -60004,8 +60014,8 @@ _this.type = ScrollableLegendModel.type; return _this; } - /** - * @param {number} scrollDataIndex + /** + * @param {number} scrollDataIndex */ @@ -60020,8 +60030,8 @@ mergeAndNormalizeLayoutParams(this, option, inputPositionParams); }; - /** - * @override + /** + * @override */ @@ -60090,8 +60100,8 @@ this.group.add(this._controllerGroup = new Group$2()); }; - /** - * @override + /** + * @override */ @@ -60104,8 +60114,8 @@ this._containerGroup.__rectSize = null; }; - /** - * @override + /** + * @override */ @@ -60151,8 +60161,8 @@ controllerGroup.add(icon); } }; - /** - * @override + /** + * @override */ @@ -60319,13 +60329,13 @@ total: total })); }; - /** - * contentPosition: Array., null when data item not found. - * pageIndex: number, null when data item not found. - * pageCount: number, always be a number, can be 0. - * pagePrevDataIndex: number, null when no previous page. - * pageNextDataIndex: number, null when no next page. - * } + /** + * contentPosition: Array., null when data item not found. + * pageIndex: number, null when data item not found. + * pageCount: number, always be a number, can be 0. + * pagePrevDataIndex: number, null when no previous page. + * pageNextDataIndex: number, null when no next page. + * } */ @@ -60487,30 +60497,30 @@ * AUTO-GENERATED FILE. DO NOT MODIFY. */ - /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ function installScrollableLegendAction(registers) { - /** - * @event legendScroll - * @type {Object} - * @property {string} type 'legendScroll' - * @property {string} scrollDataIndex + /** + * @event legendScroll + * @type {Object} + * @property {string} type 'legendScroll' + * @property {string} scrollDataIndex */ registers.registerAction('legendScroll', 'legendscroll', function (payload, ecModel) { var scrollDataIndex = payload.scrollDataIndex; @@ -60575,10 +60585,10 @@ var mouseupHandler = bind(_this._mouseupHandler, _this); var mousewheelHandler = bind(_this._mousewheelHandler, _this); var pinchHandler = bind(_this._pinchHandler, _this); - /** - * Notice: only enable needed types. For example, if 'zoom' - * is not needed, 'zoom' should not be enabled, otherwise - * default mousewheel behaviour (scroll page) will be disabled. + /** + * Notice: only enable needed types. For example, if 'zoom' + * is not needed, 'zoom' should not be enabled, otherwise + * default mousewheel behaviour (scroll page) will be disabled. */ _this.enable = function (controlType, opt) { @@ -60864,8 +60874,8 @@ }); return coordSysRecord; } - /** - * This action will be throttled. + /** + * This action will be throttled. */ @@ -60885,8 +60895,8 @@ function containsPoint(coordSysModel, e, x, y) { return coordSysModel.coordinateSystem.containPoint([x, y]); } - /** - * Merge roamController settings when multiple dataZooms share one roamController. + /** + * Merge roamController settings when multiple dataZooms share one roamController. */ @@ -61922,8 +61932,8 @@ : value.toFixed(Math.min(labelPrecision, 20)); return isFunction(labelFormatter) ? labelFormatter(value, valueStr) : isString(labelFormatter) ? labelFormatter.replace('{value}', valueStr) : valueStr; }; - /** - * @param showOrHide true: show, false: hide + /** + * @param showOrHide true: show, false: hide */ @@ -62064,8 +62074,8 @@ height: size[1] }); }; - /** - * This action will be throttled. + /** + * This action will be throttled. */