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.acu();
}
acu() {
this.acf = this.acg;
this.ab = this.act;
}
acm() {
return -2147483648;
}
acv(a) {
}
aco() {
return -2147483648;
}
acl() {
return -2147483648;
}
static acz(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.acj.add(c);
return d;
}
static acy(a, b) {
return StrategyBasedIndicator.acz(a, b, "Period");
}
static acw(a, b) {
return StrategyBasedIndicator.acz(a, b, "LongPeriod");
}
static ac0(a, b) {
return StrategyBasedIndicator.acz(a, b, "ShortPeriod");
}
abs(a, b) {
let c = this.x4(a, b);
let d = this.x5(c);
return this.acf.b(c, d);
}
abp(a, b) {
let c = this.x4(a, b);
if (b == 0) {
return false;
}
if (!this.y0(this.abs(a, b))) {
return false;
}
let d = this.x5(c);
if (this.abl != null) {
c.minimumValue = this.abl.c;
c.maximumValue = this.abl.b;
}
let e = this.acf.a(c, d);
for (let f = 0; f < this.abu && f < c.indicatorColumn.count; f++) {
c.indicatorColumn.item(f, NaN);
}
if (this.ya != null && this.aci(c)) {
this.ya.ed();
}
return e;
}
aci(a) {
if (!isNaN_(a.minimumValue) && !isNaN_(a.maximumValue) && a.specifiesRange) {
let b = this.abl;
this.abl = new AxisRange(a.minimumValue, a.maximumValue);
return this.ach(b, this.abl);
}
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.abl;
this.abl = new AxisRange(c, d);
return this.ach(f, this.abl);
}
ach(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;
}
acn(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;
}
x4(a, b) {
let c = super.x4(a, b);
c.indicatorColumn = this.indicatorColumn;
c.period = this.acn(this.acm());
c.shortPeriod = this.acn(this.aco());
c.longPeriod = this.acn(this.acl());
c.multiplier = this.ack();
return c;
}
ack() {
return 1;
}
static acx(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.acj.add("Multiplier");
return c;
}
rq(a, b, c, d) {
super.rq(a, b, c, d);
if (StrategyBasedIndicator.acj.contains(b)) {
if (this.ya != null && !this.ya.ed()) {
this.x8.cd.e(this.ik);
this.abp(0, this.indicatorColumn.count);
if (this.abm.cn) {
this.abm.cl.g$m();
}
this.r8(false);
}
}
}
}
StrategyBasedIndicator.$t = /*@__PURE__*/ markType(StrategyBasedIndicator, 'StrategyBasedIndicator', FinancialIndicator.$);
StrategyBasedIndicator.acj = /*@__PURE__*/ new List$1(String_$type, 0);
return StrategyBasedIndicator;
})();