1 line
29 KiB
JSON
1 line
29 KiB
JSON
|
{"ast":null,"code":"import \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.fill.js\";\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*/\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 { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as graphic from '../../util/graphic.js';\nimport { toggleHoverEmphasis, SPECIAL_STATES, DISPLAY_STATES } from '../../util/states.js';\nimport { createTextStyle } from '../../label/labelStyle.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { getSectorCornerRadius } from '../helper/sectorHelper.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nimport { normalizeRadian } from 'zrender/lib/contain/util.js';\nvar DEFAULT_SECTOR_Z = 2;\nvar DEFAULT_TEXT_Z = 4;\n/**\n * Sunburstce of Sunburst including Sector, Label, LabelLine\n */\n\nvar SunburstPiece =\n/** @class */\nfunction (_super) {\n __extends(SunburstPiece, _super);\n\n function SunburstPiece(node, seriesModel, ecModel, api) {\n var _this = _super.call(this) || this;\n\n _this.z2 = DEFAULT_SECTOR_Z;\n _this.textConfig = {\n inside: true\n };\n getECData(_this).seriesIndex = seriesModel.seriesIndex;\n var text = new graphic.Text({\n z2: DEFAULT_TEXT_Z,\n silent: node.getModel().get(['label', 'silent'])\n });\n\n _this.setTextContent(text);\n\n _this.updateData(true, node, seriesModel, ecModel, api);\n\n return _this;\n }\n\n SunburstPiece.prototype.updateData = function (firstCreate, node, // state: 'emphasis' | 'normal' | 'highlight' | 'downplay',\n seriesModel, ecModel, api) {\n this.node = node;\n node.piece = this;\n seriesModel = seriesModel || this._seriesModel;\n ecModel = ecModel || this._ecModel;\n var sector = this;\n getECData(sector).dataIndex = node.dataIndex;\n var itemModel = node.getModel();\n var emphasisModel = itemModel.getModel('emphasis');\n var layout = node.getLayout();\n var sectorShape = zrUtil.extend({}, layout);\n sectorShape.label = null;\n var normalStyle = node.getVisual('style');\n normalStyle.lineJoin = 'bevel';\n var decal = node.getVisual('decal');\n\n if (decal) {\n normalStyle.decal = createOrUpdatePatternFromDecal(decal, api);\n }\n\n var cornerRadius = getSectorCornerRadius(itemModel.getModel('itemStyle'), sectorShape, true);\n zrUtil.extend(sectorShap
|