1 line
11 KiB
JSON
1 line
11 KiB
JSON
{"ast":null,"code":"/*\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';\nimport * as modelUtil from '../../util/model.js';\n/**\r\n * @param finder contains {seriesIndex, dataIndex, dataIndexInside}\r\n * @param ecModel\r\n * @return {point: [x, y], el: ...} point Will not be null.\r\n */\n\nexport default function findPointFromSeries(finder, ecModel) {\n var point = [];\n var seriesIndex = finder.seriesIndex;\n var seriesModel;\n\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\n return {\n point: []\n };\n }\n\n var data = seriesModel.getData();\n var dataIndex = modelUtil.queryDataIndex(data, finder);\n\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\n return {\n point: []\n };\n }\n\n var el = data.getItemGraphicEl(dataIndex);\n var coordSys = seriesModel.coordinateSystem;\n\n if (seriesModel.getTooltipPosition) {\n point = seriesModel.getTooltipPosition(dataIndex) || [];\n } else if (coordSys && coordSys.dataToPoint) {\n if (finder.isStacked) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueAxisDim = valueAxis.dim;\n var baseAxisDim = baseAxis.dim;\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var baseDim = data.mapDimension(baseAxisDim);\n var stackedData = [];\n stackedData[baseDataOffset] = data.get(baseDim, dataIndex);\n stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex);\n point = coordSys.dataToPoint(stackedData) || [];\n } else {\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }), dataIndex)) || [];\n }\n } else if (el) {\n // Use graphic bounding rect\n var rect = el.getBoundingRect().clone();\n rect.applyTransform(el.transform);\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\n }\n\n return {\n point: point,\n el: el\n };\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/axisPointer/findPointFromSeries.js"],"names":["zrUtil","modelUtil","findPointFromSeries","finder","ecModel","point","seriesIndex","seriesModel","getSeriesByIndex","data","getData","dataIndex","queryDataIndex","isArray","el","getItemGraphicEl","coordSys","coordinateSystem","getTooltipPosition","dataToPoint","isStacked","baseAxis","getBaseAxis","valueAxis","getOtherAxis","valueAxisDim","dim","baseAxisDim","baseDataOffset","baseDim","mapDimension","stackedData","get","getCalculationInfo","getValues","map","dimensions","rect","getBoundingRect","clone","applyTransform","transform","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B,EAAE,CAAC2B,SAAvB;AACApC,IAAAA,KAAK,GAAG,CAACgC,IAAI,CAACK,CAAL,GAASL,IAAI,CAACM,KAAL,GAAa,CAAvB,EAA0BN,IAAI,CAACO,CAAL,GAASP,IAAI,CAACQ,MAAL,GAAc,CAAjD,CAAR;AACD;;AAED,SAAO;AACLxC,IAAAA,KAAK,EAAEA,KADF;AAELS,IAAAA,EAAE,EAAEA;AAFC,GAAP;AAID","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\nimport * as modelUtil from '../../util/model.js';\r\n/**\r\n * @param finder contains {seriesIndex, dataIndex, dataIndexInside}\r\n * @param ecModel\r\n * @return {point: [x, y], el: ...} point Will not be null.\r\n */\r\n\r\nexport default function findPointFromSeries(finder, ecModel) {\r\n var point = [];\r\n var seriesIndex = finder.seriesIndex;\r\n var seriesModel;\r\n\r\n if (seriesIndex == null || !(seriesModel = ecModel.getSeriesByIndex(seriesIndex))) {\r\n return {\r\n point: []\r\n };\r\n }\r\n\r\n var data = seriesModel.getData();\r\n var dataIndex = modelUtil.queryDataIndex(data, finder);\r\n\r\n if (dataIndex == null || dataIndex < 0 || zrUtil.isArray(dataIndex)) {\r\n return {\r\n point: []\r\n };\r\n }\r\n\r\n var el = data.getItemGraphicEl(dataIndex);\r\n var coordSys = seriesModel.coordinateSystem;\r\n\r\n if (seriesModel.getTooltipPosition) {\r\n point = seriesModel.getTooltipPosition(dataIndex) || [];\r\n } else if (coordSys && coordSys.dataToPoint) {\r\n if (finder.isStacked) {\r\n var baseAxis = coordSys.getBaseAxis();\r\n var valueAxis = coordSys.getOtherAxis(baseAxis);\r\n var valueAxisDim = valueAxis.dim;\r\n var baseAxisDim = baseAxis.dim;\r\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\r\n var baseDim = data.mapDimension(baseAxisDim);\r\n var stackedData = [];\r\n stackedData[baseDataOffset] = data.get(baseDim, dataIndex);\r\n stackedData[1 - baseDataOffset] = data.get(data.getCalculationInfo('stackResultDimension'), dataIndex);\r\n point = coordSys.dataToPoint(stackedData) || [];\r\n } else {\r\n point = coordSys.dataToPoint(data.getValues(zrUtil.map(coordSys.dimensions, function (dim) {\r\n return data.mapDimension(dim);\r\n }), dataIndex)) || [];\r\n }\r\n } else if (el) {\r\n // Use graphic bounding rect\r\n var rect = el.getBoundingRect().clone();\r\n rect.applyTransform(el.transform);\r\n point = [rect.x + rect.width / 2, rect.y + rect.height / 2];\r\n }\r\n\r\n return {\r\n point: point,\r\n el: el\r\n };\r\n}"]},"metadata":{},"sourceType":"module"} |