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.aa0 = null; this.aaz = null; let a = new FinalValueLayerFrame(); let b = new FinalValueLayerFrame(); let c = new FinalValueLayerFrame(); let d = this.ko / 1000; this.xz = a; this.xy = b; this.x0 = c; this.ab = FinalValueLayer.$; } ct() { return new FinalValueLayerView(this); } rj(a) { super.rj(a); this.aav = a; } get ab5() { return new Thickness(1, this.aa3, this.aa5, this.aa4, this.aa2); } aay() { return this.axisAnnotationFormatLabel != null; } zf(a, b) { if (this.aax == null || this.aax == a) { if (!this.a1.c) { this.sa(b); } } } zh(a, b) { super.zh(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.x6(this.aax)) { this.abm(this.aax, c); } else { for (let d of fromEnum(this.dc.b9)) { if (this.x6(d)) { this.abm(d, c); } if (d.isStacked) { d.qj((e) => { if (this.x6(e)) { this.abm(e, c); } if (e.ei) { e.qh((f) => { if (this.x6(f)) { this.abm(f, c); } return true; }); } return true; }); } if (d.ei) { d.qh((e) => { if (this.x6(e)) { this.abm(e, c); } return true; }); } } } } x6(a) { if (!super.x6(a)) { return false; } if (this.abj != null) { if (a.isFragment) { let b = a.np(); if (!Base.equalsStatic(this.abj, b)) { return false; } } else { if (!Base.equalsStatic(this.abj, a.name)) { return false; } } } return true; } q6() { super.q6(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.abn(this.x0, false); } else { this.abn(this.xy, false); } } ab4(a) { let b = NaN; let c = NaN; let d = this.aaw; 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.w6(this.cw); if (f.dn) { c = a.w4({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.w4({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.dn) { c = 1; } else { c = 0; } } } return a.wy({ $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.w6(this.cw); if (h.dn) { b = a.w4({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.w4({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.dn) { b = 0; } else { b = 1; } } } if (a.fa) { return a.wy({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.wy({ $type: Point_$type, x: b, y: 0 }, e, true); } } } abm(a, b) { let c = this.ab4(a); let d = this.w4(c); let e = this.vv; if (e == null) { e = this.v1; } if (e == null) { e = a.vv; if (e != null) { e = this.aav.co(e); } } let f = new AxisAnnotationFramePrepareSettings(); f.u = this.ab1; f.y = this.ab3; f.x = this.ab2; f.g = this.aa1; f.ae = this.ab5; f.l = this.aa6; f.c = this._visibility == 0 && a.isVertical; f.z = this.ab1; f.ad = this.ab3; f.ac = this.ab2; f.m = this.aa1; f.af = this.ab5; f.r = this.aa6; f.d = this._visibility == 0 && !a.isVertical; AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, f); } abn(a, b) { let c = false; if (this.aaz == null) { c = true; this.aa0 = new List$1(Axis.$, 0); this.aaz = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aaz, this.aa0, b, this.aa7, this.aa7, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); } zk(a, b) { super.zk(a, b); if (this.d4()) { this.abn(this.x0, true); } else { this.abn(this.xy, false); } } gi() { return true; } rs(a, b, c, d) { super.rs(a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.sa(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.sa(true); break; case "SeriesViewer": let e = this.aa0; let f = this.aaz; 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; } } pk(a, b) { super.pk(a, b); if (a) { AxisAnnotationFrameManager.b(this.xy); this.abn(this.xy, false); } } } FinalValueLayer.$t = /*@__PURE__*/ markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aa1:abo', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'AxisAnnotationBackground:ab1:abp', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aa7:abq', [1, -1], 'AxisAnnotationOutline:ab2:abr', [Brush.$, null], 'AxisAnnotationPaddingBottom:aa2:abs', [1, NaN], 'AxisAnnotationPaddingLeft:aa3:abt', [1, NaN], 'AxisAnnotationPaddingRight:aa4:abu', [1, NaN], 'AxisAnnotationPaddingTop:aa5:abv', [1, NaN], 'AxisAnnotationStrokeThickness:aa6:abw', [1, NaN], 'AxisAnnotationTextColor:ab3:abx', [Brush.$, null], 'FinalValueSelectionMode:aaw:aby', [FinalValueSelectionMode_$type, /*@__PURE__*/ enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:abj:abz', [2, null], 'TargetSeries:aax:ab0', [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.q(a, 0.1); } ax(a) { super.ax(a); } } FinalValueLayerView.$t = /*@__PURE__*/ markType(FinalValueLayerView, 'FinalValueLayerView', AnnotationLayerView.$); return FinalValueLayerView; })();