1 line
24 KiB
JSON
1 line
24 KiB
JSON
|
{"ast":null,"code":"import \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.slice.js\";\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*/\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 RadiusAxis from './RadiusAxis.js';\nimport AngleAxis from './AngleAxis.js';\nexport var polarDimensions = ['radius', 'angle'];\n\nvar Polar =\n/** @class */\nfunction () {\n function Polar(name) {\n this.dimensions = polarDimensions;\n this.type = 'polar';\n /**\r\n * x of polar center\r\n */\n\n this.cx = 0;\n /**\r\n * y of polar center\r\n */\n\n this.cy = 0;\n this._radiusAxis = new RadiusAxis();\n this._angleAxis = new AngleAxis();\n this.axisPointerEnabled = true;\n this.name = name || '';\n this._radiusAxis.polar = this._angleAxis.polar = this;\n }\n /**\r\n * If contain coord\r\n */\n\n\n Polar.prototype.containPoint = function (point) {\n var coord = this.pointToCoord(point);\n return this._radiusAxis.contain(coord[0]) && this._angleAxis.contain(coord[1]);\n };\n /**\r\n * If contain data\r\n */\n\n\n Polar.prototype.containData = function (data) {\n return this._radiusAxis.containData(data[0]) && this._angleAxis.containData(data[1]);\n };\n\n Polar.prototype.getAxis = function (dim) {\n var key = '_' + dim + 'Axis';\n return this[key];\n };\n\n Polar.prototype.getAxes = function () {\n return [this._radiusAxis, this._angleAxis];\n };\n /**\r\n * Get axes by type of scale\r\n */\n\n\n Polar.prototype.getAxesByScale = function (scaleType) {\n var axes = [];\n var angleAxis = this._angleAxis;\n var radiusAxis = this._radiusAxis;\n angleAxis.scale.type === scaleType && axes.push(angleAxis);\n radiusAxis.scale.type === scaleType && axes.push(radiusAxis);\n return axes;\n };\n\n Polar.prototype.getAngleAxis = function () {\n return this._angleAxis;\n };\n\n Polar.prototype.getRadiusAxis = function () {\n return this._radiusAxis;\n };\n\n Polar.prototype.getOtherAxis = function (axis) {\n var angleAxis = this._angleAxis;\n return axis === angleAxis ? this._radiusAxis : angleAxis;\n };\n /**\r\n * Base axis will be used on stacking.\r\n *\r\n */\n\n\n Polar.prototype.getBaseAxis = function () {\n return this.getAxesByScale('ordinal')[0] || this.getAxesByScale('time')[0] || this.getAngleAxis();\n };\n\n Polar.prototype.getTooltipAxes = fu
|