UNPKG

igniteui-angular-charts

Version:

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

200 lines (199 loc) 6.54 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 { HorizontalAxisLabelPanelBase } from "./HorizontalAxisLabelPanelBase"; import { Number_$type, fromEnum, Boolean_$type, markType } from "igniteui-angular-core"; import { Size } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { Rect } from "igniteui-angular-core"; import { HorizontalAxisLabelPanelBaseView } from "./HorizontalAxisLabelPanelBaseView"; import { TransformGroup } from "igniteui-angular-core"; import { RotateTransform } from "igniteui-angular-core"; import { TranslateTransform } from "igniteui-angular-core"; import { ViewportUtils } from "./ViewportUtils"; /** * @hidden */ export let RadialAxisLabelPanel = /*@__PURE__*/ (() => { class RadialAxisLabelPanel extends HorizontalAxisLabelPanelBase { constructor() { super(...arguments); this.d4 = null; this.d1 = 0; this.d0 = new List$1(Number_$type, 0); } af() { return new RadialAxisLabelPanelView(this); } cl(a) { super.cl(a); this.dy = a; } get dz() { return !this.ao; } dh() { return this.aq && (!this.a0 || this.bq() == -180); } di() { return !this.a1; } b6(a) { super.b6(a); if (this.d1 % 360 == 0 || this.ao) { this.dy.a5(); } else { this.dy.a4(a); } } bq() { let a = super.bq(); if (this.dz) { a -= (this.d1 * 180) / Math.PI; } return a; } dg() { return this.bq() % 360 != 0; } df() { if (this.ae != null && this.ae.b2 != null && this.ae.b2.go) { return false; } if (this.ao) { return true; } let a = this.d1 * 180 / Math.PI; if (a < 30 || a > 330 || (a > 150 && a < 210)) { return true; } return false; } cq(a, b) { let c = b * Math.PI / 180; let d = Math.abs(Math.sin(c)); if (this.ae.a4 != null && this.ae.a4.c == 4) { d = d * -1; } this.dy.a6(a, b, d); } d3() { let a = 1.7976931348623157E+308; for (let b of fromEnum(this.bf)) { a = Math.min(b.h, a); } return a; } d2() { let a = -1.7976931348623157E+308; for (let b of fromEnum(this.bf)) { a = Math.max(b.h, a); } return a; } dv(a, b) { let c; if (this.ae.dn) { c = this.d3(); } else { c = this.d2(); } let d = new List$1(Number_$type, 0); let e = new List$1(Boolean_$type, 0); for (let f = 0; f < this.bf.count; f++) { let g = this.bf._inner[f]; if (g.h == c && !g.b) { d.add(this.bf.indexOf(g)); } } this.d0 = d; let h = new List$1(Rect.$, 0); for (let i = 0; i < a.count; i++) { let j = a._inner[i]; let k = this.bf._inner[i].b; if (!this.d0.contains(i)) { h.add(j); e.add(k); } } this.aq = this.ap(h, e); } aw(a, b) { if (this.d0.contains(a)) { return false; } else { return super.aw(a, b); } } dw() { this.d0 = new List$1(Number_$type, 0); super.dw(); } aj() { return 5; } a3(a) { return a == 5 || a == 4 || a == 1 || a == 0; } cd() { } } RadialAxisLabelPanel.$t = markType(RadialAxisLabelPanel, 'RadialAxisLabelPanel', HorizontalAxisLabelPanelBase.$); return RadialAxisLabelPanel; })(); /** * @hidden */ export let RadialAxisLabelPanelView = /*@__PURE__*/ (() => { class RadialAxisLabelPanelView extends HorizontalAxisLabelPanelBaseView { constructor(a) { super(a); this.a3 = null; this.a3 = a; } a6(a, b, c) { let d = this.n(a); let e = this.m(a); let f = new TransformGroup(); f.j.add(((() => { let $ret = new RotateTransform(); $ret.j = b; $ret.k = d / 2; $ret.l = e / 2; return $ret; })())); f.j.add(((() => { let $ret = new TranslateTransform(); $ret.j = d / -2; $ret.k = d / 2 * c; return $ret; })())); a.j = f; } a5() { this.a.j = null; } a4(a) { let b = ViewportUtils.i(0.5, this.a.da, this.a.c9, this.a.ae != null ? this.a.ae.oy() : Rect.empty); this.a.j = ((() => { let $ret = new RotateTransform(); $ret.j = (this.a3.d1 * 180) / Math.PI; $ret.k = this.a3.d4.x; $ret.l = (this.a3.d4.y * a.height) + b; return $ret; })()); } al() { super.al(); this.a.db(new Size(1, this.a.c6.width, this.a.c6.height)); } } RadialAxisLabelPanelView.$t = markType(RadialAxisLabelPanelView, 'RadialAxisLabelPanelView', HorizontalAxisLabelPanelBaseView.$); return RadialAxisLabelPanelView; })();