{"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 { bind } from 'zrender/lib/core/util.js';\n\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n var axis = this.getAxis();\n var val = dataItem instanceof Array ? dataItem[0] : dataItem;\n var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}\n\nexport default function singlePrepareCustom(coordSys) {\n var rect = coordSys.getRect();\n return {\n coordSys: {\n type: 'singleAxis',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function coord(val) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(val);\n },\n size: bind(dataToCoordSize, coordSys)\n }\n };\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src啊/ElectronicMallVue/node_modules/echarts/lib/coord/single/prepareCustom.js"],"names":["bind","dataToCoordSize","dataSize","dataItem","axis","getAxis","val","Array","halfSize","type","getBandWidth","Math","abs","dataToCoord","singlePrepareCustom","coordSys","rect","getRect","x","y","width","height","api","coord","dataToPoint","size"],"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,IAAT,QAAqB,0BAArB;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,QAAnC,EAA6C;AAC3C;AACA,MAAIC,IAAI,GAAG,KAAKC,OAAL,EAAX;AACA,MAAIC,GAAG,GAAGH,QAAQ,YAAYI,KAApB,GAA4BJ,QAAQ,CAAC,CAAD,CAApC,GAA0CA,QAApD;AACA,MAAIK,QAAQ,GAAG,CAACN,QAAQ,YAAYK,KAApB,GAA4BL,QAAQ,CAAC,CAAD,CAApC,GAA0CA,QAA3C,IAAuD,CAAtE;AACA,SAAOE,IAAI,CAACK,IAAL,KAAc,UAAd,GAA2BL,IAAI,CAACM,YAAL,EAA3B,GAAiDC,IAAI,CAACC,GAAL,CAASR,IAAI,CAACS,WAAL,CAAiBP,GAAG,GAAGE,QAAvB,IAAmCJ,IAAI,CAACS,WAAL,CAAiBP,GAAG,GAAGE,QAAvB,CAA5C,CAAxD;AACD;;AAED,eAAe,SAASM,mBAAT,CAA6BC,QAA7B,EAAuC;AACpD,MAAIC,IAAI,GAAGD,QAAQ,CAACE,OAAT,EAAX;AACA,SAAO;AACLF,IAAAA,QAAQ,EAAE;AACRN,MAAAA,IAAI,EAAE,YADE;AAERS,MAAAA,CAAC,EAAEF,IAAI,CAACE,CAFA;AAGRC,MAAAA,CAAC,EAAEH,IAAI,CAACG,CAHA;AAIRC,MAAAA,KAAK,EAAEJ,IAAI,CAACI,KAJJ;AAKRC,MAAAA,MAAM,EAAEL,IAAI,CAACK;AALL,KADL;AAQLC,IAAAA,GAAG,EAAE;AACHC,MAAAA,KAAK,EAAE,eAAUjB,GAAV,EAAe;AACpB;AACA,eAAOS,QAAQ,CAACS,WAAT,CAAqBlB,GAArB,CAAP;AACD,OAJE;AAKHmB,MAAAA,IAAI,EAAEzB,IAAI,CAACC,eAAD,EAAkBc,QAAlB;AALP;AARA,GAAP;AAgBD","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 { bind } from 'zrender/lib/core/util.js';\n\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n var axis = this.getAxis();\n var val = dataItem instanceof Array ? dataItem[0] : dataItem;\n var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}\n\nexport default function singlePrepareCustom(coordSys) {\n var rect = coordSys.getRect();\n return {\n coordSys: {\n type: 'singleAxis',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (val) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(val);\n },\n size: bind(dataToCoordSize, coordSys)\n }\n };\n}"]},"metadata":{},"sourceType":"module"}