qauMaWeb/node_modules/.cache/babel-loader/0079eea7a691d7ae63e5544aedd...

1 line
12 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.map.js\";\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js'; // FIXME 公用?\n\nfunction dataStatistics(datas, statisticType) {\n var dataNameMap = {};\n zrUtil.each(datas, function (data) {\n data.each(data.mapDimension('value'), function (value, idx) {\n // Add prefix to avoid conflict with Object.prototype.\n var mapKey = 'ec-' + data.getName(idx);\n dataNameMap[mapKey] = dataNameMap[mapKey] || [];\n\n if (!isNaN(value)) {\n dataNameMap[mapKey].push(value);\n }\n });\n });\n return datas[0].map(datas[0].mapDimension('value'), function (value, idx) {\n var mapKey = 'ec-' + datas[0].getName(idx);\n var sum = 0;\n var min = Infinity;\n var max = -Infinity;\n var len = dataNameMap[mapKey].length;\n\n for (var i = 0; i < len; i++) {\n min = Math.min(min, dataNameMap[mapKey][i]);\n max = Math.max(max, dataNameMap[mapKey][i]);\n sum += dataNameMap[mapKey][i];\n }\n\n var result;\n\n if (statisticType === 'min') {\n result = min;\n } else if (statisticType === 'max') {\n result = max;\n } else if (statisticType === 'average') {\n result = sum / len;\n } else {\n result = sum;\n }\n\n return len === 0 ? NaN : result;\n });\n}\n\nexport default function mapDataStatistic(ecModel) {\n var seriesGroups = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var hostGeoModel = seriesModel.getHostGeoModel();\n var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();\n (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel);\n });\n zrUtil.each(seriesGroups, function (seriesList, key) {\n var data = dataStatistics(zrUtil.map(seriesList, function (seriesModel) {\n return seriesModel.getData();\n }), seriesList[0].get('mapValueCalculation'));\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].originalData = seriesList[i].getData();\n } // FIXME Put where?\n\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].seriesGroup = seriesList;\n seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();\n seriesList[i].setData(data.cloneShallow());\n seriesList[i].mainSeries = seriesList[0];\n }\n });\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/chart/map/mapDataStatistic.js"],"names":["zrUtil","dataStatistics","datas","statisticType","dataNameMap","each","data","mapDimension","value","idx","mapKey","getName","isNaN","push","map","sum","min","Infinity","max","len","length","i","Math","result","NaN","mapDataStatistic","ecModel","seriesGroups","eachSeriesByType","seriesModel","hostGeoModel","getHostGeoModel","key","id","getMapType","seriesList","getData","get","originalData","seriesGroup","needsDrawMap","setData","cloneShallow","mainSeries"],"mappings":";;AACA;AAC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1C,EAA8CnB,IAA9C,CAAmDgB,WAAnD;AACD,GAJD;AAKA7B,EAAAA,MAAM,CAACK,IAAP,CAAYsB,YAAZ,EAA0B,UAAUQ,UAAV,EAAsBH,GAAtB,EAA2B;AACnD,QAAI1B,IAAI,GAAGL,cAAc,CAACD,MAAM,CAACc,GAAP,CAAWqB,UAAX,EAAuB,UAAUN,WAAV,EAAuB;AACtE,aAAOA,WAAW,CAACO,OAAZ,EAAP;AACD,KAFyB,CAAD,EAErBD,UAAU,CAAC,CAAD,CAAV,CAAcE,GAAd,CAAkB,qBAAlB,CAFqB,CAAzB;;AAIA,SAAK,IAAIhB,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGc,UAAU,CAACf,MAA/B,EAAuCC,CAAC,EAAxC,EAA4C;AAC1Cc,MAAAA,UAAU,CAACd,CAAD,CAAV,CAAciB,YAAd,GAA6BH,UAAU,CAACd,CAAD,CAAV,CAAce,OAAd,EAA7B;AACD,KAPkD,CAOjD;;;AAGF,SAAK,IAAIf,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGc,UAAU,CAACf,MAA/B,EAAuCC,CAAC,EAAxC,EAA4C;AAC1Cc,MAAAA,UAAU,CAACd,CAAD,CAAV,CAAckB,WAAd,GAA4BJ,UAA5B;AACAA,MAAAA,UAAU,CAACd,CAAD,CAAV,CAAcmB,YAAd,GAA6BnB,CAAC,KAAK,CAAN,IAAW,CAACc,UAAU,CAACd,CAAD,CAAV,CAAcU,eAAd,EAAzC;AACAI,MAAAA,UAAU,CAACd,CAAD,CAAV,CAAcoB,OAAd,CAAsBnC,IAAI,CAACoC,YAAL,EAAtB;AACAP,MAAAA,UAAU,CAACd,CAAD,CAAV,CAAcsB,UAAd,GAA2BR,UAAU,CAAC,CAAD,CAArC;AACD;AACF,GAhBD;AAiBD","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js'; // FIXME 公用?\n\nfunction dataStatistics(datas, statisticType) {\n var dataNameMap = {};\n zrUtil.each(datas, function (data) {\n data.each(data.mapDimension('value'), function (value, idx) {\n // Add prefix to avoid conflict with Object.prototype.\n var mapKey = 'ec-' + data.getName(idx);\n dataNameMap[mapKey] = dataNameMap[mapKey] || [];\n\n if (!isNaN(value)) {\n dataNameMap[mapKey].push(value);\n }\n });\n });\n return datas[0].map(datas[0].mapDimension('value'), function (value, idx) {\n var mapKey = 'ec-' + datas[0].getName(idx);\n var sum = 0;\n var min = Infinity;\n var max = -Infinity;\n var len = dataNameMap[mapKey].length;\n\n for (var i = 0; i < len; i++) {\n min = Math.min(min, dataNameMap[mapKey][i]);\n max = Math.max(max, dataNameMap[mapKey][i]);\n sum += dataNameMap[mapKey][i];\n }\n\n var result;\n\n if (statisticType === 'min') {\n result = min;\n } else if (statisticType === 'max') {\n result = max;\n } else if (statisticType === 'average') {\n result = sum / len;\n } else {\n result = sum;\n }\n\n return len === 0 ? NaN : result;\n });\n}\n\nexport default function mapDataStatistic(ecModel) {\n var seriesGroups = {};\n ecModel.eachSeriesByType('map', function (seriesModel) {\n var hostGeoModel = seriesModel.getHostGeoModel();\n var key = hostGeoModel ? 'o' + hostGeoModel.id : 'i' + seriesModel.getMapType();\n (seriesGroups[key] = seriesGroups[key] || []).push(seriesModel);\n });\n zrUtil.each(seriesGroups, function (seriesList, key) {\n var data = dataStatistics(zrUtil.map(seriesList, function (seriesModel) {\n return seriesModel.getData();\n }), seriesList[0].get('mapValueCalculation'));\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].originalData = seriesList[i].getData();\n } // FIXME Put where?\n\n\n for (var i = 0; i < seriesList.length; i++) {\n seriesList[i].seriesGroup = seriesList;\n seriesList[i].needsDrawMap = i === 0 && !seriesList[i].getHostGeoModel();\n seriesList[i].setData(data.cloneShallow());\n seriesList[i].mainSeries = seriesList[0];\n }\n });\n}"]},"metadata":{},"sourceType":"module"}