1 line
7.2 KiB
JSON
1 line
7.2 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 * as zrUtil from 'zrender/lib/core/util.js';\n\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['x', 'y'], function (dim, dimIdx) {\n var axis = this.getAxis(dim);\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n }, this);\n}\n\nexport default function cartesianPrepareCustom(coordSys) {\n var rect = coordSys.master.getRect();\n return {\n coordSys: {\n // The name exposed to user is always 'cartesian2d' but not 'grid'.\n type: 'cartesian2d',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function coord(data) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src啊/ElectronicMallVue/node_modules/echarts/lib/coord/cartesian/prepareCustom.js"],"names":["zrUtil","dataToCoordSize","dataSize","dataItem","map","dim","dimIdx","axis","getAxis","val","halfSize","type","getBandWidth","Math","abs","dataToCoord","cartesianPrepareCustom","coordSys","rect","master","getRect","x","y","width","height","api","coord","data","dataToPoint","size","bind"],"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,OAAO,KAAKA,MAAZ,MAAwB,0BAAxB;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,QAAnC,EAA6C;AAC3C;AACAA,EAAAA,QAAQ,GAAGA,QAAQ,IAAI,CAAC,CAAD,EAAI,CAAJ,CAAvB;AACA,SAAOH,MAAM,CAACI,GAAP,CAAW,CAAC,GAAD,EAAM,GAAN,CAAX,EAAuB,UAAUC,GAAV,EAAeC,MAAf,EAAuB;AACnD,QAAIC,IAAI,GAAG,KAAKC,OAAL,CAAaH,GAAb,CAAX;AACA,QAAII,GAAG,GAAGN,QAAQ,CAACG,MAAD,CAAlB;AACA,QAAII,QAAQ,GAAGR,QAAQ,CAACI,MAAD,CAAR,GAAmB,CAAlC;AACA,WAAOC,IAAI,CAACI,IAAL,KAAc,UAAd,GAA2BJ,IAAI,CAACK,YAAL,EAA3B,GAAiDC,IAAI,CAACC,GAAL,CAASP,IAAI,CAACQ,WAAL,CAAiBN,GAAG,GAAGC,QAAvB,IAAmCH,IAAI,CAACQ,WAAL,CAAiBN,GAAG,GAAGC,QAAvB,CAA5C,CAAxD;AACD,GALM,EAKJ,IALI,CAAP;AAMD;;AAED,eAAe,SAASM,sBAAT,CAAgCC,QAAhC,EAA0C;AACvD,MAAIC,IAAI,GAAGD,QAAQ,CAACE,MAAT,CAAgBC,OAAhB,EAAX;AACA,SAAO;AACLH,IAAAA,QAAQ,EAAE;AACR;AACAN,MAAAA,IAAI,EAAE,aAFE;AAGRU,MAAAA,CAAC,EAAEH,IAAI,CAACG,CAHA;AAIRC,MAAAA,CAAC,EAAEJ,IAAI,CAACI,CAJA;AAKRC,MAAAA,KAAK,EAAEL,IAAI,CAACK,KALJ;AAMRC,MAAAA,MAAM,EAAEN,IAAI,CAACM;AANL,KADL;AASLC,IAAAA,GAAG,EAAE;AACHC,MAAAA,KAAK,EAAE,eAAUC,IAAV,EAAgB;AACrB;AACA,eAAOV,QAAQ,CAACW,WAAT,CAAqBD,IAArB,CAAP;AACD,OAJE;AAKHE,MAAAA,IAAI,EAAE7B,MAAM,CAAC8B,IAAP,CAAY7B,eAAZ,EAA6BgB,QAA7B;AALH;AATA,GAAP;AAiBD","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 * as zrUtil from 'zrender/lib/core/util.js';\n\nfunction dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n dataItem = dataItem || [0, 0];\n return zrUtil.map(['x', 'y'], function (dim, dimIdx) {\n var axis = this.getAxis(dim);\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n }, this);\n}\n\nexport default function cartesianPrepareCustom(coordSys) {\n var rect = coordSys.master.getRect();\n return {\n coordSys: {\n // The name exposed to user is always 'cartesian2d' but not 'grid'.\n type: 'cartesian2d',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height\n },\n api: {\n coord: function (data) {\n // do not provide \"out\" param\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\n }\n };\n}"]},"metadata":{},"sourceType":"module"} |