igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
183 lines (182 loc) • 6.3 kB
JavaScript
/*
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-angular-core";
import { PieSliceVisualDataList } from "./PieSliceVisualDataList";
import { List$1 } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
/**
* @hidden
*/
var PieChartVisualData = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(PieChartVisualData, _super);
function PieChartVisualData() {
var _this = _super.call(this) || this;
_this._slices = null;
_this._othersSlice = null;
_this._name = null;
_this._viewport = null;
_this._width = 0;
_this._height = 0;
_this._others = null;
_this._radiusFactor = 0;
_this._leaderLineMargin = 0;
_this._isViewportScaled = false;
_this._dipScalingRatio = 0;
_this.slices = new PieSliceVisualDataList();
_this.others = new List$1(Base.$, 0);
_this.dipScalingRatio = 1;
return _this;
}
Object.defineProperty(PieChartVisualData.prototype, "slices", {
get: function () {
return this._slices;
},
set: function (a) {
this._slices = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "othersSlice", {
get: function () {
return this._othersSlice;
},
set: function (a) {
this._othersSlice = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "name", {
get: function () {
return this._name;
},
set: function (a) {
this._name = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "viewport", {
get: function () {
return this._viewport;
},
set: function (a) {
this._viewport = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "width", {
get: function () {
return this._width;
},
set: function (a) {
this._width = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "height", {
get: function () {
return this._height;
},
set: function (a) {
this._height = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "others", {
get: function () {
return this._others;
},
set: function (a) {
this._others = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "radiusFactor", {
get: function () {
return this._radiusFactor;
},
set: function (a) {
this._radiusFactor = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "leaderLineMargin", {
get: function () {
return this._leaderLineMargin;
},
set: function (a) {
this._leaderLineMargin = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "isViewportScaled", {
get: function () {
return this._isViewportScaled;
},
set: function (a) {
this._isViewportScaled = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(PieChartVisualData.prototype, "dipScalingRatio", {
get: function () {
return this._dipScalingRatio;
},
set: function (a) {
this._dipScalingRatio = a;
},
enumerable: false,
configurable: true
});
PieChartVisualData.prototype.scaleByViewport = function () {
if (this.isViewportScaled) {
return;
}
this.isViewportScaled = true;
for (var a = 0; a < this.slices.count; a++) {
this.slices._inner[a].scaleByViewport(this.viewport);
}
if (this.othersSlice != null) {
this.othersSlice.scaleByViewport(this.viewport);
}
};
PieChartVisualData.prototype.serialize = function () {
var a = new StringBuilder(0);
a.u("{");
a.u("name: " + this.name + ",");
a.u("leaderLineMargin: " + this.leaderLineMargin + ",");
a.u("radiusFactor: " + this.radiusFactor + ",");
a.u("width: " + this.width + ",");
a.u("height: " + this.height + ",");
a.u("isViewportScaled: " + (this.isViewportScaled ? "true" : "false") + ", ");
a.u("slices: [");
for (var b = 0; b < this.slices.count; b++) {
if (b != 0) {
a.l(", ");
}
a.l(this.slices._inner[b].serialize());
}
a.u("],");
a.u("viewport: { left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height + "}");
a.l(", dipScalingRatio: " + this.dipScalingRatio.toString());
a.u("}");
return a.toString();
};
PieChartVisualData.$t = markType(PieChartVisualData, 'PieChartVisualData');
return PieChartVisualData;
}(Base));
export { PieChartVisualData };