{"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 { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport AxisBuilder from './AxisBuilder.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\nimport AxisView from './AxisView.js';\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\n\nvar SingleAxisView =\n/** @class */\nfunction (_super) {\n __extends(SingleAxisView, _super);\n\n function SingleAxisView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = SingleAxisView.type;\n _this.axisPointerClass = 'SingleAxisPointer';\n return _this;\n }\n\n SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n var oldAxisGroup = this._axisGroup;\n this._axisGroup = new graphic.Group();\n var layout = singleAxisHelper.layout(axisModel);\n var axisBuilder = new AxisBuilder(axisModel, layout);\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\n group.add(this._axisGroup);\n group.add(axisBuilder.getGroup());\n zrUtil.each(selfBuilderAttrs, function (name) {\n if (axisModel.get([name, 'show'])) {\n axisElementBuilders[name](this, this.group, this._axisGroup, axisModel);\n }\n }, this);\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\n\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\n };\n\n SingleAxisView.prototype.remove = function () {\n rectCoordAxisHandleRemove(this);\n };\n\n SingleAxisView.type = 'singleAxis';\n return SingleAxisView;\n}(AxisView);\n\nvar axisElementBuilders = {\n splitLine: function splitLine(axisView, group, axisGroup, axisModel) {\n var axis = axisModel.axis;\n\n if (axis.scale.isBlank()) {\n return;\n }\n\n var splitLineModel = axisModel.getModel('splitLine');\n var lineStyleModel = splitLineModel.getModel('lineStyle');\n var lineColors = lineStyleModel.get('color');\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\n var gridRect = axisModel.coordinateSystem.getRect();\n var isHorizontal = axis.isHorizontal();\n var splitLines = [];\n var lineCount = 0;\n var ticksCoords = axis.getTicksCoords({\n tickModel: splitLineModel\n });\n var p1 = [];\n var p2 = [];\n\n for (var i = 0; i < ticksCoords.length; ++i) {\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\n\n if (isHorizontal) {\n p1[0] = tickCoord;\n p1[1] = gridRect.y;\n p2[0] = tickCoord;\n p2[1] = gridRect.y + gridRect.height;\n } else {\n p1[0] = gridRect.x;\n p1[1] = tickCoord;\n p2[0] = gridRect.x + gridRect.width;\n p2[1] = tickCoord;\n }\n\n var colorIndex = lineCount++ % lineColors.length;\n splitLines[colorIndex] = splitLines[colorIndex] || [];\n splitLines[colorIndex].push(new graphic.Line({\n subPixelOptimize: true,\n shape: {\n x1: p1[0],\n y1: p1[1],\n x2: p2[0],\n y2: p2[1]\n },\n silent: true\n }));\n }\n\n var lineStyle = lineStyleModel.getLineStyle(['color']);\n\n for (var i = 0; i < splitLines.length; ++i) {\n group.add(graphic.mergePath(splitLines[i], {\n style: zrUtil.defaults({\n stroke: lineColors[i % lineColors.length]\n }, lineStyle),\n silent: true\n }));\n }\n },\n splitArea: function splitArea(axisView, group, axisGroup, axisModel) {\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel);\n }\n};\nexport default SingleAxisView;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/axis/SingleAxisView.js"],"names":["__extends","zrUtil","AxisBuilder","graphic","singleAxisHelper","AxisView","rectCoordAxisBuildSplitArea","rectCoordAxisHandleRemove","axisBuilderAttrs","selfBuilderAttrs","SingleAxisView","_super","_this","apply","arguments","type","axisPointerClass","prototype","render","axisModel","ecModel","api","payload","group","removeAll","oldAxisGroup","_axisGroup","Group","layout","axisBuilder","each","add","getGroup","name","get","axisElementBuilders","groupTransition","call","remove","splitLine","axisView","axisGroup","axis","scale","isBlank","splitLineModel","getModel","lineStyleModel","lineColors","Array","gridRect","coordinateSystem","getRect","isHorizontal","splitLines","lineCount","ticksCoords","getTicksCoords","tickModel","p1","p2","i","length","tickCoord","toGlobalCoord","coord","y","height","x","width","colorIndex","push","Line","subPixelOptimize","shape","x1","y1","x2","y2","silent","lineStyle","getLineStyle","mergePath","style","defaults","stroke","splitArea"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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C,UAAAA,MAAM,EAAErC,UAAU,CAACa,CAAC,GAAGb,UAAU,CAACc,MAAhB;AADG,SAAhB,EAEJkB,SAFI,CADkC;AAIzCD,QAAAA,MAAM,EAAE;AAJiC,OAAjC,CAAV;AAMD;AACF,GA7DuB;AA8DxBO,EAAAA,SAAS,EAAE,mBAAU9C,QAAV,EAAoBjB,KAApB,EAA2BkB,SAA3B,EAAsCtB,SAAtC,EAAiD;AAC1Db,IAAAA,2BAA2B,CAACkC,QAAD,EAAWC,SAAX,EAAsBtB,SAAtB,EAAiCA,SAAjC,CAA3B;AACD;AAhEuB,CAA1B;AAkEA,eAAeT,cAAf","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 { __extends } from \"tslib\";\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nimport AxisBuilder from './AxisBuilder.js';\r\nimport * as graphic from '../../util/graphic.js';\r\nimport * as singleAxisHelper from '../../coord/single/singleAxisHelper.js';\r\nimport AxisView from './AxisView.js';\r\nimport { rectCoordAxisBuildSplitArea, rectCoordAxisHandleRemove } from './axisSplitHelper.js';\r\nvar axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];\r\nvar selfBuilderAttrs = ['splitArea', 'splitLine'];\r\n\r\nvar SingleAxisView =\r\n/** @class */\r\nfunction (_super) {\r\n __extends(SingleAxisView, _super);\r\n\r\n function SingleAxisView() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n\r\n _this.type = SingleAxisView.type;\r\n _this.axisPointerClass = 'SingleAxisPointer';\r\n return _this;\r\n }\r\n\r\n SingleAxisView.prototype.render = function (axisModel, ecModel, api, payload) {\r\n var group = this.group;\r\n group.removeAll();\r\n var oldAxisGroup = this._axisGroup;\r\n this._axisGroup = new graphic.Group();\r\n var layout = singleAxisHelper.layout(axisModel);\r\n var axisBuilder = new AxisBuilder(axisModel, layout);\r\n zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);\r\n group.add(this._axisGroup);\r\n group.add(axisBuilder.getGroup());\r\n zrUtil.each(selfBuilderAttrs, function (name) {\r\n if (axisModel.get([name, 'show'])) {\r\n axisElementBuilders[name](this, this.group, this._axisGroup, axisModel);\r\n }\r\n }, this);\r\n graphic.groupTransition(oldAxisGroup, this._axisGroup, axisModel);\r\n\r\n _super.prototype.render.call(this, axisModel, ecModel, api, payload);\r\n };\r\n\r\n SingleAxisView.prototype.remove = function () {\r\n rectCoordAxisHandleRemove(this);\r\n };\r\n\r\n SingleAxisView.type = 'singleAxis';\r\n return SingleAxisView;\r\n}(AxisView);\r\n\r\nvar axisElementBuilders = {\r\n splitLine: function (axisView, group, axisGroup, axisModel) {\r\n var axis = axisModel.axis;\r\n\r\n if (axis.scale.isBlank()) {\r\n return;\r\n }\r\n\r\n var splitLineModel = axisModel.getModel('splitLine');\r\n var lineStyleModel = splitLineModel.getModel('lineStyle');\r\n var lineColors = lineStyleModel.get('color');\r\n lineColors = lineColors instanceof Array ? lineColors : [lineColors];\r\n var gridRect = axisModel.coordinateSystem.getRect();\r\n var isHorizontal = axis.isHorizontal();\r\n var splitLines = [];\r\n var lineCount = 0;\r\n var ticksCoords = axis.getTicksCoords({\r\n tickModel: splitLineModel\r\n });\r\n var p1 = [];\r\n var p2 = [];\r\n\r\n for (var i = 0; i < ticksCoords.length; ++i) {\r\n var tickCoord = axis.toGlobalCoord(ticksCoords[i].coord);\r\n\r\n if (isHorizontal) {\r\n p1[0] = tickCoord;\r\n p1[1] = gridRect.y;\r\n p2[0] = tickCoord;\r\n p2[1] = gridRect.y + gridRect.height;\r\n } else {\r\n p1[0] = gridRect.x;\r\n p1[1] = tickCoord;\r\n p2[0] = gridRect.x + gridRect.width;\r\n p2[1] = tickCoord;\r\n }\r\n\r\n var colorIndex = lineCount++ % lineColors.length;\r\n splitLines[colorIndex] = splitLines[colorIndex] || [];\r\n splitLines[colorIndex].push(new graphic.Line({\r\n subPixelOptimize: true,\r\n shape: {\r\n x1: p1[0],\r\n y1: p1[1],\r\n x2: p2[0],\r\n y2: p2[1]\r\n },\r\n silent: true\r\n }));\r\n }\r\n\r\n var lineStyle = lineStyleModel.getLineStyle(['color']);\r\n\r\n for (var i = 0; i < splitLines.length; ++i) {\r\n group.add(graphic.mergePath(splitLines[i], {\r\n style: zrUtil.defaults({\r\n stroke: lineColors[i % lineColors.length]\r\n }, lineStyle),\r\n silent: true\r\n }));\r\n }\r\n },\r\n splitArea: function (axisView, group, axisGroup, axisModel) {\r\n rectCoordAxisBuildSplitArea(axisView, axisGroup, axisModel, axisModel);\r\n }\r\n};\r\nexport default SingleAxisView;"]},"metadata":{},"sourceType":"module"}