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.aaz = null; this.aay = null; let a = new FinalValueLayerFrame(); let b = new FinalValueLayerFrame(); let c = new FinalValueLayerFrame(); let d = this.kn / 1000; this.xy = a; this.xx = b; this.xz = c; this.ab = FinalValueLayer.$; } ct() { return new FinalValueLayerView(this); } ri(a) { super.ri(a); this.aau = a; } get ab4() { return new Thickness(1, this.aa2, this.aa4, this.aa3, this.aa1); } aax() { return this.axisAnnotationFormatLabel != null; } ze(a, b) { if (this.aaw == null || this.aaw == a) { if (!this.a1.c) { this.r9(b); } } } zg(a, b) { super.zg(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.x5(this.aaw)) { this.abl(this.aaw, c); } else { for (let d of fromEnum(this.dc.b9)) { if (this.x5(d)) { this.abl(d, c); } if (d.isStacked) { d.qi((e) => { if (this.x5(e)) { this.abl(e, c); } if (e.ei) { e.qg((f) => { if (this.x5(f)) { this.abl(f, c); } return true; }); } return true; }); } if (d.ei) { d.qg((e) => { if (this.x5(e)) { this.abl(e, c); } return true; }); } } } } x5(a) { if (!super.x5(a)) { return false; } if (this.abi != null) { if (a.isFragment) { let b = a.no(); if (!Base.equalsStatic(this.abi, b)) { return false; } } else { if (!Base.equalsStatic(this.abi, a.name)) { return false; } } } return true; } q5() { super.q5(); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.abm(this.xz, false); } else { this.abm(this.xx, false); } } ab3(a) { let b = NaN; let c = NaN; let d = this.aav; 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.w5(this.cw); if (f.dn) { c = a.w3({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.w3({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.dn) { c = 1; } else { c = 0; } } } return a.wx({ $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.w5(this.cw); if (h.dn) { b = a.w3({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.w3({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.dn) { b = 0; } else { b = 1; } } } if (a.fa) { return a.wx({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.wx({ $type: Point_$type, x: b, y: 0 }, e, true); } } } abl(a, b) { let c = this.ab3(a); let d = this.w3(c); let e = this.vu; if (e == null) { e = this.v0; } if (e == null) { e = a.vu; if (e != null) { e = this.aau.co(e); } } let f = new AxisAnnotationFramePrepareSettings(); f.u = this.ab0; f.y = this.ab2; f.x = this.ab1; f.g = this.aa0; f.ae = this.ab4; f.l = this.aa5; f.c = this._visibility == 0 && a.isVertical; f.z = this.ab0; f.ad = this.ab2; f.ac = this.ab1; f.m = this.aa0; f.af = this.ab4; f.r = this.aa5; f.d = this._visibility == 0 && !a.isVertical; AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, f); } abm(a, b) { let c = false; if (this.aay == null) { c = true; this.aaz = new List$1(Axis.$, 0); this.aay = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aay, this.aaz, b, this.aa6, this.aa6, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); } zj(a, b) { super.zj(a, b); if (this.d4()) { this.abm(this.xz, true); } else { this.abm(this.xx, false); } } gh() { return true; } rr(a, b, c, d) { super.rr(a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.r9(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.r9(true); break; case "SeriesViewer": let e = this.aaz; let f = this.aay; 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; } } pj(a, b) { super.pj(a, b); if (a) { AxisAnnotationFrameManager.b(this.xx); this.abm(this.xx, false); } } } FinalValueLayer.$t = /*@__PURE__*/ markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aa0:abn', [1, /*@__PURE__*/ DeviceUtils.g(3)], 'AxisAnnotationBackground:ab0:abo', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aa6:abp', [1, -1], 'AxisAnnotationOutline:ab1:abq', [Brush.$, null], 'AxisAnnotationPaddingBottom:aa1:abr', [1, NaN], 'AxisAnnotationPaddingLeft:aa2:abs', [1, NaN], 'AxisAnnotationPaddingRight:aa3:abt', [1, NaN], 'AxisAnnotationPaddingTop:aa4:abu', [1, NaN], 'AxisAnnotationStrokeThickness:aa5:abv', [1, NaN], 'AxisAnnotationTextColor:ab2:abw', [Brush.$, null], 'FinalValueSelectionMode:aav:abx', [FinalValueSelectionMode_$type, /*@__PURE__*/ enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:abi:aby', [2, null], 'TargetSeries:aaw:abz', [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; })();