UNPKG

igniteui-react-charts

Version:

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

60 lines (59 loc) 2.19 kB
import { IgrStrategyBasedIndicator } from './igr-strategy-based-indicator'; import { CustomIndicator } from "./CustomIndicator"; import { IgrFinancialEventArgs } from "./igr-financial-event-args"; import { delegateCombine, delegateRemove } from "igniteui-react-core"; export class IgrCustomIndicator extends IgrStrategyBasedIndicator { createImplementation() { return new CustomIndicator(); } get i() { return this._implementation; } constructor(props) { super(props); this._indicator = null; this._indicator_wrapped = null; this._basedOnColumns = null; this._basedOnColumns_wrapped = null; } /** * Event raised when the indicator values need to be computed. */ get indicator() { return this._indicator; } set indicator(ev) { if (this._indicator !== null) { this.i.indicator = delegateRemove(this.i.indicator, this._indicator_wrapped); this._indicator_wrapped = null; this._indicator = null; } this._indicator = ev; this._indicator_wrapped = (o, e) => { let outerArgs = new IgrFinancialEventArgs(); outerArgs._provideImplementation(e); this._indicator(this, outerArgs); }; this.i.indicator = delegateCombine(this.i.indicator, this._indicator_wrapped); } /** * Event raised when the basedOnColumns values need to be computed. */ get basedOnColumns() { return this._basedOnColumns; } set basedOnColumns(ev) { if (this._basedOnColumns !== null) { this.i.basedOnColumns = delegateRemove(this.i.basedOnColumns, this._basedOnColumns_wrapped); this._basedOnColumns_wrapped = null; this._basedOnColumns = null; } this._basedOnColumns = ev; this._basedOnColumns_wrapped = (o, e) => { let outerArgs = new IgrFinancialEventArgs(); outerArgs._provideImplementation(e); this._basedOnColumns(this, outerArgs); }; this.i.basedOnColumns = delegateCombine(this.i.basedOnColumns, this._basedOnColumns_wrapped); } }