| 1 |
- {"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/*\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 axisDefault from '../axisDefault.js';\nimport Model from '../../model/Model.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport ComponentModel from '../../model/Component.js';\nvar valueAxisDefault = axisDefault.value;\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\nvar RadarModel = /** @class */function (_super) {\n __extends(RadarModel, _super);\n function RadarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarModel.type;\n return _this;\n }\n RadarModel.prototype.optionUpdated = function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n // let axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('axisName');\n var showName = this.get(['axisName', 'show']);\n var nameFormatter = this.get(['axisName', 'formatter']);\n var nameGap = this.get('axisNameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n }\n // Use same configuration\n var innerIndicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n // axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n showName: showName,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n if (zrUtil.isString(nameFormatter)) {\n var indName = innerIndicatorOpt.name;\n innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (zrUtil.isFunction(nameFormatter)) {\n innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt);\n }\n var model = new Model(innerIndicatorOpt, null, this.ecModel);\n zrUtil.mixin(model, AxisModelCommonMixin.prototype);\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n this._indicatorModels = indicatorModels;\n };\n RadarModel.prototype.getIndicatorModels = function () {\n return this._indicatorModels;\n };\n RadarModel.type = 'radar';\n RadarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '75%',\n startAngle: 90,\n axisName: {\n show: true\n // formatter: null\n // textStyle: {}\n },\n boundaryGap: [0, 0],\n splitNumber: 5,\n axisNameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: '#bbb'\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n // axisType: 'value',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n };\n return RadarModel;\n}(ComponentModel);\nexport default RadarModel;","map":{"version":3,"names":["__extends","zrUtil","axisDefault","Model","AxisModelCommonMixin","ComponentModel","valueAxisDefault","value","defaultsShow","opt","show","defaults","RadarModel","_super","_this","apply","arguments","type","prototype","optionUpdated","boundaryGap","get","splitNumber","scale","axisLine","axisTick","axisLabel","nameTextStyle","showName","nameFormatter","nameGap","triggerEvent","indicatorModels","map","indicatorOpt","max","min","iNameTextStyle","color","innerIndicatorOpt","merge","clone","name","text","nameLocation","isString","indName","replace","isFunction","model","ecModel","mixin","mainType","componentIndex","_indicatorModels","getIndicatorModels","defaultOption","z","center","radius","startAngle","axisName","axisNameGap","shape","lineStyle","splitLine","splitArea","indicator"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/coord/radar/RadarModel.js"],"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/*\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 axisDefault from '../axisDefault.js';\nimport Model from '../../model/Model.js';\nimport { AxisModelCommonMixin } from '../axisModelCommonMixin.js';\nimport ComponentModel from '../../model/Component.js';\nvar valueAxisDefault = axisDefault.value;\nfunction defaultsShow(opt, show) {\n return zrUtil.defaults({\n show: show\n }, opt);\n}\nvar RadarModel = /** @class */function (_super) {\n __extends(RadarModel, _super);\n function RadarModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = RadarModel.type;\n return _this;\n }\n RadarModel.prototype.optionUpdated = function () {\n var boundaryGap = this.get('boundaryGap');\n var splitNumber = this.get('splitNumber');\n var scale = this.get('scale');\n var axisLine = this.get('axisLine');\n var axisTick = this.get('axisTick');\n // let axisType = this.get('axisType');\n var axisLabel = this.get('axisLabel');\n var nameTextStyle = this.get('axisName');\n var showName = this.get(['axisName', 'show']);\n var nameFormatter = this.get(['axisName', 'formatter']);\n var nameGap = this.get('axisNameGap');\n var triggerEvent = this.get('triggerEvent');\n var indicatorModels = zrUtil.map(this.get('indicator') || [], function (indicatorOpt) {\n // PENDING\n if (indicatorOpt.max != null && indicatorOpt.max > 0 && !indicatorOpt.min) {\n indicatorOpt.min = 0;\n } else if (indicatorOpt.min != null && indicatorOpt.min < 0 && !indicatorOpt.max) {\n indicatorOpt.max = 0;\n }\n var iNameTextStyle = nameTextStyle;\n if (indicatorOpt.color != null) {\n iNameTextStyle = zrUtil.defaults({\n color: indicatorOpt.color\n }, nameTextStyle);\n }\n // Use same configuration\n var innerIndicatorOpt = zrUtil.merge(zrUtil.clone(indicatorOpt), {\n boundaryGap: boundaryGap,\n splitNumber: splitNumber,\n scale: scale,\n axisLine: axisLine,\n axisTick: axisTick,\n // axisType: axisType,\n axisLabel: axisLabel,\n // Compatible with 2 and use text\n name: indicatorOpt.text,\n showName: showName,\n nameLocation: 'end',\n nameGap: nameGap,\n // min: 0,\n nameTextStyle: iNameTextStyle,\n triggerEvent: triggerEvent\n }, false);\n if (zrUtil.isString(nameFormatter)) {\n var indName = innerIndicatorOpt.name;\n innerIndicatorOpt.name = nameFormatter.replace('{value}', indName != null ? indName : '');\n } else if (zrUtil.isFunction(nameFormatter)) {\n innerIndicatorOpt.name = nameFormatter(innerIndicatorOpt.name, innerIndicatorOpt);\n }\n var model = new Model(innerIndicatorOpt, null, this.ecModel);\n zrUtil.mixin(model, AxisModelCommonMixin.prototype);\n // For triggerEvent.\n model.mainType = 'radar';\n model.componentIndex = this.componentIndex;\n return model;\n }, this);\n this._indicatorModels = indicatorModels;\n };\n RadarModel.prototype.getIndicatorModels = function () {\n return this._indicatorModels;\n };\n RadarModel.type = 'radar';\n RadarModel.defaultOption = {\n // zlevel: 0,\n z: 0,\n center: ['50%', '50%'],\n radius: '75%',\n startAngle: 90,\n axisName: {\n show: true\n // formatter: null\n // textStyle: {}\n },\n boundaryGap: [0, 0],\n splitNumber: 5,\n axisNameGap: 15,\n scale: false,\n // Polygon or circle\n shape: 'polygon',\n axisLine: zrUtil.merge({\n lineStyle: {\n color: '#bbb'\n }\n }, valueAxisDefault.axisLine),\n axisLabel: defaultsShow(valueAxisDefault.axisLabel, false),\n axisTick: defaultsShow(valueAxisDefault.axisTick, false),\n // axisType: 'value',\n splitLine: defaultsShow(valueAxisDefault.splitLine, true),\n splitArea: defaultsShow(valueAxisDefault.splitArea, true),\n // {text, min, max}\n indicator: []\n };\n return RadarModel;\n}(ComponentModel);\nexport default RadarModel;"],"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,SAAS,QAAQ,OAAO;AACjC,OAAO,KAAKC,MAAM,MAAM,0BAA0B;AAClD,OAAOC,WAAW,MAAM,mBAAmB;AAC3C,OAAOC,KAAK,MAAM,sBAAsB;AACxC,SAASC,oBAAoB,QAAQ,4BAA4B;AACjE,OAAOC,cAAc,MAAM,0BAA0B;AACrD,IAAIC,gBAAgB,GAAGJ,WAAW,CAACK,KAAK;AACxC,SAASC,YAAYA,CAACC,GAAG,EAAEC,IAAI,EAAE;EAC/B,OAAOT,MAAM,CAACU,QAAQ,CAAC;IACrBD,IAAI,EAAEA;EACR,CAAC,EAAED,GAAG,CAAC;AACT;AACA,IAAIG,UAAU,GAAG,aAAa,UAAUC,MAAM,EAAE;EAC9Cb,SAAS,CAACY,UAAU,EAAEC,MAAM,CAAC;EAC7B,SAASD,UAAUA,CAAA,EAAG;IACpB,IAAIE,KAAK,GAAGD,MAAM,KAAK,IAAI,IAAIA,MAAM,CAACE,KAAK,CAAC,IAAI,EAAEC,SAAS,CAAC,IAAI,IAAI;IACpEF,KAAK,CAACG,IAAI,GAAGL,UAAU,CAACK,IAAI;IAC5B,OAAOH,KAAK;EACd;EACAF,UAAU,CAACM,SAAS,CAACC,aAAa,GAA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