igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
156 lines (155 loc) • 5.57 kB
JavaScript
/*
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.acb();
}
acb() {
this.abw = this.abx;
this.ab = this.aca;
}
ab3() {
return -2147483648;
}
acc(a) {
}
ab5() {
return -2147483648;
}
ab2() {
return -2147483648;
}
static acg(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.ab0.add(c);
return d;
}
static acf(a, b) {
return StrategyBasedIndicator.acg(a, b, "Period");
}
static acd(a, b) {
return StrategyBasedIndicator.acg(a, b, "LongPeriod");
}
static ach(a, b) {
return StrategyBasedIndicator.acg(a, b, "ShortPeriod");
}
aa9(a, b) {
let c = this.xl(a, b);
let d = this.xm(c);
return this.abw.b(c, d);
}
aa6(a, b) {
let c = this.xl(a, b);
if (b == 0) {
return false;
}
if (!this.yh(this.aa9(a, b))) {
return false;
}
let d = this.xm(c);
if (this.aa2 != null) {
c.minimumValue = this.aa2.c;
c.maximumValue = this.aa2.b;
}
let e = this.abw.a(c, d);
for (let f = 0; f < this.abb && f < c.indicatorColumn.count; f++) {
c.indicatorColumn.item(f, NaN);
}
if (this.xr != null && this.abz(c)) {
this.xr.c1();
}
return e;
}
abz(a) {
if (!isNaN_(a.minimumValue) && !isNaN_(a.maximumValue) && a.specifiesRange) {
let b = this.aa2;
this.aa2 = new AxisRange(a.minimumValue, a.maximumValue);
return this.aby(b, this.aa2);
}
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.aa2;
this.aa2 = new AxisRange(c, d);
return this.aby(f, this.aa2);
}
aby(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;
}
ab4(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;
}
xl(a, b) {
let c = super.xl(a, b);
c.indicatorColumn = this.indicatorColumn;
c.period = this.ab4(this.ab3());
c.shortPeriod = this.ab4(this.ab5());
c.longPeriod = this.ab4(this.ab2());
c.multiplier = this.ab1();
return c;
}
ab1() {
return 1;
}
static ace(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.ab0.add("Multiplier");
return c;
}
ra(a, b, c, d) {
super.ra(a, b, c, d);
if (StrategyBasedIndicator.ab0.contains(b)) {
if (this.xr != null && !this.xr.c1()) {
this.xp.b4.e(this.id);
this.aa6(0, this.indicatorColumn.count);
if (this.aa3.ce) {
this.aa3.cc.g$m();
}
this.rs(false);
}
}
}
}
StrategyBasedIndicator.$t = /*@__PURE__*/ markType(StrategyBasedIndicator, 'StrategyBasedIndicator', FinancialIndicator.$);
StrategyBasedIndicator.ab0 = /*@__PURE__*/ new List$1(String_$type, 0);
return StrategyBasedIndicator;
})();