igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
104 lines (103 loc) • 4.34 kB
JavaScript
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { ChaikinOscillatorIndicator } from "./ChaikinOscillatorIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents the IgxDataChartComponent Chaikin Oscillator indicator series.
* Default required members: Close, Low, High, Volume
*
* `ChaikinOscillatorIndicator` class specify the series as Chaikin Oscillator Indicator series.
*/
export let IgcChaikinOscillatorIndicatorComponent = /*@__PURE__*/ (() => {
class IgcChaikinOscillatorIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new ChaikinOscillatorIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
connectedCallback() {
if (super["connectedCallback"]) {
super["connectedCallback"]();
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
}
disconnectedCallback() {
if (super["disconnectedCallback"]) {
super["disconnectedCallback"]();
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
}
static get observedAttributes() {
if (IgcChaikinOscillatorIndicatorComponent._observedAttributesIgcChaikinOscillatorIndicatorComponent == null) {
let names = getAllPropertyNames(IgcChaikinOscillatorIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcChaikinOscillatorIndicatorComponent._observedAttributesIgcChaikinOscillatorIndicatorComponent = names;
}
return IgcChaikinOscillatorIndicatorComponent._observedAttributesIgcChaikinOscillatorIndicatorComponent;
}
static register() {
if (!IgcChaikinOscillatorIndicatorComponent._isElementRegistered) {
IgcChaikinOscillatorIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcChaikinOscillatorIndicatorComponent.htmlTagName, IgcChaikinOscillatorIndicatorComponent);
}
}
/**
* Gets or sets the short moving average period for the current ChaikinOscillatorIndicator object.
* The typical, and initial, value for short CHO periods is 3.
*
* Set the `ShortPeriod` property if you wish to change the short moving average period for the indicator.
*
* ```ts
* this.series.shortPeriod = 30;
* ```
*/
get shortPeriod() {
return this.i.shortPeriod;
}
set shortPeriod(v) {
this.i.shortPeriod = +v;
this._a("shortPeriod", this.i.shortPeriod);
}
/**
* Gets or sets the long moving average period for the current ChaikinOscillatorIndicator object.
* The typical, and initial, value for long CHO periods is 10.
*
* Set the `LongPeriod` property if you wish to change the long moving average period for the indicator.
*
* ```ts
* this.series.longPeriod = 30;
* ```
*/
get longPeriod() {
return this.i.longPeriod;
}
set longPeriod(v) {
this.i.longPeriod = +v;
this._a("longPeriod", this.i.longPeriod);
}
}
IgcChaikinOscillatorIndicatorComponent._observedAttributesIgcChaikinOscillatorIndicatorComponent = null;
IgcChaikinOscillatorIndicatorComponent.htmlTagName = "igc-chaikin-oscillator-indicator";
IgcChaikinOscillatorIndicatorComponent._isElementRegistered = false;
return IgcChaikinOscillatorIndicatorComponent;
})();