qauMaWeb/node_modules/.cache/babel-loader/b668ae0aec7e7f1a5d243eacc53...

1 line
8.9 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.slice.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function radarLayout(ecModel) {\n ecModel.eachSeriesByType('radar', function (seriesModel) {\n var data = seriesModel.getData();\n var points = [];\n var coordSys = seriesModel.coordinateSystem;\n\n if (!coordSys) {\n return;\n }\n\n var axes = coordSys.getIndicatorAxes();\n zrUtil.each(axes, function (axis, axisIndex) {\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\n points[dataIndex] = points[dataIndex] || [];\n var point = coordSys.dataToPoint(val, axisIndex);\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\n });\n }); // Close polygon\n\n data.each(function (idx) {\n // TODO\n // Is it appropriate to connect to the next data when some data is missing?\n // Or, should trade it like `connectNull` in line chart?\n var firstPoint = zrUtil.find(points[idx], function (point) {\n return isValidPoint(point);\n }) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array\n\n points[idx].push(firstPoint.slice());\n data.setItemLayout(idx, points[idx]);\n });\n });\n}\n\nfunction isValidPoint(point) {\n return !isNaN(point[0]) && !isNaN(point[1]);\n}\n\nfunction getValueMissingPoint(coordSys) {\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\n // (probably cause problem when refreshing or animating)\n return [coordSys.cx, coordSys.cy];\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/chart/radar/radarLayout.js"],"names":["zrUtil","radarLayout","ecModel","eachSeriesByType","seriesModel","data","getData","points","coordSys","coordinateSystem","axes","getIndicatorAxes","each","axis","axisIndex","mapDimension","dim","val","dataIndex","point","dataToPoint","isValidPoint","getValueMissingPoint","idx","firstPoint","find","push","slice","setItemLayout","isNaN","cx","cy"],"mappings":";;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,MAAZ,MAAwB,0BAAxB;AACA,eAAe,SAASC,WAAT,CAAqBC,OAArB,EAA8B;AAC3CA,EAAAA,OAAO,CAACC,gBAAR,CAAyB,OAAzB,EAAkC,UAAUC,WAAV,EAAuB;AACvD,QAAIC,IAAI,GAAGD,WAAW,CAACE,O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AACD,KAVD;AAWD,GA7BD;AA8BD;;AAED,SAASF,YAAT,CAAsBF,KAAtB,EAA6B;AAC3B,SAAO,CAACU,KAAK,CAACV,KAAK,CAAC,CAAD,CAAN,CAAN,IAAoB,CAACU,KAAK,CAACV,KAAK,CAAC,CAAD,CAAN,CAAjC;AACD;;AAED,SAASG,oBAAT,CAA8Bd,QAA9B,EAAwC;AACtC;AACA;AACA,SAAO,CAACA,QAAQ,CAACsB,EAAV,EAActB,QAAQ,CAACuB,EAAvB,CAAP;AACD","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nexport default function radarLayout(ecModel) {\r\n ecModel.eachSeriesByType('radar', function (seriesModel) {\r\n var data = seriesModel.getData();\r\n var points = [];\r\n var coordSys = seriesModel.coordinateSystem;\r\n\r\n if (!coordSys) {\r\n return;\r\n }\r\n\r\n var axes = coordSys.getIndicatorAxes();\r\n zrUtil.each(axes, function (axis, axisIndex) {\r\n data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {\r\n points[dataIndex] = points[dataIndex] || [];\r\n var point = coordSys.dataToPoint(val, axisIndex);\r\n points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);\r\n });\r\n }); // Close polygon\r\n\r\n data.each(function (idx) {\r\n // TODO\r\n // Is it appropriate to connect to the next data when some data is missing?\r\n // Or, should trade it like `connectNull` in line chart?\r\n var firstPoint = zrUtil.find(points[idx], function (point) {\r\n return isValidPoint(point);\r\n }) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array\r\n\r\n points[idx].push(firstPoint.slice());\r\n data.setItemLayout(idx, points[idx]);\r\n });\r\n });\r\n}\r\n\r\nfunction isValidPoint(point) {\r\n return !isNaN(point[0]) && !isNaN(point[1]);\r\n}\r\n\r\nfunction getValueMissingPoint(coordSys) {\r\n // It is error-prone to input [NaN, NaN] into polygon, polygon.\r\n // (probably cause problem when refreshing or animating)\r\n return [coordSys.cx, coordSys.cy];\r\n}"]},"metadata":{},"sourceType":"module"}