igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,448 lines • 66.5 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 { AxisLabelPanelBase } from "./AxisLabelPanelBase";
import { Boolean_$type, typeCast, markType, Point_$type, typeGetValue, fromEnum, runOn, Number_$type, enumGetBox, markDep } from "igniteui-angular-core";
import { AxisLabelPanelBaseView } from "./AxisLabelPanelBaseView";
import { Rect } from "igniteui-angular-core";
import { Extensions } from "igniteui-angular-core";
import { Axis } from "./Axis";
import { List$1 } from "igniteui-angular-core";
import { AxisAngleLabelMode_$type } from "./AxisAngleLabelMode";
import { LabelPosition } from "./LabelPosition";
import { XamDataChart } from "./XamDataChart";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { IAngleScaler_$type } from "./IAngleScaler";
import { CategoryAxisRenderer } from "./CategoryAxisRenderer";
import { DependencyProperty } from "igniteui-angular-core";
import { PolarAxisRenderingManager } from "./PolarAxisRenderingManager";
import { AxisLabelManager } from "./AxisLabelManager";
import { ViewportUtils } from "./ViewportUtils";
import { GeometryUtil } from "igniteui-angular-core";
import { RadialAxisRenderingParameters } from "./RadialAxisRenderingParameters";
import { CategoryTickmarkValues } from "./CategoryTickmarkValues";
import { SeriesViewer } from "./SeriesViewer";
import { ScalerParams } from "./ScalerParams";
import { AxisRangeChangedEventArgs } from "./AxisRangeChangedEventArgs";
import { LineGeometry } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { RangeInfo } from "./RangeInfo";
import { isNaN_, isInfinity } from "igniteui-angular-core";
import { NumericAxisBase } from "./NumericAxisBase";
import { LogarithmicTickmarkValues } from "./LogarithmicTickmarkValues";
import { PolarAxisRenderingParameters } from "./PolarAxisRenderingParameters";
import { MathUtil } from "igniteui-angular-core";
import { RadialAxisLabelPanel } from "./RadialAxisLabelPanel";
import { LinearTickmarkValues } from "./LinearTickmarkValues";
import { IPolarRadialRenderingParameters_$type } from "./IPolarRadialRenderingParameters";
import { PathGeometry } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { ArcSegment } from "igniteui-angular-core";
import { Size } from "igniteui-angular-core";
import { CategoryAxisBaseView } from "./CategoryAxisBaseView";
import { AxisDefaults } from "./AxisDefaults";
import { NumericAxisBaseView } from "./NumericAxisBaseView";
/**
* @hidden
*/
export let AngleAxisLabelPanel = /*@__PURE__*/ (() => {
class AngleAxisLabelPanel extends AxisLabelPanelBase {
constructor() {
super();
this.da = false;
this.di = null;
this.df = 0;
this.dc = 0;
this.de = 0;
this.dd = 0;
this.db = 0;
}
ae() {
return new AngleAxisLabelPanelView(this);
}
ch(a) {
super.ch(a);
this.c9 = a;
}
at(a, b) {
if (!Extensions.b(b)) {
return false;
}
if (this.ad == null || this.ad.kh.isEmpty) {
return super.at(a, b);
}
return true;
}
a5() {
let a = new List$1(Rect.$, 0);
let b = new List$1(Boolean_$type, 0);
if (this.bb.count != this.ba.count) {
return a;
}
let c = 1;
if (typeCast(CategoryAngleAxis.$, this.ad) !== null) {
c = this.ad.mm();
}
else if (typeCast(NumericAngleAxis.$, this.ad) !== null) {
c = this.ad.n1();
}
if (c == 2) {
this.c9.a0(a, b);
}
else {
this.c9.a1(a, b);
}
let d = false;
this.ao = this.an(a, b);
if (!this.ad.b8()) {
d = true;
switch (c) {
case 1:
this.dk();
break;
case 2:
this.dj();
break;
}
}
else {
d = true;
this.c9.ac();
}
if (d) {
for (let e = 0; e < a.count; e++) {
let f = this.bb._inner[e];
let g = this.ba._inner[e];
let h = a._inner[e];
let i = this.di(g.c, h.width, h.height);
let j = i.x - this.bk(f) / 2;
let k = i.y - this.bj(f) / 2;
h.x = j;
h.y = k;
a._inner[e] = h;
}
}
return a;
}
dk() {
this.bh = this.df / 2;
this.bh = this.bh + this.dg();
}
dj() {
this.bh = 5;
this.bh = this.bh + this.dh();
}
dh() {
let a;
let b;
b = this.ad;
a = null;
if (b != null) {
a = typeCast(XamDataChart.$, b.bi);
}
if (a == null || b == null) {
return 0;
}
let c = new List$1(Axis.$, 0);
for (let d = 0; d < a.axes.count; d++) {
let e = a.axes._inner[d];
if ((typeCast(NumericAngleAxis.$, e) !== null || typeCast(CategoryAngleAxis.$, e) !== null) && typeCast(AngleAxisLabelPanel.$, e.aw) !== null && e.aw.bb.count > 0 && (!e.b8()) && !e.b5() && (e.aj == null || this.ad.aj == null || e.aj.n7 == b.aj.n7)) {
c.add(e);
}
}
let f = c.indexOf(b);
if (f == -1) {
return 0;
}
let g = 0;
if (f > 0) {
if (typeCast(CategoryAngleAxis.$, c._inner[f - 1]) !== null) {
let h = c._inner[f - 1];
if (h.ml == 2) {
g += h.aw.db;
}
else {
g += c._inner[f - 1].aw.bh;
}
}
else if (typeCast(NumericAngleAxis.$, c._inner[f - 1]) !== null) {
let i = c._inner[f - 1];
if (i.ml == 2) {
g += i.aw.db;
}
else {
g += c._inner[f - 1].aw.bh;
}
}
}
return g;
}
dg() {
let a;
let b;
b = this.ad;
a = null;
if (b != null) {
a = typeCast(XamDataChart.$, b.bi);
}
if (a == null || b == null) {
return 0;
}
let c = new List$1(Axis.$, 0);
for (let d = 0; d < a.axes.count; d++) {
let e = a.axes._inner[d];
if ((typeCast(NumericAngleAxis.$, e) !== null || typeCast(CategoryAngleAxis.$, e) !== null) && typeCast(AngleAxisLabelPanel.$, e.aw) !== null && e.aw.bb.count > 0 && (!e.b8()) && !e.b5() && (e.aj == null || this.ad.aj == null || e.aj.n7 == b.aj.n7)) {
c.add(e);
}
}
let f = c.indexOf(b);
if (f == -1) {
return 0;
}
let g = 0;
let h = 5;
if (f == 0) {
g += h;
}
else {
if (typeCast(CategoryAngleAxis.$, c._inner[f - 1]) !== null) {
let i = c._inner[f - 1];
if (i.ml == 2) {
g += i.aw.db;
}
else {
g += c._inner[f - 1].aw.bh;
}
}
else if (typeCast(NumericAngleAxis.$, c._inner[f - 1]) !== null) {
let j = c._inner[f - 1];
if (j.n0 == 2) {
g += j.aw.db;
}
else {
g += c._inner[f - 1].aw.bh;
}
}
g += c._inner[f].aw.bh * 2 + h;
}
return g;
}
ai() {
return 4;
}
ay(a) {
return a == 4 || a == 5;
}
}
AngleAxisLabelPanel.$t = markType(AngleAxisLabelPanel, 'AngleAxisLabelPanel', AxisLabelPanelBase.$);
return AngleAxisLabelPanel;
})();
/**
* @hidden
*/
export let CategoryAngleAxis = /*@__PURE__*/ (() => {
class CategoryAngleAxis extends CategoryAxisBase {
constructor() {
super();
this.mt = null;
this.mq = null;
this.mu = false;
this.m1 = NaN;
this.mr = null;
this.m2 = 0;
this.mz = 0;
this.m0 = 0;
this.nf = 1;
this.ab = CategoryAngleAxis.$;
this.mq = this.mp();
this.mt = new PolarAxisRenderingManager();
}
a4() {
return new CategoryAngleAxisView(this);
}
hv(a) {
super.hv(a);
this.mo = a;
}
get_b9() {
return true;
}
av() {
let a = new AngleAxisLabelPanel();
a.di = (b, c, d) => {
let e = this.bi != null ? this.bi.v4 : Rect.empty;
let f = !e.isEmpty ? this.kh : Rect.empty;
let g = this.kc();
switch (this.ml) {
case 2: return this.nw(b, c, d, { $type: Point_$type, x: 0.5, y: 0.5 }, e, f, g, this.aw.bh);
case 0:
case 1:
default: return this.nx(b, { $type: Point_$type, x: 0.5, y: 0.5 }, e, f, g, this.aw.bh);
}
};
return a;
}
mx(a) {
return false;
}
nk() {
return null;
}
nd(a) {
return Math.round(a * Math.pow(10, 10)) / Math.pow(10, 10);
}
mp() {
let a = ((() => {
let $ret = new AxisLabelManager();
$ret.a = this;
$ret.f = this.de;
$ret.e = this.dd;
$ret.b = this.aw;
return $ret;
})());
if (this.az != null) {
this.az.registerAxis(this);
}
let b = new CategoryAxisRenderer(a);
b.u = () => {
let c = this.a5.a4();
let d = this.a5.a7();
let e = this.a5.a5();
let f = this.a5.a6();
this.ip();
this.hk(c);
this.hk(d);
this.hk(e);
this.hk(f);
};
b.o = (c, d) => !d.isEmpty && !c.isEmpty && this.ms != null;
b.d = (c, d, e, f) => this.mn(c, d, e, f);
b.v = () => {
if (!this.mu) {
this.mu = true;
this.ms.c1();
this.mu = false;
}
};
b.g = (c, d) => {
let e = typeGetValue(c);
if (e == this.lj - 1) {
if (this.cl) {
if (this.mx(e)) {
return this.nk();
}
}
}
if (e > this.lj - 1) {
e -= this.lj;
}
if (this.my(e)) {
return null;
}
let f = this.kv.item(e);
return this.f1(f);
};
b.b.c = (c) => {
if ((this.az == null || this.az.visibility == 0) && this.ms != null && this.m1 != c) {
let d = typeCast(XamDataChart.$, this.bi);
if (d == null) {
return;
}
this.m1 = c;
this.aw.bg = c;
d.n3();
for (let e of fromEnum(d.axes)) {
if (e != this && typeCast(AngleAxisLabelPanel.$, e.aw) !== null) {
e.a5.ai();
}
}
}
};
b.k = (c, d, e) => {
let f = typeCast(RadialAxisRenderingParameters.$, c);
this.mt.o(d, e, c.aa, c.z, c.ab, f.minLength, f.maxLength, f.center);
};
b.l = (c, d, e, f) => {
let g = typeCast(RadialAxisRenderingParameters.$, c);
this.mt.p(d, e, f, g.aa, g.z, c.ab, g.minLength, g.maxLength, g.center);
};
b.m = (c, d) => this.getScaledAngle(d);
b.q = (c, d) => {
if (this.nd(d - this.m2) < 0) {
return false;
}
if (this.nd(d - this.m2 - (2 * Math.PI)) > 0) {
return false;
}
return true;
};
b.j = (c) => {
let d = typeCast(RadialAxisRenderingParameters.$, c);
if (d.e == d.k._inner[0]) {
this.mt.k(c.u, c.n, c.aa, c.z, c.ab, d.center, d.minAngle, d.maxAngle);
}
};
b.e = (c) => {
c.n = this.m5();
c.r = c.n;
};
b.p = (c, d, e) => {
let f = typeCast(RadialAxisRenderingParameters.$, c);
if (e) {
return false;
}
let g = this.nx(d, f.center, c.ab, c.aa, c.z, 0);
if (g.x < c.aa.right && g.x >= c.aa.left && g.y < c.aa.bottom && g.y >= c.aa.top) {
return true;
}
return false;
};
b.a = (c, d, e, f) => {
let g = c.z;
let h = new ScalerParams(0, c.ab, c.aa, this.ch, g);
let i = d;
if (this.categoryMode != 0) {
let j = (e * f) + 1;
j = Math.min(j, this.lj);
let k = this.el(j, h);
i = (d + k) / 2;
}
return i;
};
b.f = runOn(this, this.getGroupCenter);
b.i = runOn(this, this.na);
return b;
}
my(a) {
return false;
}
nx(a, b, c, d, e, f) {
let g = this.m5();
let h = ViewportUtils.a(f, c, d, e);
if (this.az != null && (this.az.c == 5 || this.az.c == 1)) {
h *= -1;
}
let i = b.x + (g + h) * Math.cos(a);
let j = b.y + (g + h) * Math.sin(a);
i = ViewportUtils.e(i, c, d, e);
j = ViewportUtils.i(j, c, d, e);
return { $type: Point_$type, x: i, y: j };
}
nw(a, b, c, d, e, f, g, h) {
if (!isNaN_(b) && !isNaN_(c)) {
let i = this.m5();
let j = b / f.width;
let k = c / f.width;
let l = ViewportUtils.a(h, e, f, g);
let m = GeometryUtil.l(i, a, j, k);
let n = d.x + (m + l) * Math.cos(a);
let o = d.y + (m + l) * Math.sin(a);
n = ViewportUtils.e(n, e, f, g);
o = ViewportUtils.i(o, e, f, g);
return { $type: Point_$type, x: n, y: o };
}
else {
return this.nx(a, d, e, f, g, h);
}
}
m5() {
if (this.ms == null) {
return 0;
}
if (!this.b5()) {
return this.ms.oc();
}
else {
return this.ms.od((this.fx));
}
}
mn(a, b, c, d) {
if (this.kv == null) {
return null;
}
let e = new RadialAxisRenderingParameters();
let f = this.lk - 1;
let g = this.a5.a4();
let h = this.a5.a7();
let i = this.a5.a5();
let j = this.a5.a6();
e.u = g;
e.x = h;
e.v = i;
e.w = j;
e.l = f;
e.m = 0;
e.h = false;
e.aa = a;
e.z = c;
e.y = d;
e.ab = b;
e.g = this.mw();
e.p = this.nb;
e.o = this.e0();
e.s = this.nh();
e.q = this.nc;
e.t = this.f2;
let k = this.mt.h(b, a, c);
let l = this.mt.i(b, a, c);
let m = 0.5 * this.ms.n7;
let n = 0.5 * this.ms.n6;
let o = k;
let p = l;
let q = this.ms.oc();
if (isNaN_(q) || isInfinity(q)) {
return null;
}
if (p >= m) {
p = q;
}
if (o < n) {
o = n;
}
let r = a.width;
this.mt.m(b, a, c, e, 0, this.lk, this.ch, runOn(this, this.getUnscaledAngle), r);
let s = { $type: Point_$type, x: 0.5, y: 0.5 };
e.center = s;
e.maxLength = p;
e.minLength = o;
e.effectiveMaximum = q;
e.af = this.lk;
e.ac = this.categoryMode;
e.ae = true;
e.ad = this.ch;
e.ag = this.ll;
e.f = new CategoryTickmarkValues();
e.j = this.cy;
return e;
}
nh() {
return -1;
}
getMinMaxAngle(a, b, c, d, e) {
let f = this.mt.n(a, b, c, d, e);
d = f.p3;
e = f.p4;
return {
p3: d,
p4: e
};
}
ac() {
super.ac();
this.ib(false);
}
get ms() {
if (this.mr != null) {
return this.mr;
}
let a = typeCast(XamDataChart.$, this.bi);
if (a != null) {
for (let b = 0; b < a.axes.count; b++) {
if (typeCast(NumericRadiusAxis.$, a.axes._inner[b]) !== null) {
return a.axes._inner[b];
}
}
}
return this.mr;
}
set ms(a) {
this.mr = a;
}
ak() {
return this.ms;
}
mm() {
if (this.ml == 0) {
return 1;
}
else {
return this.ml;
}
}
getCategorySize(a, b, c) {
return 2 * Math.PI / this.lj;
}
get_mv() {
return false;
}
get mv() {
return this.get_mv();
}
m7(a, b, c, d) {
return this.k8(b, c, d);
}
k8(a, b, c) {
let d = this.lf(a, b, c);
let e = 0;
if (!isNaN_(this.le)) {
e = Math.min(this.le, 1);
}
let f = 1 - 0.5 * d;
return this.getCategorySize(a, b, c) * f / (this.ll - (this.ll - 1) * e);
}
m6(a, b, c, d, e) {
return this.getGroupCenter(b, c, d, e);
}
getGroupCenter(a, b, c, d) {
let e = 0.5;
if (this.ll > 1) {
let f = this.lf(b, c, d);
let g = 0;
if (!isNaN_(this.le)) {
g = Math.min(this.le, 1);
}
let h = 1 - 0.5 * f;
let i = h / (this.ll - (this.ll - 1) * g);
let j = (h - i) / (this.ll - 1);
e = 0.25 * f + 0.5 * i + a * j;
}
return this.getCategorySize(b, c, d) * e;
}
na(a) {
let b = 0.5;
if (this.ll > 1) {
let c = this.lf(Rect.empty, Rect.empty, Rect.empty);
let d = 0;
if (!isNaN_(this.le)) {
d = Math.min(this.le, 1);
}
let e = 1 - 0.5 * c;
let f = e / (this.ll - (this.ll - 1) * d);
let g = (e - f) / (this.ll - 1);
b = 0.25 * c + 0.5 * f + a * g;
}
return b;
}
ic(a) {
super.ic(a);
let b = this.bi != null ? this.bi.v4 : Rect.empty;
let c = !b.isEmpty ? this.kh : Rect.empty;
let d = this.kc();
let e = this.kb();
let f = this.mq.c(a, c, b, d, e);
if (f != null) {
this.m3 = f.f.m;
this.m4 = f.f.l;
}
}
m9(a, b, c) {
let d;
let e;
let f = this.mt.n(c, a, b, d, e);
d = f.p3;
e = f.p4;
if (d == 0) {
if (this.ch) {
return this.lj;
}
else {
return 0;
}
}
let g = this.getUnscaledAngle(d);
if (g < 0 || g > this.lj) {
g = this.getUnscaledAngle(d + Math.PI * 2);
}
return g;
}
m8(a, b, c) {
let d;
let e;
let f = this.mt.n(c, a, b, d, e);
d = f.p3;
e = f.p4;
if (e > Math.PI * 2) {
e = e - Math.PI * 2;
}
if (e == Math.PI * 2) {
if (this.ch) {
return 0;
}
else {
return this.lj;
}
}
let g = this.getUnscaledAngle(e);
if (g < 0 || g > this.lj) {
g = this.getUnscaledAngle(e + Math.PI * 2);
}
return g;
}
getScaledAngle(a) {
let b = this.lj;
let c = b >= 2 ? (a) / (b) : b == 1 ? 0.5 : NaN;
if (this.ci) {
c = 1 - c;
}
return (c * 2 * Math.PI) + this.m2;
}
getUnscaledAngle(a) {
if (a < this.m2) {
a += 2 * Math.PI;
}
let b = (a - this.m2) / (2 * Math.PI);
if (this.ch) {
b = 1 - b;
}
return b * (this.lj);
}
el(a, b) {
return this.getScaledAngle(a);
}
eo(a, b) {
return this.getUnscaledAngle(a);
}
d5(a) {
let b = { $type: Point_$type, x: 0.5, y: 0.5 };
let c = Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2));
let d = Math.acos((a.x - b.x) / c);
if ((a.y - b.y) < 0) {
d = (2 * Math.PI) - d;
}
return d;
}
hz(a, b, c, d) {
super.hz(a, b, c, d);
let e = typeCast(XamDataChart.$, this.bi);
switch (b) {
case "CrossingAxis":
let f = typeCast(NumericRadiusAxis.$, d);
this.nr(f);
if (f != null) {
f.om(this);
}
this.cq = true;
this.ib(false);
break;
case CategoryAngleAxis.$$p[1]:
this.m2 = this.ne;
while (this.m2 < 0) {
this.m2 += 360;
}
while (this.m2 >= 360) {
this.m2 -= 360;
}
this.m2 = (this.m2 * Math.PI) / 180;
this.cq = true;
this.ib(false);
for (let g of fromEnum(this.df)) {
g.rq(false);
g.qk();
}
break;
case "Label":
case CategoryAngleAxis.$$p[0]:
if (e != null) {
for (let h of fromEnum(e.axes)) {
h.cq = true;
h.ia();
}
}
break;
case "CrossingValue":
if (e != null) {
for (let i of fromEnum(e.axes)) {
if (typeCast(NumericAngleAxis.$, i) !== null || typeCast(CategoryAngleAxis.$, i) !== null) {
i.cq = true;
i.ia();
}
}
}
break;
case "LabelSettings":
this.mq = this.mp();
this.np();
this.cq = true;
this.ib(false);
break;
}
}
np() {
this.m1 = NaN;
}
nr(a) {
this.ms = a;
}
get nb() {
return this.c(CategoryAngleAxis.ns);
}
set nb(a) {
this.h(CategoryAngleAxis.ns, a);
}
get m3() {
return this.mz;
}
set m3(a) {
if (this.m3 != a) {
let b = this.mz;
this.mz = a;
this.h5("ActualInterval", b, this.m3);
}
}
ex() {
return this.m3;
}
get nc() {
return this.c(CategoryAngleAxis.nu);
}
set nc(a) {
this.h(CategoryAngleAxis.nu, a);
}
get m4() {
return this.m0;
}
set m4(a) {
if (this.m4 != a) {
let b = this.m0;
this.m0 = a;
this.h5("ActualMinorInterval", b, this.m4);
}
}
mw() {
return !isNaN_(this.nb);
}
get_a2() {
return 2;
}
get a2() {
return this.get_a2();
}
c3() {
if (this.cq && this.c4) {
this.bc = this.bb();
}
if (this.kv == null) {
return false;
}
let a = this.kv.count;
if (a != this.ng) {
let b = new AxisRangeChangedEventArgs(0, 1, 1, this.ng, a);
this.ng = a;
this.h6(b);
return true;
}
return false;
}
get ng() {
return this.nf;
}
set ng(a) {
this.nf = a;
}
j8(a, b, c, d, e) {
let f = typeCast(RadialAxisRenderingParameters.$, this.mq.d(c, b, d, e));
if (f == null) {
return null;
}
let g = Math.cos(a);
let h = Math.sin(a);
let i = f.center.x + g * f.minLength;
let j = f.center.y + h * f.minLength;
let k = f.center.x + g * f.maxLength;
let l = f.center.y + h * f.maxLength;
i = ViewportUtils.e(i, b, c, d);
j = ViewportUtils.i(j, b, c, d);
k = ViewportUtils.e(k, b, c, d);
l = ViewportUtils.i(l, b, c, d);
let m = new LineGeometry();
m.d = { $type: Point_$type, x: i, y: j };
m.c = { $type: Point_$type, x: k, y: l };
return m;
}
get isVertical() {
return this.cp;
}
j$d(a, b) {
return this.eo.apply(this, arguments);
}
j$c(a, b) {
return this.el.apply(this, arguments);
}
j$e(a, b, c, d, e) {
this.hp.apply(this, arguments);
}
j$f(a, b, c, d) {
this.hq.apply(this, arguments);
}
j$g(a, b, c, d) {
this.hr.apply(this, arguments);
}
get j$b() {
return this.ch;
}
j$a() {
return this.ag.apply(this, arguments);
}
}
CategoryAngleAxis.$t = markType(CategoryAngleAxis, 'CategoryAngleAxis', CategoryAxisBase.$, [IAngleScaler_$type]);
CategoryAngleAxis.ns = DependencyProperty.i("Interval", Number_$type, CategoryAngleAxis.$, new PropertyMetadata(2, NaN, (a, b) => {
a.h5("Interval", b.oldValue, b.newValue);
a.ib(false);
}));
CategoryAngleAxis.nu = DependencyProperty.i("MinorInterval", Number_$type, CategoryAngleAxis.$, new PropertyMetadata(2, NaN, (a, b) => {
(typeCast(CategoryAngleAxis.$, a)).h5("MinorInterval", b.oldValue, b.newValue);
(typeCast(CategoryAngleAxis.$, a)).ib(false);
}));
CategoryAngleAxis.$$p = markDep(DependencyProperty, PropertyMetadata, CategoryAngleAxis, 'h5', ['LabelMode:ml:nt', [AxisAngleLabelMode_$type, enumGetBox(AxisAngleLabelMode_$type, 0)], 'StartAngleOffset:ne:nv', [1, 0]]);
return CategoryAngleAxis;
})();
/**
* @hidden
*/
export let NumericAngleAxis = /*@__PURE__*/ (() => {
class NumericAngleAxis extends NumericAxisBase {
constructor() {
super();
this.n5 = null;
this.n6 = false;
this.n7 = NaN;
this.n8 = 0;
this.n3 = null;
this.ab = NumericAngleAxis.$;
this.n5 = new PolarAxisRenderingManager();
this.k4 = this.k2();
}
a4() {
return new NumericAngleAxisView(this);
}
hv(a) {
super.hv(a);
this.n2 = a;
}
get_b9() {
return true;
}
av() {
let a = new AngleAxisLabelPanel();
a.di = (b, c, d) => {
let e = this.bi != null ? this.bi.v4 : Rect.empty;
let f = !e.isEmpty ? this.kh : Rect.empty;
let g = this.kc();
return this.ok(b, { $type: Point_$type, x: 0.5, y: 0.5 }, e, f, g, this.aw.bh);
};
return a;
}
n9() {
if (this.n4 == null) {
return 0;
}
if (!this.b5()) {
return this.n4.oc();
}
else {
return this.n4.od((this.fx));
}
}
ob(a) {
return Math.round(a * Math.pow(10, 10)) / Math.pow(10, 10);
}
k2() {
let a = super.k2();
a.b.c = (b) => {
if ((this.az == null || this.az.visibility == 0) && this.n4 != null && this.n7 != b) {
let c = typeCast(XamDataChart.$, this.bi);
if (c == null) {
return;
}
this.n7 = b;
this.aw.bg = b;
c.n3();
for (let d of fromEnum(c.axes)) {
if (d != this && typeCast(AngleAxisLabelPanel.$, d.aw) !== null) {
d.a5.ai();
}
}
}
};
a.e = (b) => {
b.n = this.n9();
b.r = b.n;
};
a.j = (b) => {
let c = typeCast(PolarAxisRenderingParameters.$, b);
if (c.e == c.k._inner[0]) {
this.n5.k(b.u, b.n, b.aa, b.z, b.ab, c.center, c.minAngle, c.maxAngle);
}
};
a.k = (b, c, d) => {
let e = typeCast(PolarAxisRenderingParameters.$, b);
this.n5.o(c, d, b.aa, b.z, b.ab, e.minLength, e.maxLength, e.center);
};
a.l = (b, c, d, e) => {
let f = typeCast(PolarAxisRenderingParameters.$, b);
this.n5.p(c, d, e, f.aa, f.z, b.ab, f.minLength, f.maxLength, f.center);
};
a.d = (b, c, d, e) => {
let f = typeCast(PolarAxisRenderingParameters.$, this.k5(b, c, d, e));
return f;
};
a.v = () => {
if (!this.n6) {
this.n6 = true;
this.n4.c1();
this.n6 = false;
}
};
a.m = (b, c) => this.getScaledAngle(c);
a.o = (b, c) => !c.isEmpty && !b.isEmpty && this.n4 != null;
a.q = (b, c) => {
if (this.ob(c - this.n8) < 0) {
return false;
}
if (this.ob(c - this.n8 - (2 * Math.PI)) > 0) {
return false;
}
return true;
};
a.p = (b, c, d) => {
let e = typeCast(PolarAxisRenderingParameters.$, b);
let f = this.ok(this.getScaledAngle(e.l), e.center, b.ab, b.aa, b.z, 0);
let g = this.ok(c, e.center, b.ab, b.aa, b.z, 0);
if (d && MathUtil.g(f.x - g.x, f.y - g.y) < 2) {
return false;
}
if (g.x < b.aa.right && g.x >= b.aa.left && g.y < b.aa.bottom && g.y >= b.aa.top) {
return true;
}
return false;
};
a.r = (b, c, d, e) => {
if (c < b.m && typeCast(LogarithmicTickmarkValues.$, b.f) !== null) {
return b.m;
}
else if (c > b.l && (typeCast(LogarithmicTickmarkValues.$, b.f) !== null || b.h)) {
return b.l;
}
return c;
};
return a;
}
ok(a, b, c, d, e, f) {
let g = this.n9();
let h = ViewportUtils.a(f, c, d, e);
if (this.az != null && (this.az.c == 5 || this.az.c == 1)) {
h *= -1;
}
let i = b.x + (g + h) * Math.cos(a);
let j = b.y + (g + h) * Math.sin(a);
i = ViewportUtils.e(i, c, d, e);
j = ViewportUtils.i(j, c, d, e);
return { $type: Point_$type, x: i, y: j };
}
el(a, b) {
return this.getScaledAngle(a);
}
getScaledAngle1(a, b, c) {
let d = 0;
if (b) {
d = (Math.log(a) - this.ma) / (this.l9 - this.ma);
}
else {
d = (a - this.l4) / (this.l3 - this.l4);
}
if (c) {
d = 1 - d;
}
return (d * 2 * Math.PI) + this.n8;
}
getScaledAngle(a) {
return this.getScaledAngle1(a, this.lp, this.ci);
}
eo(a, b) {
return this.getUnscaledAngle(a);
}
getUnscaledAngle(a) {
let b = (a - this.n8) / (2 * Math.PI);
if (this.ch) {
b = 1 - b;
}
if (this.lp) {
return Math.exp(b * (this.l9 - this.ma) + this.ma);
}
else {
return this.l4 + b * (this.l3 - this.l4);
}
}
n1() {
if (this.n0 == 0) {
return 1;
}
else {
return this.n0;
}
}
hz(a, b, c, d) {
super.hz(a, b, c, d);
let e = typeCast(XamDataChart.$, this.bi);
switch (b) {
case "CrossingAxis":
let f = typeCast(NumericRadiusAxis.$, d);
this.oh(f);
if (f != null) {
f.om(this);
}
this.ib(false);
break;
case NumericAngleAxis.$$p[1]:
this.n8 = this.oc;
while (this.n8 < 0) {
this.n8 += 360;
}
while (this.n8 >= 360) {
this.n8 -= 360;
}
this.n8 = (this.oc * Math.PI) / 180;
this.ib(false);
for (let g of fromEnum(this.db())) {
g.rq(false);
g.qk();
}
break;
case "Label":
if (e != null) {
for (let h of fromEnum(e.axes)) {
h.ia();
}
}
break;
case "CrossingValue":
if (e != null) {
for (let i of fromEnum(e.axes)) {
if (typeCast(NumericAngleAxis.$, i) !== null || typeCast(CategoryAngleAxis.$, i) !== null) {
i.ia();
}
}
}
break;
case "LabelSettings":
this.k4 = this.k2();
this.of();
this.cq = true;
this.ib(false);
break;
}
}
of() {
this.n7 = NaN;
}
k6() {
return new PolarAxisRenderingParameters();
}
k5(a, b, c, d) {
let e = typeCast(PolarAxisRenderingParameters.$, super.k5(a, b, c, d));
let f = this.n5.h(b, a, c);
let g = this.n5.i(b, a, c);
let h = 0.5 * this.n4.n7;
let i = 0.5 * this.n4.n6;
let j = f;
let k = g;
let l = this.n4.oc();
if (isNaN_(l) || isInfinity(l)) {
return null;
}
if (k >= h) {
k = l;
}
if (j < i) {
j = i;
}
let m = a.width;
this.n5.m(b, a, c, e, this.l4, this.l3, this.ch, runOn(this, this.getUnscaledAngle), m);
let n = { $type: Point_$type, x: 0.5, y: 0.5 };
e.center = n;
e.maxLength = k;
e.minLength = j;
e.effectiveMaximum = l;
return e;
}
getMinMaxAngle(a, b, c, d, e) {
let f = this.n5.n(a, b, c, d, e);
d = f.p3;
e = f.p4;
return {
p3: d,
p4: e
};
}
ic(a) {
super.ic(a);
let b = this.bi != null ? this.bi.v4 : Rect.empty;
let c = !b.isEmpty ? this.kh : Rect.empty;
let d = this.kc();
let e = this.kb();
let f = this.k4.c(a, c, b, d, e);
if (f != null) {
this.l2 = f.f.m;
this.l5 = f.f.l;
}
}
get n4() {
if (this.n3 != null) {
return this.n3;
}
let a = typeCast(XamDataChart.$, this.bi);
if (a != null) {
for (let b = 0; b < a.axes.count; b++) {
if (a.axes._inner[b].cm) {
return a.axes._inner[b];
}
}
}
return this.n3;
}
set n4(a) {
this.n3 = a;
}
ak() {
return this.n4;
}
oh(a) {
this.n4 = a;
}
is(a, b) {
super.is(a, b);
if (b.height != a.height || b.width != a.width) {
this.c1();
}
}
get_a2() {
return 2;
}
get a2() {
return this.get_a2();
}
j8(a, b, c, d, e) {
if (this.n4 == null) {
return null;
}
let f = typeCast(PolarAxisRenderingParameters.$, this.k5(c, b, d, e));
if (f == null) {
return null;
}
let g = Math.cos(a);
let h = Math.sin(a);
let i = f.center.x + g * f.minLength;
let j = f.center.y + h * f.minLength;
let k = f.center.x + g * f.maxLength;
let l = f.center.y + h * f.maxLength;
i = ViewportUtils.e(i, b, c, d);
j = ViewportUtils.i(j, b, c, d);
k = ViewportUtils.e(k, b, c, d);
l = ViewportUtils.i(l, b, c, d);
let m = new LineGeometry();
m.d = { $type: Point_$type, x: i, y: j };
m.c = { $type: Point_$type, x: k, y: l };
return m;
}
}
NumericAngleAxis.$t = markType(NumericAngleAxis, 'NumericAngleAxis', NumericAxisBase.$, [IAngleScaler_$type]);
NumericAngleAxis.$$p = markDep(DependencyProperty, PropertyMetadata, NumericAngleAxis, 'h5', ['LabelMode:n0:oi', [AxisAngleLabelMode_$type, enumGetBox(AxisAngleLabelMode_$type, 0)], 'StartAngleOffset:oc:oj', [1, 0]]);
return NumericAngleAxis;
})();
/**
* @hidden
*/
export let NumericRadiusAxis = /*@__PURE__*/ (() => {
class NumericRadiusAxis extends NumericAxisBase {
constructor() {
super();
this.n3 = null;
this.n4 = false;
this.n5 = NaN;
this.n7 = 0;
this.n6 = 0;
this.n9 = 0;
this.n0 = null;
this.ab = NumericRadiusAxis.$;
this.n7 = this.oh;
this.n6 = this.og;
this.n3 = new PolarAxisRenderingManager();
this.k4 = this.k2();
}
a4() {
return new NumericRadiusAxisView(this);
}
hv(a) {
super.hv(a);
this.n2 = a;
}
get_cm() {
return true;
}
ek() {
let a = this.n7;
let b = this.n6;
let c = Math.min(this.ob(), this.oa()) * (a - b) / 2;
c = Math.max(c, 14);
return c;
}
ob() {
return this.kh.width;
}
oa() {
return this.kh.height;
}
av() {
return new RadialAxisLabelPanel();
}
n8(a) {
if (a == null) {
return 0;
}
return a;
}
k2() {
let a = super.k2();
a.b.c = (b) => {
if ((this.az == null || this.az.visibility == 0) && this.n1 != null) {
if ((this.az == null || (this.az.c == 4 || this.az.c == 5)) && this.n5 != b) {
this.n5 = b;
this.aw.bg = b;
this.bi.n3();
}
}
};
a.k = (b, c, d) => {
let e = typeCast(PolarAxisRenderingParameters.$, b);
this.n3.k(c, d, e.aa, e.z, e.ab, e.center, e.minAngle, e.maxAngle);
};
a.l = (b, c, d, e) => {
if (d == e) {
return;
}
let f = typeCast(PolarAxisRenderingParameters.$, b);
this.n3.l(c, d, e, f.aa, f.z, f.ab, f.center, f.minAngle, f.maxAngle);
};
a.m = (b, c) => this.od(c);
a.q = (b, c) => {
let d = typeCast(PolarAxisRenderingParameters.$, b);
return c <= d.effectiveMaximum;
};
a.n = (b, c) => {
let d = typeCast(PolarAxisRenderingParameters.$, b);
return c <= d.effectiveMaximum;
};
a.j = (b) => {
let c = typeCast(PolarAxisRenderingParameters.$, b);
this.n3.o(b.u, c.crossingAngleRadians, b.aa, b.z, b.ab, c.minLength, c.maxLength, c.center);
};
a.e = (b) => {
b.n = this.az == null || (this.az.c == 4 || this.az.c == 0) ? b.aa.top : b.aa.bottom;
b.r = b.n;
let c = typeCast(PolarAxisRenderingParameters.$, b);
c.crossingAngleRadians = (this.n8(this.fx) * Math.PI) / 180;
if (this.az == null || (this.az.c == 4 || this.az.c == 5)) {
c.n = ViewportUtils.i(0.5, c.ab, c.aa, c.z) - b.aa.top;
c.r = c.n;
let d = typeCast(RadialAxisLabelPanel.$, this.aw);
if (d != null) {
let e = 0;
if (this.az != null && this.az.c == 4) {
e = 1;
}
d.dy = { $type: Point_$type, x: ViewportUtils.e(0.5, c.ab, c.aa, c.z), y: e };
d.dv = c.crossingAngleRadians;
}
}
};
a.p = (b, c, d) => {
let e = typeCast(PolarAxisRenderingParameters.$, b);
if (this.n1 == null) {
return false;
}
if (c > e.effectiveMaximum) {
return false;
}
let f = false;
f = this.az == null || (this.az.c == 4 || this.az.c == 5);
let g = 0;
if (f) {
g = this.n9;
}
let h = e.center.x + c * Math.cos(g);
let i = e.center.y + c * Math.sin(g);
h = ViewportUtils.e(h, e.ab, e.aa, e.z);
i = ViewportUtils.i(i, e.ab, e.aa, e.z);
if (h <= b.aa.right && h >= b.aa.left && ((i <= b.aa.bottom && i >= b.aa.top) || !f)) {
return true;
}
return false;
};
a.h = (b, c) => {
let d = typeCast(PolarAxisRenderingParameters.$, b);
return new LabelPosition(ViewportUtils.e(d.center.x + c, d.ab, d.aa, d.z));
};
a.r = (b, c, d, e) => {
if (c < b.m) {
return b.m;
}
else if (c > b.l) {
return b.l;
}
return c;
};
return a;
}
el(a, b) {
return this.od(a);
}
oe(a, b, c, d, e) {
let f = 0;
if (b) {
if (a <= 0) {
f = (Math.log(this.l4) - this.ma) / (this.l9 - this.ma);
}
else {
f = (Math.log(a) - this.ma) / (this.l9 - this.ma);
}
}
else {
f = (a - this.l4) / (this.l3 - this.l4);
}
if (c) {
f = 1 - f;
}
f = e + (f * (d - e));
f /= 2;
return f;
}
od(a) {
return this.oe(a, this.lp, this.ci, this.n7, this.n6);
}
of(a) {
let b = a * 2;
b = (b - this.n6) / (this.n7 - this.n6);
if (this.ch) {
b = 1 - b;
}
if (this.lp) {
return Math.exp(b * (this.l9 - this.ma) + this.ma);
}
else {
return this.l4 + b * (this.l3 - this.l4);
}
}
eo(a, b) {
return this.of(a);
}
hz(a, b, c, d) {
switch (b) {
case "CrossingValue":
this.n9 = this.n8(this.fx) * Math.PI / 180;
break;
}
super.hz(a, b, c, d);
switch (b) {
case NumericRadiusAxis.$$p[1]:
this.n7 = this.oh;
if (this.n7 < 0) {
this.n7 = 0.1;
}
if (this.n7 > 1) {
this.n7 = 1;
}
if (this.n6 >= this.n7) {
th