UNPKG

igniteui-react-charts

Version:

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

156 lines (155 loc) 5.57 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 { FinancialIndicator } from "./FinancialIndicator"; import { String_$type, Number_$type, typeCast, fromEnum, markType } from "igniteui-react-core"; import { DependencyProperty } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { AxisRange } from "./AxisRange"; import { isNaN_ } from "igniteui-react-core"; /** * @hidden */ export let StrategyBasedIndicator = /*@__PURE__*/ (() => { class StrategyBasedIndicator extends FinancialIndicator { constructor() { super(); this.acw(); } acw() { this.ach = this.aci; this.ab = this.acv; } aco() { return -2147483648; } acx(a) { } acq() { return -2147483648; } acn() { return -2147483648; } static ac1(a, b, c) { let d = DependencyProperty.i(c, Number_$type, b, new PropertyMetadata(2, a, (e, f) => (typeCast(StrategyBasedIndicator.$, e)).raisePropertyChanged(c, f.oldValue, f.newValue))); StrategyBasedIndicator.acl.add(c); return d; } static ac0(a, b) { return StrategyBasedIndicator.ac1(a, b, "Period"); } static acy(a, b) { return StrategyBasedIndicator.ac1(a, b, "LongPeriod"); } static ac2(a, b) { return StrategyBasedIndicator.ac1(a, b, "ShortPeriod"); } abu(a, b) { let c = this.x6(a, b); let d = this.x7(c); return this.ach.b(c, d); } abr(a, b) { let c = this.x6(a, b); if (b == 0) { return false; } if (!this.y2(this.abu(a, b))) { return false; } let d = this.x7(c); if (this.abn != null) { c.minimumValue = this.abn.c; c.maximumValue = this.abn.b; } let e = this.ach.a(c, d); for (let f = 0; f < this.abw && f < c.indicatorColumn.count; f++) { c.indicatorColumn.item(f, NaN); } if (this.yc != null && this.ack(c)) { this.yc.ee(); } return e; } ack(a) { if (!isNaN_(a.minimumValue) && !isNaN_(a.maximumValue) && a.specifiesRange) { let b = this.abn; this.abn = new AxisRange(a.minimumValue, a.maximumValue); return this.acj(b, this.abn); } let c = 1.7976931348623157E+308; let d = -1.7976931348623157E+308; for (let e of fromEnum(a.indicatorColumn)) { if (!isNaN_(e)) { c = Math.min(c, e); d = Math.max(d, e); } } let f = this.abn; this.abn = new AxisRange(c, d); return this.acj(f, this.abn); } acj(a, b) { if (a == null || b == null) { return true; } if (a.c != b.c) { return true; } if (a.b != b.b) { return true; } return false; } acp(a) { if (a == -2147483648) { return 0; } if (a > this.indicatorColumn.count && this.indicatorColumn.count > 0) { a = this.indicatorColumn.count - 1; } if (a < 1) { return 1; } return a; } x6(a, b) { let c = super.x6(a, b); c.indicatorColumn = this.indicatorColumn; c.period = this.acp(this.aco()); c.shortPeriod = this.acp(this.acq()); c.longPeriod = this.acp(this.acn()); c.multiplier = this.acm(); return c; } acm() { return 1; } static acz(a, b) { let c = DependencyProperty.i("Multiplier", Number_$type, b, new PropertyMetadata(2, a, (d, e) => (typeCast(StrategyBasedIndicator.$, d)).raisePropertyChanged("Multiplier", e.oldValue, e.newValue))); StrategyBasedIndicator.acl.add("Multiplier"); return c; } rs(a, b, c, d) { super.rs(a, b, c, d); if (StrategyBasedIndicator.acl.contains(b)) { if (this.yc != null && !this.yc.ee()) { this.ya.cd.e(this.im); this.abr(0, this.indicatorColumn.count); if (this.abo.cn) { this.abo.cl.g$m(); } this.sa(false); } } } } StrategyBasedIndicator.$t = /*@__PURE__*/ markType(StrategyBasedIndicator, 'StrategyBasedIndicator', FinancialIndicator.$); StrategyBasedIndicator.acl = /*@__PURE__*/ new List$1(String_$type, 0); return StrategyBasedIndicator; })();