igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
144 lines (143 loc) • 4.61 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, __values } from "tslib";
import { Base, fromEnum, markType } from "igniteui-angular-core";
import { StringBuilder } from "igniteui-angular-core";
/**
* @hidden
*/
var TreemapVisualData = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(TreemapVisualData, _super);
function TreemapVisualData() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._nodes = null;
_this._name = null;
_this._viewport = null;
return _this;
}
Object.defineProperty(TreemapVisualData.prototype, "nodes", {
get: function () {
return this._nodes;
},
set: function (a) {
this._nodes = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TreemapVisualData.prototype, "name", {
get: function () {
return this._name;
},
set: function (a) {
this._name = a;
},
enumerable: false,
configurable: true
});
TreemapVisualData.prototype.scaleByViewport = function () {
var e_1, _a;
if (this.nodes != null) {
try {
for (var _b = __values(fromEnum(this.nodes)), _c = _b.next(); !_c.done; _c = _b.next()) {
var a = _c.value;
a.f(this.viewport);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
}
};
TreemapVisualData.prototype.serialize = function () {
var e_2, _a;
var a = new StringBuilder(0);
var b = true;
a.u("{");
if (this.nodes != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
var c = true;
a.l("Nodes: [");
try {
for (var _b = __values(fromEnum(this.nodes)), _c = _b.next(); !_c.done; _c = _b.next()) {
var d = _c.value;
if (c) {
c = false;
}
else {
a.l(", ");
}
a.u(d.e());
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_2)
throw e_2.error;
}
}
a.u("]");
}
if (this.name != null) {
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("name: '");
a.l(this.name);
a.u("'");
}
if (b) {
b = false;
}
else {
a.l(", ");
}
a.l("viewport: {");
a.l("left: " + this.viewport.left + ", top: " + this.viewport.top + ", width: " + this.viewport.width + ", height: " + this.viewport.height);
a.u("}");
a.u("}");
return a.toString();
};
Object.defineProperty(TreemapVisualData.prototype, "viewport", {
get: function () {
return this._viewport;
},
set: function (a) {
this._viewport = a;
},
enumerable: false,
configurable: true
});
TreemapVisualData.$t = markType(TreemapVisualData, 'TreemapVisualData');
return TreemapVisualData;
}(Base));
export { TreemapVisualData };