igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
93 lines (92 loc) • 3.94 kB
JavaScript
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { RelativeStrengthIndexIndicator } from "./RelativeStrengthIndexIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Relative Strength Index indicator series.
* Default required members: Close
*
* The `RelativeStrengthIndexIndicator` class represents Relative Strength Index indicator series for the IgxDataChartComponent .
*/
export let IgcRelativeStrengthIndexIndicatorComponent = /*@__PURE__*/ (() => {
class IgcRelativeStrengthIndexIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new RelativeStrengthIndexIndicator();
}
/**
* @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 (IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent == null) {
let names = getAllPropertyNames(IgcRelativeStrengthIndexIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent = names;
}
return IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent;
}
static register() {
if (!IgcRelativeStrengthIndexIndicatorComponent._isElementRegistered) {
IgcRelativeStrengthIndexIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcRelativeStrengthIndexIndicatorComponent.htmlTagName, IgcRelativeStrengthIndexIndicatorComponent);
}
}
/**
* Gets default display type for the current Financial Indicator
*/
get defaultDisplayType() {
return this.i.aa7;
}
/**
* Gets or sets the moving average period for the current RelativeStrengthIndexIndicator object.
* The typical, and initial, value for RSI periods is 14.
*
* You can use the `period` property for the current RelativeStrengthIndexIndicator object.
*
* ```ts
* this.series.period = 30;
* ```
*/
get period() {
return this.i.acl;
}
set period(v) {
this.i.acl = +v;
this._a("period", this.i.acl);
}
}
IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent = null;
IgcRelativeStrengthIndexIndicatorComponent.htmlTagName = "igc-relative-strength-index-indicator";
IgcRelativeStrengthIndexIndicatorComponent._isElementRegistered = false;
return IgcRelativeStrengthIndexIndicatorComponent;
})();