UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

296 lines (295 loc) 9.82 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { Base, markType } from "igniteui-react-core"; import { PointData } from "igniteui-react-core"; import { RectData } from "igniteui-react-core"; import { StringBuilder } from "igniteui-react-core"; /** * @hidden */ var PieSliceVisualData = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PieSliceVisualData, _super); function PieSliceVisualData() { var _this = _super.call(this) || this; _this._startAngle = 0; _this._endAngle = 0; _this._origin = null; _this._explodedOrigin = null; _this._radius = 0; _this._explodedRadius = 0; _this._innerExtentStart = 0; _this._innerExtentEnd = 0; _this._isSelected = false; _this._isExploded = false; _this._isOthersSlice = false; _this._index = 0; _this._label = null; _this._labelAngle = 0; _this._labelBounds = null; _this._appearance = null; _this._labelAppearance = null; _this._leaderLineAppearance = null; _this._slicePath = null; _this._leaderLinePath = null; _this.labelBounds = RectData.empty; return _this; } Object.defineProperty(PieSliceVisualData.prototype, "startAngle", { get: function () { return this._startAngle; }, set: function (a) { this._startAngle = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "endAngle", { get: function () { return this._endAngle; }, set: function (a) { this._endAngle = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "origin", { get: function () { return this._origin; }, set: function (a) { this._origin = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "explodedOrigin", { get: function () { return this._explodedOrigin; }, set: function (a) { this._explodedOrigin = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "radius", { get: function () { return this._radius; }, set: function (a) { this._radius = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "explodedRadius", { get: function () { return this._explodedRadius; }, set: function (a) { this._explodedRadius = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "innerExtentStart", { get: function () { return this._innerExtentStart; }, set: function (a) { this._innerExtentStart = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "innerExtentEnd", { get: function () { return this._innerExtentEnd; }, set: function (a) { this._innerExtentEnd = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "isSelected", { get: function () { return this._isSelected; }, set: function (a) { this._isSelected = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "isExploded", { get: function () { return this._isExploded; }, set: function (a) { this._isExploded = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "isOthersSlice", { get: function () { return this._isOthersSlice; }, set: function (a) { this._isOthersSlice = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "index", { get: function () { return this._index; }, set: function (a) { this._index = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "label", { get: function () { return this._label; }, set: function (a) { this._label = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "labelAngle", { get: function () { return this._labelAngle; }, set: function (a) { this._labelAngle = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "labelBounds", { get: function () { return this._labelBounds; }, set: function (a) { this._labelBounds = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "appearance", { get: function () { return this._appearance; }, set: function (a) { this._appearance = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "labelAppearance", { get: function () { return this._labelAppearance; }, set: function (a) { this._labelAppearance = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "leaderLineAppearance", { get: function () { return this._leaderLineAppearance; }, set: function (a) { this._leaderLineAppearance = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "slicePath", { get: function () { return this._slicePath; }, set: function (a) { this._slicePath = a; }, enumerable: false, configurable: true }); Object.defineProperty(PieSliceVisualData.prototype, "leaderLinePath", { get: function () { return this._leaderLinePath; }, set: function (a) { this._leaderLinePath = a; }, enumerable: false, configurable: true }); PieSliceVisualData.prototype.scaleByViewport = function (a) { if (this.slicePath != null) { this.slicePath.scaleByViewport(a); } if (this.leaderLinePath != null) { this.leaderLinePath.scaleByViewport(a); } if (!this.labelBounds.isEmpty) { var b = (this.labelBounds.left - a.left) / a.width; var c = (this.labelBounds.top - a.top) / a.height; var d = ((this.labelBounds.left + this.labelBounds.width) - a.left) / a.width; var e = ((this.labelBounds.top + this.labelBounds.height) - a.top) / a.height; this.labelBounds = new RectData(b, c, d - b, e - c); } if (this.origin != null) { this.origin = new PointData((this.origin.x - a.left) / a.width, (this.origin.y - a.top) / a.height); } if (this.explodedOrigin != null) { this.explodedOrigin = new PointData((this.explodedOrigin.x - a.left) / a.width, (this.explodedOrigin.y - a.top) / a.height); } }; PieSliceVisualData.prototype.serialize = function () { var a = new StringBuilder(0); a.u("{"); if (this.label != null) { a.u("label: \"" + this.label + "\", "); } if (this.appearance != null) { a.u("appearance: " + this.appearance.serialize() + ", "); } if (this.labelAppearance != null) { a.u("labelAppearance: " + this.labelAppearance.serialize() + ", "); } if (this.leaderLineAppearance != null) { a.u("leaderLineAppearance: " + this.leaderLineAppearance.serialize() + ", "); } if (this.slicePath != null) { a.u("slicePath: " + this.slicePath.serialize() + ", "); } if (this.leaderLinePath != null) { var b = this.leaderLinePath.serialize(); if (b != null) { a.u("leaderLinePath: " + b + ", "); } } a.u("labelAngle: " + this.labelAngle + ", "); a.u("labelBounds: { left: " + this.labelBounds.left + ", top: " + this.labelBounds.top + ", width: " + this.labelBounds.width + ", height: " + this.labelBounds.height + "}"); a.u("}"); return a.toString(); }; PieSliceVisualData.$t = markType(PieSliceVisualData, 'PieSliceVisualData'); return PieSliceVisualData; }(Base)); export { PieSliceVisualData };