You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by wa...@apache.org on 2022/11/02 06:54:33 UTC
[echarts] branch fix/hashmap updated: fix(data): fix deprecated access to `HashMap.data` due to ecomfe/zrender#966, change `hasOwnProperty` to `hasKey`.
This is an automated email from the ASF dual-hosted git repository.
wangzx pushed a commit to branch fix/hashmap
in repository https://gitbox.apache.org/repos/asf/echarts.git
The following commit(s) were added to refs/heads/fix/hashmap by this push:
new 68b2862ea fix(data): fix deprecated access to `HashMap.data` due to ecomfe/zrender#966, change `hasOwnProperty` to `hasKey`.
68b2862ea is described below
commit 68b2862eae41a1e44d649aca7745d7d95fa9cb48
Author: plainheart <yh...@all-my-life.cn>
AuthorDate: Wed Nov 2 14:50:58 2022 +0800
fix(data): fix deprecated access to `HashMap.data` due to ecomfe/zrender#966, change `hasOwnProperty` to `hasKey`.
---
src/data/helper/createDimensions.ts | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/data/helper/createDimensions.ts b/src/data/helper/createDimensions.ts
index cd44440aa..b5fefd03c 100644
--- a/src/data/helper/createDimensions.ts
+++ b/src/data/helper/createDimensions.ts
@@ -114,7 +114,7 @@ export default function prepareSeriesDataSchema(
const resultList: SeriesDimensionDefine[] = [];
const dimCount = getDimCount(source, sysDims, dimsDef, opt.dimensionsCount);
- // Try to ignore unsed dimensions if sharing a high dimension datastore
+ // Try to ignore unused dimensions if sharing a high dimension datastore
// 30 is an experience value.
const omitUnusedDimensions = opt.canOmitUnusedDimensions && shouldOmitUnusedDimensions(dimCount);
@@ -188,7 +188,7 @@ export default function prepareSeriesDataSchema(
});
});
- // Apply templetes and default order from `sysDims`.
+ // Apply templates and default order from `sysDims`.
let availDimIdx = 0;
each(sysDims, function (sysDimItemRaw) {
let coordDim: DimensionName;
@@ -368,7 +368,7 @@ function removeDuplication(result: SeriesDimensionDefine[]) {
// But
// (1) custom series should be considered. where other dims
// may be visited.
-// (2) sometimes user need to calcualte bubble size or use visualMap
+// (2) sometimes user need to calculate bubble size or use visualMap
// on other dimensions besides coordSys needed.
// So, dims that is not used by system, should be shared in data store?
function getDimCount(
@@ -399,10 +399,9 @@ function genCoordDimName(
map: HashMap<unknown, DimensionName>,
fromZero: boolean
) {
- const mapData = map.data;
- if (fromZero || mapData.hasOwnProperty(name)) {
+ if (fromZero || map.hasKey(name)) {
let i = 0;
- while (mapData.hasOwnProperty(name + i)) {
+ while (map.hasKey(name + i)) {
i++;
}
name += i;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org