igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
163 lines (162 loc) • 5.83 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, Point_$type, markType } from "igniteui-angular-core";
import { SliceAppearance } from "./SliceAppearance";
import { FunnelSliceVisualData } from "./FunnelSliceVisualData";
import { PointData } from "igniteui-angular-core";
import { PrimitiveAppearanceData } from "igniteui-angular-core";
import { AppearanceHelper } from "igniteui-angular-core";
import { RectData } from "igniteui-angular-core";
import { LabelAppearanceData } from "igniteui-angular-core";
import { stringEmpty } from "igniteui-angular-core";
/**
* @hidden
*/
var SliceInfo = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(SliceInfo, _super);
function SliceInfo() {
var _this = _super.call(this) || this;
_this.k = null;
_this.m = null;
_this.i = 0;
_this.f = false;
_this.a = null;
_this.e = false;
_this.b = new SliceAppearance();
_this.n = { $type: Point_$type, x: 0, y: 0 };
return _this;
}
Object.defineProperty(SliceInfo.prototype, "l", {
get: function () {
return this.k;
},
set: function (a) {
this.k = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceInfo.prototype, "n", {
get: function () {
return this.m;
},
set: function (a) {
this.m = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceInfo.prototype, "j", {
get: function () {
return this.i;
},
set: function (a) {
this.i = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceInfo.prototype, "h", {
get: function () {
return this.f;
},
set: function (a) {
this.f = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceInfo.prototype, "b", {
get: function () {
return this.a;
},
set: function (a) {
this.a = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(SliceInfo.prototype, "g", {
get: function () {
return this.e;
},
set: function (a) {
this.e = a;
},
enumerable: false,
configurable: true
});
SliceInfo.c = function (a, b, c, d, e) {
if (a == null) {
a = new SliceInfo();
}
a.g = c.g;
a.h = c.h;
a.j = c.j;
a.l = c.l;
a.n = { $type: Point_$type, x: (b.n.x * e) + (c.n.x * d), y: (b.n.y * e) + (c.n.y * d) };
a.b = SliceAppearance.f(a.b, b.b, c.b, d, e);
return a;
};
SliceInfo.prototype.d = function () {
var a = new FunnelSliceVisualData();
a.appearance = new PrimitiveAppearanceData();
a.appearance.fill = AppearanceHelper.b(this.b.ao);
a.appearance.stroke = AppearanceHelper.b(this.b.at);
a.appearance.opacity = this.b.t;
a.appearance.canvasLeft = this.b.a7.x;
a.appearance.canvasTop = this.b.a7.y;
a.height = this.b.a5.y - this.b.a8.y;
a.upperWidth = this.b.a9.x - this.b.a8.x;
a.lowerWidth = this.b.a6.x - this.b.a5.x;
a.isSelected = this.b.j;
a.top = this.b.q;
a.bottom = this.b.p;
a.index = this.j;
a.height = this.b.p - this.b.q;
a.sliceBorderBrush = AppearanceHelper.a(this.b.at);
if (this.b.ab == null) {
a.innerLabel = stringEmpty();
}
else {
a.innerLabel = this.b.ab.toString();
}
if (this.l == null) {
a.outerLabel = stringEmpty();
}
else {
a.outerLabel = this.l.toString();
}
a.upperLeft = PointData.b(this.b.a8);
a.upperRight = PointData.b(this.b.a9);
a.lowerLeft = PointData.b(this.b.a5);
a.lowerRight = PointData.b(this.b.a6);
var b = new Array(this.b.bd.count);
for (var c = 0; c < this.b.bd.count; c++) {
b[c] = new PointData(this.b.bd._inner[c].x, this.b.bd._inner[c].y);
}
a.slicePoints = b;
a.innerLabelPosition = PointData.b(this.a.a4);
a.outerLabelPosition = PointData.b(this.m);
a.outerLabelBounds = RectData.b(this.b.bh);
a.innerLabelBounds = RectData.b(this.b.bg);
a.isVisibile = this.b.bn == 0;
a.innerLabelAppearance = new LabelAppearanceData();
a.innerLabelAppearance.labelBrush = AppearanceHelper.b(this.b.ar);
a.innerLabelAppearance.text = a.innerLabel;
a.innerLabelAppearance.visibility = this.b.i;
a.outerLabelAppearance = new LabelAppearanceData();
a.outerLabelAppearance.labelBrush = AppearanceHelper.b(this.b.as);
a.outerLabelAppearance.text = a.outerLabel;
a.outerLabelAppearance.visibility = this.g;
return a;
};
SliceInfo.$t = markType(SliceInfo, 'SliceInfo');
return SliceInfo;
}(Base));
export { SliceInfo };