UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

351 lines (350 loc) 12.5 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 { AnnotationLayer } from "./AnnotationLayer"; import { DependencyProperty } from "igniteui-react-core"; import { Series } from "./Series"; import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode"; import { Brush } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { FinalValueLayerFrame } from "./FinalValueLayerFrame"; import { List$1 } from "igniteui-react-core"; import { Axis } from "./Axis"; import { Dictionary$2 } from "igniteui-react-core"; import { Pool$1 } from "igniteui-react-core"; import { AxisAnnotation } from "./AxisAnnotation"; import { Base, enumGetBox, fromEnum, Point_$type, markType, markDep } from "igniteui-react-core"; import { AxisAnnotationFramePrepareSettings } from "./AxisAnnotationFramePrepareSettings"; import { AxisAnnotationFrameManager } from "./AxisAnnotationFrameManager"; import { PropertyMetadata } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { BrushUtil } from "igniteui-react-core"; /** * @hidden */ export let FinalValueLayer = /*@__PURE__*/ (() => { class FinalValueLayer extends AnnotationLayer { bk() { return new FinalValueLayer(); } get_et() { return true; } constructor() { super(); this.axisAnnotationFormatLabel = null; this.aay = null; this.aax = null; let a = new FinalValueLayerFrame(); let b = new FinalValueLayerFrame(); let c = new FinalValueLayerFrame(); let d = this.km / 1000; this.xx = a; this.xw = b; this.xy = c; this.ab = FinalValueLayer.$; } ct() { return new FinalValueLayerView(this); } rh(a) { super.rh(a); this.aat = a; } get ab3() { return new Thickness(1, this.aa1, this.aa3, this.aa2, this.aa0); } aaw() { return this.axisAnnotationFormatLabel != null; } zd(a, b) { if (this.aav == null || this.aav == a) { if (!this.a1.c) { this.r8(b); } } } zf(a, b) { super.zf(a, b); let c = a; c.i.clear(); c.ad.clear(); c.ac.clear(); c.ax.clear(); c.ab.clear(); c.aw.clear(); c.k.clear(); c.j.clear(); c.t.clear(); c.v.clear(); c.x.clear(); c.w.clear(); c.u.clear(); c.y.clear(); c.z.clear(); c.af.clear(); c.ae.clear(); c.ao.clear(); c.aq.clear(); c.as.clear(); c.ar.clear(); c.ap.clear(); c.at.clear(); c.au.clear(); if (this.x4(this.aav)) { this.abk(this.aav, c); } else { for (let d of fromEnum(this.dc.b9)) { if (this.x4(d)) { this.abk(d, c); } if (d.isStacked) { d.qh((e) => { if (this.x4(e)) { this.abk(e, c); } if (e.ei) { e.qf((f) => { if (this.x4(f)) { this.abk(f, c); } return true; }); } return true; }); } if (d.ei) { d.qf((e) => { if (this.x4(e)) { this.abk(e, c); } return true; }); } } } } x4(a) { if (!super.x4(a)) { return false; } if (this.abh != null) { if (a.isFragment) { let b = a.nn(); if (!Base.equalsStatic(this.abh, b)) { return false; } } else { if (!Base.equalsStatic(this.abh, a.name)) { return false; } } } return true; } q4() { super.q4(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.abl(this.xy, false); } else { this.abl(this.xw, false); } } ab2(a) { let b = NaN; let c = NaN; let d = this.aau; if (d == 0) { d = 1; } let e = false; if (d == 2) { e = true; } if (a.isVertical) { let f = a.a0(); if (f != null) { if (d == 1 || d == 2) { let g = this.w4(this.cw); if (f.dn) { c = a.w2({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.w2({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.dn) { c = 1; } else { c = 0; } } } return a.ww({ $type: Point_$type, x: 0, y: c }, e, true); } else { let h = a.a0(); if (h != null) { if (d == 1 || d == 2) { let i = this.w4(this.cw); if (h.dn) { b = a.w2({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.w2({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.dn) { b = 0; } else { b = 1; } } } if (a.fa) { return a.ww({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.ww({ $type: Point_$type, x: b, y: 0 }, e, true); } } } abk(a, b) { let c = this.ab2(a); let d = this.w2(c); let e = this.vt; if (e == null) { e = this.vz; } if (e == null) { e = a.vt; if (e != null) { e = this.aat.co(e); } } let f = new AxisAnnotationFramePrepareSettings(); f.u = this.abz; f.y = this.ab1; f.x = this.ab0; f.g = this.aaz; f.ae = this.ab3; f.l = this.aa4; f.c = this._visibility == 0 && a.isVertical; f.z = this.abz; f.ad = this.ab1; f.ac = this.ab0; f.m = this.aaz; f.af = this.ab3; f.r = this.aa4; f.d = this._visibility == 0 && !a.isVertical; AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, f); } abl(a, b) { let c = false; if (this.aax == null) { c = true; this.aay = new List$1(Axis.$, 0); this.aax = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aax, this.aay, b, this.aa5, this.aa5, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); } zi(a, b) { super.zi(a, b); if (this.d4()) { this.abl(this.xy, true); } else { this.abl(this.xw, false); } } gg() { return true; } rq(a, b, c, d) { super.rq(a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.r8(true); break; case FinalValueLayer.$$p[1]: case FinalValueLayer.$$p[0]: case FinalValueLayer.$$p[3]: case FinalValueLayer.$$p[5]: case FinalValueLayer.$$p[7]: case FinalValueLayer.$$p[6]: case FinalValueLayer.$$p[4]: case "Visibility": case FinalValueLayer.$$p[8]: case FinalValueLayer.$$p[9]: case FinalValueLayer.$$p[10]: this.r8(true); break; case "SeriesViewer": let e = this.aay; let f = this.aax; if (f != null) { for (let g of fromEnum(f)) { let h = g.value; h.c((i) => g.key.as.remove(i)); h.clear(); } e.clear(); f.clear(); } break; } } pi(a, b) { super.pi(a, b); if (a) { AxisAnnotationFrameManager.b(this.xw); this.abl(this.xw, false); } } } FinalValueLayer.$t = /*@__PURE__*/ markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aaz:abm', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'AxisAnnotationBackground:abz:abn', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aa5:abo', [1, -1], 'AxisAnnotationOutline:ab0:abp', [Brush.$, null], 'AxisAnnotationPaddingBottom:aa0:abq', [1, NaN], 'AxisAnnotationPaddingLeft:aa1:abr', [1, NaN], 'AxisAnnotationPaddingRight:aa2:abs', [1, NaN], 'AxisAnnotationPaddingTop:aa3:abt', [1, NaN], 'AxisAnnotationStrokeThickness:aa4:abu', [1, NaN], 'AxisAnnotationTextColor:ab1:abv', [Brush.$, null], 'FinalValueSelectionMode:aau:abw', [FinalValueSelectionMode_$type, /*@__PURE__*/ enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:abh:abx', [2, null], 'TargetSeries:aav:aby', [Series.$, null]]); return FinalValueLayer; })(); /** * @hidden */ export let FinalValueLayerView = /*@__PURE__*/ (() => { class FinalValueLayerView extends AnnotationLayerView { constructor(a) { super(a); this.cn = null; this.cn = a; } a4() { super.a4(); } co(a) { if (a == null) { return a; } return BrushUtil.o(a, 0.1); } ax(a) { super.ax(a); } } FinalValueLayerView.$t = /*@__PURE__*/ markType(FinalValueLayerView, 'FinalValueLayerView', AnnotationLayerView.$); return FinalValueLayerView; })();