UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

156 lines (155 loc) 5.71 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-angular-core"; import { DependencyProperty } from "igniteui-angular-core"; import { PropertyMetadata } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { AxisRange } from "./AxisRange"; import { isNaN_ } from "igniteui-angular-core"; /** * @hidden */ export let StrategyBasedIndicator = /*@__PURE__*/ (() => { class StrategyBasedIndicator extends FinancialIndicator { constructor() { super(); this.ab8(); } ab8() { this.abt = this.abu; this.ab = this.ab7; } ab0() { return -2147483648; } ab9(a) { } ab2() { return -2147483648; } abz() { return -2147483648; } static acd(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.abx.add(c); return d; } static acc(a, b) { return StrategyBasedIndicator.acd(a, b, "Period"); } static aca(a, b) { return StrategyBasedIndicator.acd(a, b, "LongPeriod"); } static ace(a, b) { return StrategyBasedIndicator.acd(a, b, "ShortPeriod"); } aa6(a, b) { let c = this.xi(a, b); let d = this.xj(c); return this.abt.b(c, d); } aa3(a, b) { let c = this.xi(a, b); if (b == 0) { return false; } if (!this.ye(this.aa6(a, b))) { return false; } let d = this.xj(c); if (this.aaz != null) { c.minimumValue = this.aaz.c; c.maximumValue = this.aaz.b; } let e = this.abt.a(c, d); for (let f = 0; f < this.aa8 && f < c.indicatorColumn.count; f++) { c.indicatorColumn.item(f, NaN); } if (this.xo != null && this.abw(c)) { this.xo.c1(); } return e; } abw(a) { if (!isNaN_(a.minimumValue) && !isNaN_(a.maximumValue) && a.specifiesRange) { let b = this.aaz; this.aaz = new AxisRange(a.minimumValue, a.maximumValue); return this.abv(b, this.aaz); } 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.aaz; this.aaz = new AxisRange(c, d); return this.abv(f, this.aaz); } abv(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; } ab1(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; } xi(a, b) { let c = super.xi(a, b); c.indicatorColumn = this.indicatorColumn; c.period = this.ab1(this.ab0()); c.shortPeriod = this.ab1(this.ab2()); c.longPeriod = this.ab1(this.abz()); c.multiplier = this.aby(); return c; } aby() { return 1; } static acb(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.abx.add("Multiplier"); return c; } q8(a, b, c, d) { super.q8(a, b, c, d); if (StrategyBasedIndicator.abx.contains(b)) { if (this.xo != null && !this.xo.c1()) { this.xm.b0.e(this.ic); this.aa3(0, this.indicatorColumn.count); if (this.aa0.ca) { this.aa0.b8.g$i(); } this.rq(false); } } } } StrategyBasedIndicator.$t = markType(StrategyBasedIndicator, 'StrategyBasedIndicator', FinancialIndicator.$); StrategyBasedIndicator.abx = new List$1(String_$type, 0); return StrategyBasedIndicator; })();