UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

137 lines (136 loc) 5.1 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 { 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 */ export let SliceInfo = /*@__PURE__*/ (() => { class SliceInfo extends Base { constructor() { super(); 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 }; } get l() { return this.k; } set l(a) { this.k = a; } get n() { return this.m; } set n(a) { this.m = a; } get j() { return this.i; } set j(a) { this.i = a; } get h() { return this.f; } set h(a) { this.f = a; } get b() { return this.a; } set b(a) { this.a = a; } get g() { return this.e; } set g(a) { this.e = a; } static c(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; } d() { let 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); let b = new Array(this.b.bd.count); for (let 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; })();