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_es() { return true; } constructor() { super(); this.axisAnnotationFormatLabel = null; this.aag = null; this.aaf = null; let a = new FinalValueLayerFrame(); let b = new FinalValueLayerFrame(); let c = new FinalValueLayerFrame(); let d = this.ke / 1000; this.xh = a; this.xg = b; this.xi = c; this.ab = FinalValueLayer.$; } ct() { return new FinalValueLayerView(this); } q3(a) { super.q3(a); this.aab = a; } get abl() { return new Thickness(1, this.aaj, this.aal, this.aak, this.aai); } aae() { return this.axisAnnotationFormatLabel != null; } yw(a, b) { if (this.aad == null || this.aad == a) { if (!this.a1.c) { this.ru(b); } } } yy(a, b) { super.yy(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.xn(this.aad)) { this.aa2(this.aad, c); } else { for (let d of fromEnum(this.dc.series)) { if (this.xn(d)) { this.aa2(d, c); } if (d.isStacked) { d.p5((e) => { if (this.xn(e)) { this.aa2(e, c); } if (e.ei) { e.p3((f) => { if (this.xn(f)) { this.aa2(f, c); } return true; }); } return true; }); } if (d.ei) { d.p3((e) => { if (this.xn(e)) { this.aa2(e, c); } return true; }); } } } } xn(a) { if (!super.xn(a)) { return false; } if (this.aaz != null) { if (a.isFragment) { let b = a.ne(); if (!Base.equalsStatic(this.aaz, b)) { return false; } } else { if (!Base.equalsStatic(this.aaz, a.name)) { return false; } } } return true; } qr() { super.qr(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.aa3(this.xi, false); } else { this.aa3(this.xg, false); } } abk(a) { let b = NaN; let c = NaN; let d = this.aac; 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.wo(this.cw); if (f.ch) { c = a.wm({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.wm({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.ch) { c = 1; } else { c = 0; } } } return a.wh({ $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.wo(this.cw); if (h.ch) { b = a.wm({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.wm({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.ch) { b = 0; } else { b = 1; } } } if (a.e8) { return a.wh({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.wh({ $type: Point_$type, x: b, y: 0 }, e, true); } } } aa2(a, b) { let c = this.abk(a); let d = this.wm(c); let e = this.ve; if (e == null) { e = this.vk; } if (e == null) { e = a.ve; if (e != null) { e = this.aab.co(e); } } AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, this.abh, this.aah, this.abj, this.abi, this.abl, this.aam, this.abh, this.aah, this.abj, this.abi, this.abl, this.aam, this._visibility == 0 && a.isVertical, this._visibility == 0 && !a.isVertical); } aa3(a, b) { let c = false; if (this.aaf == null) { c = true; this.aag = new List$1(Axis.$, 0); this.aaf = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aaf, this.aag, b, this.aan, this.aan, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); } y1(a, b) { super.y1(a, b); if (this.d4()) { this.aa3(this.xi, true); } else { this.aa3(this.xg, false); } } gb() { return true; } rc(a, b, c, d) { super.rc(a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.ru(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.ru(true); break; case "SeriesViewer": let e = this.aag; let f = this.aaf; 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; } } o7(a, b) { super.o7(a, b); if (a) { AxisAnnotationFrameManager.b(this.xg); this.aa3(this.xg, false); } } } FinalValueLayer.$t = /*@__PURE__*/ markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aah:aa4', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'AxisAnnotationBackground:abh:aa5', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aan:aa6', [1, -1], 'AxisAnnotationOutline:abi:aa7', [Brush.$, null], 'AxisAnnotationPaddingBottom:aai:aa8', [1, NaN], 'AxisAnnotationPaddingLeft:aaj:aa9', [1, NaN], 'AxisAnnotationPaddingRight:aak:aba', [1, NaN], 'AxisAnnotationPaddingTop:aal:abb', [1, NaN], 'AxisAnnotationStrokeThickness:aam:abc', [1, NaN], 'AxisAnnotationTextColor:abj:abd', [Brush.$, null], 'FinalValueSelectionMode:aac:abe', [FinalValueSelectionMode_$type, /*@__PURE__*/ enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:aaz:abf', [2, null], 'TargetSeries:aad:abg', [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; })();