igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
287 lines (286 loc) • 8.82 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 { PointData } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
/**
* @hidden
*/
var SliceVisualData = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SliceVisualData, _super);
function SliceVisualData() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._pieSlice = null;
_this._outline = null;
_this._labelVisualData = null;
_this._backgroundPath = null;
_this._origin = null;
_this._explodedOrigin = null;
_this._isExploded = false;
_this._isSelected = false;
_this._index = 0;
_this._radius = 0;
_this._startAngle = 0;
_this._endAngle = 0;
_this._visibility = false;
return _this;
}
Object.defineProperty(SliceVisualData.prototype, "pieSlice", {
get: function () {
return this._pieSlice;
},
set: function (a) {
this._pieSlice = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "outline", {
get: function () {
return this._outline;
},
set: function (a) {
this._outline = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "labelVisualData", {
get: function () {
return this._labelVisualData;
},
set: function (a) {
this._labelVisualData = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "backgroundPath", {
get: function () {
return this._backgroundPath;
},
set: function (a) {
this._backgroundPath = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "origin", {
get: function () {
return this._origin;
},
set: function (a) {
this._origin = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "explodedOrigin", {
get: function () {
return this._explodedOrigin;
},
set: function (a) {
this._explodedOrigin = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "isExploded", {
get: function () {
return this._isExploded;
},
set: function (a) {
this._isExploded = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "isSelected", {
get: function () {
return this._isSelected;
},
set: function (a) {
this._isSelected = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "index", {
get: function () {
return this._index;
},
set: function (a) {
this._index = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "radius", {
get: function () {
return this._radius;
},
set: function (a) {
this._radius = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "startAngle", {
get: function () {
return this._startAngle;
},
set: function (a) {
this._startAngle = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "endAngle", {
get: function () {
return this._endAngle;
},
set: function (a) {
this._endAngle = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceVisualData.prototype, "visibility", {
get: function () {
return this._visibility;
},
set: function (a) {
this._visibility = a;
},
enumerable: false,
configurable: true
});
SliceVisualData.prototype.scaleByViewport = function (a) {
this.origin = new PointData((this.origin.x - a.left) / a.width, (this.origin.y - a.top) / a.height);
this.explodedOrigin = new PointData((this.explodedOrigin.x - a.left) / a.width, (this.explodedOrigin.y - a.top) / a.height);
};
SliceVisualData.prototype.serialize = function () {
var a = new StringBuilder(0);
var b = true;
a.u("{");
if (this.pieSlice != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("pieSlice: ");
a.u(this.pieSlice.serialize());
}
if (this.labelVisualData != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("labelVisualData: ");
a.u(this.labelVisualData.serialize());
}
if (this.backgroundPath != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("backgroundPath: ");
a.u(this.backgroundPath.serialize());
}
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("isExploded: ");
a.u(this.isExploded.toString().toLowerCase());
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("isSelected: ");
a.u(this.isSelected.toString().toLowerCase());
if (!isNaN_(this.explodedOrigin.x) && !isNaN_(this.explodedOrigin.y)) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("explodedOrigin: ");
a.u("{ x: " + this.explodedOrigin.x.toString() + ", y: " + this.explodedOrigin.y.toString() + "}");
}
if (!isNaN_(this.origin.x) && !isNaN_(this.origin.y)) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("origin: ");
a.u("{ x: " + this.origin.x.toString() + ", y: " + this.origin.y.toString() + "}");
}
if (!isNaN_(this.index)) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("index: ");
a.u(this.index.toString());
}
if (!isNaN_(this.radius)) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("radius: ");
a.u(this.radius.toString());
}
a.l(", visibility: ");
a.u(this.visibility ? "true" : "false");
if (!isNaN_(this.startAngle)) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("startAngle: ");
a.u(this.startAngle.toString());
}
if (!isNaN_(this.endAngle)) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("endAngle: ");
a.u(this.endAngle.toString());
}
a.u("}");
return a.toString();
};
SliceVisualData.$t = markType(SliceVisualData, 'SliceVisualData');
return SliceVisualData;
}(Base));
export { SliceVisualData };