qauMaWeb/node_modules/.cache/babel-loader/88538ae1dc1d2b8f3338062af1e...

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/*\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 { quantile, asc } from '../../util/number.js';\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\n/**\n * See:\n * <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>\n * <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>\n *\n * Helper method for preparing data.\n *\n * @param rawData like\n * [\n * [12,232,443], (raw data set for the first box)\n * [3843,5545,1232], (raw data set for the second box)\n * ...\n * ]\n * @param opt.boundIQR=1.5 Data less than min bound is outlier.\n * default 1.5, means Q1 - 1.5 * (Q3 - Q1).\n * If 'none'/0 passed, min bound will not be used.\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/ElectronicMallVue/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;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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EAAcH,EAAE,GAAGK,KAAnB,CAA7B;AACA,QAAIG,IAAI,GAAGb,UAAU,GAAGS,GAAH,GAASG,IAAI,CAACJ,GAAL,CAASC,GAAT,EAAcF,EAAE,GAAGG,KAAnB,CAA9B;AACA,QAAII,iBAAiB,GAAGlB,GAAG,CAACkB,iBAA5B;AACA,QAAIC,QAAQ,GAAGvB,UAAU,CAACsB,iBAAD,CAAV,GAAgCA,iBAAiB,CAAC;AAC/DE,MAAAA,KAAK,EAAEf;AADwD,KAAD,CAAjD,GAEVR,QAAQ,CAACqB,iBAAD,CAAR,GAA8BA,iBAAiB,CAACG,OAAlB,CAA0B,SAA1B,EAAqChB,CAAC,GAAG,EAAzC,CAA9B,GAA6EA,CAAC,GAAG,EAFtF;AAGAJ,IAAAA,OAAO,CAACqB,IAAR,CAAa,CAACH,QAAD,EAAWJ,GAAX,EAAgBN,EAAhB,EAAoBC,EAApB,EAAwBC,EAAxB,EAA4BM,IAA5B,CAAb;;AAEA,SAAK,IAAIM,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGhB,OAAO,CAACD,MAA5B,EAAoCiB,CAAC,EAArC,EAAyC;AACvC,UAAIC,QAAQ,GAAGjB,OAAO,CAACgB,CAAD,CAAtB;;AAEA,UAAIC,QAAQ,GAAGT,GAAX,IAAkBS,QAAQ,GAAGP,IAAjC,EAAuC;AACrC,YAAIQ,OAAO,GAAG,CAACN,QAAD,EAAWK,QAAX,CAAd;AACAtB,QAAAA,QAAQ,CAACoB,IAAT,CAAcG,OAAd;AACD;AACF;AACF;;AAED,SAAO;AACLxB,IAAAA,OAAO,EAAEA,OADJ;AAELC,IAAAA,QAAQ,EAAEA;AAFL,GAAP;AAID","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 { quantile, asc } from '../../util/number.js';\nimport { isFunction, isString } from 'zrender/lib/core/util.js';\n/**\n * See:\n * <https://en.wikipedia.org/wiki/Box_plot#cite_note-frigge_hoaglin_iglewicz-2>\n * <http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html>\n *\n * Helper method for preparing data.\n *\n * @param rawData like\n * [\n * [12,232,443], (raw data set for the first box)\n * [3843,5545,1232], (raw data set for the second box)\n * ...\n * ]\n * @param opt.boundIQR=1.5 Data less than min bound is outlier.\n * default 1.5, means Q1 - 1.5 * (Q3 - Q1).\n * If 'none'/0 passed, min bound will not be used.\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}"]},"metadata":{},"sourceType":"module"}