1 line
73 KiB
JSON
1 line
73 KiB
JSON
|
{"ast":null,"code":"import \"core-js/modules/es.regexp.exec.js\";\nimport \"core-js/modules/es.string.replace.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 PointerPath from './PointerPath.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel, toggleHoverEmphasis } from '../../util/states.js';\nimport { createTextStyle, setLabelValueAnimation, animateLabelValue } from '../../label/labelStyle.js';\nimport ChartView from '../../view/Chart.js';\nimport { parsePercent, round, linearMap } from '../../util/number.js';\nimport Sausage from '../../util/shape/sausage.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport ZRImage from 'zrender/lib/graphic/Image.js';\nimport { extend, isFunction, isString, isNumber, each } from 'zrender/lib/core/util.js';\nimport { setCommonECData } from '../../util/innerStore.js';\nimport { normalizeArcAngles } from 'zrender/lib/core/PathProxy.js';\n\nfunction parsePosition(seriesModel, api) {\n var center = seriesModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n var size = Math.min(width, height);\n var cx = parsePercent(center[0], api.getWidth());\n var cy = parsePercent(center[1], api.getHeight());\n var r = parsePercent(seriesModel.get('radius'), size / 2);\n return {\n cx: cx,\n cy: cy,\n r: r\n };\n}\n\nfunction formatLabel(value, labelFormatter) {\n var label = value == null ? '' : value + '';\n\n if (labelFormatter) {\n if (isString(labelFormatter)) {\n label = labelFormatter.replace('{value}', label);\n } else if (isFunction(labelFormatter)) {\n label = labelFormatter(value);\n }\n }\n\n return label;\n}\n\nvar GaugeView =\n/** @class */\nfunction (_super) {\n __extends(GaugeView, _super);\n\n function GaugeView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = GaugeView.type;\n return _this;\n }\n\n GaugeView.prototype.render = function (seriesModel, ecModel, api) {\n this.group.removeAll();\n var colorList = seriesModel.get(['axisLine', 'lineStyle', 'color']);\n var posInfo = parsePosition(seriesModel, api);\n\n this._renderMain(seriesModel, ecModel, api, colorList, posInfo);\n\n this._data = seriesModel.getData();\n };\n\n GaugeView.prototype.dispose = function () {};\n\n GaugeView.prototyp
|