UNPKG

igniteui-react-charts

Version:

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

335 lines (334 loc) 12.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 { 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 { 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_er() { return true; } constructor() { super(); this.axisAnnotationFormatLabel = null; this.aad = null; this.aac = null; let a = new FinalValueLayerFrame(); let b = new FinalValueLayerFrame(); let c = new FinalValueLayerFrame(); let d = this.kd / 1000; this.xe = a; this.xd = b; this.xf = c; this.ab = FinalValueLayer.$; } ct() { return new FinalValueLayerView(this); } q1(a) { super.q1(a); this.z8 = a; } get abi() { return new Thickness(1, this.aag, this.aai, this.aah, this.aaf); } aab() { return this.axisAnnotationFormatLabel != null; } yt(a, b) { if (this.aaa == null || this.aaa == a) { if (!this.a1.c) { this.rs(b); } } } yv(a, b) { super.yv(a, b); let c = a; c.f.clear(); c.r.clear(); c.q.clear(); c.ac.clear(); c.p.clear(); c.ab.clear(); c.h.clear(); c.g.clear(); c.i.clear(); c.k.clear(); c.m.clear(); c.l.clear(); c.j.clear(); c.n.clear(); c.o.clear(); c.t.clear(); c.s.clear(); c.u.clear(); c.w.clear(); c.y.clear(); c.x.clear(); c.v.clear(); c.z.clear(); c.aa.clear(); if (this.xk(this.aaa)) { this.aaz(this.aaa, c); } else { for (let d of fromEnum(this.dc.series)) { if (this.xk(d)) { this.aaz(d, c); } if (d.isStacked) { d.p3((e) => { if (this.xk(e)) { this.aaz(e, c); } if (e.eh) { e.p1((f) => { if (this.xk(f)) { this.aaz(f, c); } return true; }); } return true; }); } if (d.eh) { d.p1((e) => { if (this.xk(e)) { this.aaz(e, c); } return true; }); } } } } xk(a) { if (!super.xk(a)) { return false; } if (this.aaw != null) { if (a.isFragment) { let b = a.nc(); if (!Base.equalsStatic(this.aaw, b)) { return false; } } else { if (!Base.equalsStatic(this.aaw, a.name)) { return false; } } } return true; } qp() { super.qp(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.aa0(this.xf, false); } else { this.aa0(this.xd, false); } } abh(a) { let b = NaN; let c = NaN; let d = this.z9; 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.wl(this.cw); if (f.ch) { c = a.wj({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.wj({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.ch) { c = 1; } else { c = 0; } } } return a.we({ $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.wl(this.cw); if (h.ch) { b = a.wj({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.wj({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.ch) { b = 0; } else { b = 1; } } } if (a.e7) { return a.we({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.we({ $type: Point_$type, x: b, y: 0 }, e, true); } } } aaz(a, b) { let c = this.abh(a); let d = this.wj(c); let e = this.vb; if (e == null) { e = this.vh; } if (e == null) { e = a.vb; if (e != null) { e = this.z8.cf(e); } } AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, this.abe, this.aae, this.abg, this.abf, this.abi, this.aaj, this.abe, this.aae, this.abg, this.abf, this.abi, this.aaj, this._visibility == 0 && a.isVertical, this._visibility == 0 && !a.isVertical); } aa0(a, b) { let c = false; if (this.aac == null) { c = true; this.aad = new List$1(Axis.$, 0); this.aac = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aac, this.aad, b, this.aak, this.aak, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); } yy(a, b) { super.yy(a, b); if (this.d4()) { this.aa0(this.xf, true); } else { this.aa0(this.xd, false); } } ga() { return true; } ra(a, b, c, d) { super.ra(a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.rs(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.rs(true); break; case "SeriesViewer": let e = this.aad; let f = this.aac; if (f != null) { for (let g of fromEnum(f)) { let h = g.value; h.c((i) => g.key.an.remove(i)); h.clear(); } e.clear(); f.clear(); } break; } } o5(a, b) { super.o5(a, b); if (a) { AxisAnnotationFrameManager.b(this.xd); this.aa0(this.xd, false); } } } FinalValueLayer.$t = /*@__PURE__*/ markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aae:aa1', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'AxisAnnotationBackground:abe:aa2', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aak:aa3', [1, -1], 'AxisAnnotationOutline:abf:aa4', [Brush.$, null], 'AxisAnnotationPaddingBottom:aaf:aa5', [1, NaN], 'AxisAnnotationPaddingLeft:aag:aa6', [1, NaN], 'AxisAnnotationPaddingRight:aah:aa7', [1, NaN], 'AxisAnnotationPaddingTop:aai:aa8', [1, NaN], 'AxisAnnotationStrokeThickness:aaj:aa9', [1, NaN], 'AxisAnnotationTextColor:abg:aba', [Brush.$, null], 'FinalValueSelectionMode:z9:abb', [FinalValueSelectionMode_$type, /*@__PURE__*/ enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:aaw:abc', [2, null], 'TargetSeries:aaa:abd', [Series.$, null]]); return FinalValueLayer; })(); /** * @hidden */ export let FinalValueLayerView = /*@__PURE__*/ (() => { class FinalValueLayerView extends AnnotationLayerView { constructor(a) { super(a); this.ce = null; this.ce = a; } ax() { super.ax(); } cf(a) { if (a == null) { return a; } return BrushUtil.m(a, 0.1); } aq(a) { super.aq(a); } } FinalValueLayerView.$t = /*@__PURE__*/ markType(FinalValueLayerView, 'FinalValueLayerView', AnnotationLayerView.$); return FinalValueLayerView; })();