qauMaWeb/node_modules/.cache/babel-loader/7e66c20da1518fb511afe518602...

1 line
10 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.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 { quantile, asc } from '../../util/number.js';\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\n/**\r\n * See:\r\n * <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>\r\n * <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>\r\n *\r\n * Helper method for preparing data.\r\n *\r\n * @param rawData like\r\n * [\r\n * [12,232,443], (raw data set for the first box)\r\n * [3843,5545,1232], (raw data set for the second box)\r\n * ...\r\n * ]\r\n * @param opt.boundIQR=1.5 Data less than min bound is outlier.\r\n * default 1.5, means Q1 - 1.5 * (Q3 - Q1).\r\n * If 'none'/0 passed, min bound will not be used.\r\n */\n\nexport default function prepareBoxplotData(rawData, opt) {\n opt = opt || {};\n var boxData = [];\n var outliers = [];\n var boundIQR = opt.boundIQR;\n var useExtreme = boundIQR === 'none' || boundIQR === 0;\n\n for (var i = 0; i < rawData.length; i++) {\n var ascList = asc(rawData[i].slice());\n var Q1 = quantile(ascList, 0.25);\n var Q2 = quantile(ascList, 0.5);\n var Q3 = quantile(ascList, 0.75);\n var min = ascList[0];\n var max = ascList[ascList.length - 1];\n var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);\n var low = useExtreme ? min : Math.max(min, Q1 - bound);\n var high = useExtreme ? max : Math.min(max, Q3 + bound);\n var itemNameFormatter = opt.itemNameFormatter;\n var itemName = isFunction(itemNameFormatter) ? itemNameFormatter({\n value: i\n }) : isString(itemNameFormatter) ? itemNameFormatter.replace('{value}', i + '') : i + '';\n boxData.push([itemName, low, Q1, Q2, Q3, high]);\n\n for (var j = 0; j < ascList.length; j++) {\n var dataItem = ascList[j];\n\n if (dataItem < low || dataItem > high) {\n var outlier = [itemName, dataItem];\n outliers.push(outlier);\n }\n }\n }\n\n return {\n boxData: boxData,\n outliers: outliers\n };\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/chart/boxplot/prepareBoxplotData.js"],"names":["quantile","asc","isFunction","isString","prepareBoxplotData","rawData","opt","boxData","outliers","boundIQR","useExtreme","i","length","ascList","slice","Q1","Q2","Q3","min","max","bound","low","Math","high","itemNameFormatter","itemName","value","replace","push","j","dataItem","outlier"],"mappings":";;;;AACA;AACA;AACA;AACA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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 { quantile, asc } from '../../util/number.js';\r\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\r\n/**\r\n * See:\r\n * <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>\r\n * <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>\r\n *\r\n * Helper method for preparing data.\r\n *\r\n * @param rawData like\r\n * [\r\n * [12,232,443], (raw data set for the first box)\r\n * [3843,5545,1232], (raw data set for the second box)\r\n * ...\r\n * ]\r\n * @param opt.boundIQR=1.5 Data less than min bound is outlier.\r\n * default 1.5, means Q1 - 1.5 * (Q3 - Q1).\r\n * If 'none'/0 passed, min bound will not be used.\r\n */\r\n\r\nexport default function prepareBoxplotData(rawData, opt) {\r\n opt = opt || {};\r\n var boxData = [];\r\n var outliers = [];\r\n var boundIQR = opt.boundIQR;\r\n var useExtreme = boundIQR === 'none' || boundIQR === 0;\r\n\r\n for (var i = 0; i < rawData.length; i++) {\r\n var ascList = asc(rawData[i].slice());\r\n var Q1 = quantile(ascList, 0.25);\r\n var Q2 = quantile(ascList, 0.5);\r\n var Q3 = quantile(ascList, 0.75);\r\n var min = ascList[0];\r\n var max = ascList[ascList.length - 1];\r\n var bound = (boundIQR == null ? 1.5 : boundIQR) * (Q3 - Q1);\r\n var low = useExtreme ? min : Math.max(min, Q1 - bound);\r\n var high = useExtreme ? max : Math.min(max, Q3 + bound);\r\n var itemNameFormatter = opt.itemNameFormatter;\r\n var itemName = isFunction(itemNameFormatter) ? itemNameFormatter({\r\n value: i\r\n }) : isString(itemNameFormatter) ? itemNameFormatter.replace('{value}', i + '') : i + '';\r\n boxData.push([itemName, low, Q1, Q2, Q3, high]);\r\n\r\n for (var j = 0; j < ascList.length; j++) {\r\n var dataItem = ascList[j];\r\n\r\n if (dataItem < low || dataItem > high) {\r\n var outlier = [itemName, dataItem];\r\n outliers.push(outlier);\r\n }\r\n }\r\n }\r\n\r\n return {\r\n boxData: boxData,\r\n outliers: outliers\r\n };\r\n}"]},"metadata":{},"sourceType":"module"}