1 line
12 KiB
JSON
1 line
12 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 { map } from 'zrender/lib/core/util.js';\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\nimport { createFloat32Array } from '../util/vendor.js';\nexport default function pointsLayout(seriesType, forceStoreInTypedArray) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function reset(seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var useTypedArray = forceStoreInTypedArray || pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0])) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1])) {\n dims[1] = stackResultDim;\n }\n\n var store = data.getStore();\n var dimIdx0 = data.getDimensionIndex(dims[0]);\n var dimIdx1 = data.getDimensionIndex(dims[1]);\n return dimLen && {\n progress: function progress(params, data) {\n var segCount = params.end - params.start;\n var points = useTypedArray && createFloat32Array(segCount * dimLen);\n var tmpIn = [];\n var tmpOut = [];\n\n for (var i = params.start, offset = 0; i < params.end; i++) {\n var point = void 0;\n\n if (dimLen === 1) {\n var x = store.get(dimIdx0, i); // NOTE: Make sure the second parameter is null to use default strategy.\n\n point = coordSys.dataToPoint(x, null, tmpOut);\n } else {\n tmpIn[0] = store.get(dimIdx0, i);\n tmpIn[1] = store.get(dimIdx1, i); // Let coordinate system to handle the NaN data.\n\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (useTypedArray) {\n points[offset++] = point[0];\n points[offset++] = point[1];\n } else {\n data.setItemLayout(i, point.slice());\n }\n }\n\n useTypedArray && data.setLayout('points', points);\n }\n };\n }\n };\n}\n;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/layout/points.js"],"names":["map","createRenderPlanner","isDimensionStacked","createFloat32Array","pointsLayout","seriesType","forceStoreInTypedArray","plan","reset","seriesModel","data","getData","coordSys","coordinateSystem","pipelineContext","useTypedArray","large","dims","dimensions","dim","mapDimension","slice","dimLen","length","stackResultDim","getCalculationInfo","store","getStore","dimIdx0","getDimensionIndex","dimIdx1","progress","params","segCount","end","start","points","tmpIn","tmpOut","i","offset","point","x","get","dataToP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CAAX;AACAF,cAAAA,KAAK,CAAC,CAAD,CAAL,GAAWX,KAAK,CAACiB,GAAN,CAAUb,OAAV,EAAmBS,CAAnB,CAAX,CAFK,CAE6B;;AAElCE,cAAAA,KAAK,GAAG7B,QAAQ,CAACgC,WAAT,CAAqBP,KAArB,EAA4B,IAA5B,EAAkCC,MAAlC,CAAR;AACD;;AAED,gBAAIvB,aAAJ,EAAmB;AACjBqB,cAAAA,MAAM,CAACI,MAAM,EAAP,CAAN,GAAmBC,KAAK,CAAC,CAAD,CAAxB;AACAL,cAAAA,MAAM,CAACI,MAAM,EAAP,CAAN,GAAmBC,KAAK,CAAC,CAAD,CAAxB;AACD,aAHD,MAGO;AACL/B,cAAAA,IAAI,CAACmC,aAAL,CAAmBN,CAAnB,EAAsBE,KAAK,CAACpB,KAAN,EAAtB;AACD;AACF;;AAEDN,UAAAA,aAAa,IAAIL,IAAI,CAACoC,SAAL,CAAe,QAAf,EAAyBV,MAAzB,CAAjB;AACD;AA9Bc,OAAjB;AAgCD;AA9DI,GAAP;AAgED;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 { map } from 'zrender/lib/core/util.js';\r\nimport createRenderPlanner from '../chart/helper/createRenderPlanner.js';\r\nimport { isDimensionStacked } from '../data/helper/dataStackHelper.js';\r\nimport { createFloat32Array } from '../util/vendor.js';\r\nexport default function pointsLayout(seriesType, forceStoreInTypedArray) {\r\n return {\r\n seriesType: seriesType,\r\n plan: createRenderPlanner(),\r\n reset: function (seriesModel) {\r\n var data = seriesModel.getData();\r\n var coordSys = seriesModel.coordinateSystem;\r\n var pipelineContext = seriesModel.pipelineContext;\r\n var useTypedArray = forceStoreInTypedArray || pipelineContext.large;\r\n\r\n if (!coordSys) {\r\n return;\r\n }\r\n\r\n var dims = map(coordSys.dimensions, function (dim) {\r\n return data.mapDimension(dim);\r\n }).slice(0, 2);\r\n var dimLen = dims.length;\r\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\r\n\r\n if (isDimensionStacked(data, dims[0])) {\r\n dims[0] = stackResultDim;\r\n }\r\n\r\n if (isDimensionStacked(data, dims[1])) {\r\n dims[1] = stackResultDim;\r\n }\r\n\r\n var store = data.getStore();\r\n var dimIdx0 = data.getDimensionIndex(dims[0]);\r\n var dimIdx1 = data.getDimensionIndex(dims[1]);\r\n return dimLen && {\r\n progress: function (params, data) {\r\n var segCount = params.end - params.start;\r\n var points = useTypedArray && createFloat32Array(segCount * dimLen);\r\n var tmpIn = [];\r\n var tmpOut = [];\r\n\r\n for (var i = params.start, offset = 0; i < params.end; i++) {\r\n var point = void 0;\r\n\r\n if (dimLen === 1) {\r\n var x = store.get(dimIdx0, i); // NOTE: Make sure the second parameter is null to use default strategy.\r\n\r\n point = coordSys.dataToPoint(x, null, tmpOut);\r\n } else {\r\n tmpIn[0] = store.get(dimIdx0, i);\r\n tmpIn[1] = store.get(dimIdx1, i); // Let coordinate system to handle the NaN data.\r\n\r\n point = coordSys.dataToPoint(tmpIn, null, tmpOut);\r\n }\r\n\r\n if (useTypedArray) {\r\n points[offset++] = point[0];\r\n points[offset++] = point[1];\r\n } else {\r\n data.setItemLayout(i, point.slice());\r\n }\r\n }\r\n\r\n useTypedArray && data.setLayout('points', points);\r\n }\r\n };\r\n }\r\n };\r\n}\r\n;"]},"metadata":{},"sourceType":"module"} |