1 line
7.1 KiB
JSON
1 line
7.1 KiB
JSON
{"ast":null,"code":"/*\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 { isNumber } from 'zrender/lib/core/util.js';\nexport default function categoryFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (!legendModels || !legendModels.length) {\n return;\n }\n\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (isNumber(category)) {\n category = categoryNames[category];\n } // If in any legend component the status is not selected.\n\n\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n\n return true;\n });\n });\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src啊/ElectronicMallVue/node_modules/echarts/lib/chart/graph/categoryFilter.js"],"names":["isNumber","categoryFilter","ecModel","legendModels","findComponents","mainType","length","eachSeriesByType","graphSeries","categoriesData","getCategoriesData","graph","getGraph","data","categoryNames","mapArray","getName","filterSelf","idx","model","getItemModel","category","getShallow","i","isSelected"],"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,SAASA,QAAT,QAAyB,0BAAzB;AACA,eAAe,SAASC,cAAT,CAAwBC,OAAxB,EAAiC;AAC9C,MAAIC,YAAY,GAAGD,OAAO,CAACE,cAAR,CAAuB;AACxCC,IAAAA,QAAQ,EAAE;AAD8B,GAAvB,CAAnB;;AAIA,MAAI,CAACF,YAAD,IAAiB,CAACA,YAAY,CAACG,MAAnC,EAA2C;AACzC;AACD;;AAEDJ,EAAAA,OAAO,CAACK,gBAAR,CAAyB,OAAzB,EAAkC,UAAUC,WAAV,EAAuB;AACvD,QAAIC,cAAc,GAAGD,WAAW,CAACE,iBAAZ,EAArB;AACA,QAAIC,KAAK,GAAGH,WAAW,CAACI,QAAZ,EAAZ;AACA,QAAIC,IAAI,GAAGF,KAAK,CAACE,IAAjB;AACA,QAAIC,aAAa,GAAGL,cAAc,CAACM,QAAf,CAAwBN,cAAc,CAACO,OAAvC,CAApB;AACAH,IAAAA,IAAI,CAACI,UAAL,CAAgB,UAAUC,GAAV,EAAe;AAC7B,UAAIC,KAAK,GAAGN,IAAI,CAACO,YAAL,CAAkBF,GAAlB,CAAZ;AACA,UAAIG,QAAQ,GAAGF,KAAK,CAACG,UAAN,CAAiB,UAAjB,CAAf;;AAEA,UAAID,QAAQ,IAAI,IAAhB,EAAsB;AACpB,YAAIrB,QAAQ,CAACqB,QAAD,CAAZ,EAAwB;AACtBA,UAAAA,QAAQ,GAAGP,aAAa,CAACO,QAAD,CAAxB;AACD,SAHmB,CAGlB;;;AAGF,aAAK,IAAIE,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGpB,YAAY,CAACG,MAAjC,EAAyCiB,CAAC,EAA1C,EAA8C;AAC5C,cAAI,CAACpB,YAAY,CAACoB,CAAD,CAAZ,CAAgBC,UAAhB,CAA2BH,QAA3B,CAAL,EAA2C;AACzC,mBAAO,KAAP;AACD;AACF;AACF;;AAED,aAAO,IAAP;AACD,KAlBD;AAmBD,GAxBD;AAyBD","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 { isNumber } from 'zrender/lib/core/util.js';\nexport default function categoryFilter(ecModel) {\n var legendModels = ecModel.findComponents({\n mainType: 'legend'\n });\n\n if (!legendModels || !legendModels.length) {\n return;\n }\n\n ecModel.eachSeriesByType('graph', function (graphSeries) {\n var categoriesData = graphSeries.getCategoriesData();\n var graph = graphSeries.getGraph();\n var data = graph.data;\n var categoryNames = categoriesData.mapArray(categoriesData.getName);\n data.filterSelf(function (idx) {\n var model = data.getItemModel(idx);\n var category = model.getShallow('category');\n\n if (category != null) {\n if (isNumber(category)) {\n category = categoryNames[category];\n } // If in any legend component the status is not selected.\n\n\n for (var i = 0; i < legendModels.length; i++) {\n if (!legendModels[i].isSelected(category)) {\n return false;\n }\n }\n }\n\n return true;\n });\n });\n}"]},"metadata":{},"sourceType":"module"} |