igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
87 lines (86 loc) • 3.8 kB
JavaScript
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { AverageDirectionalIndexIndicator } from "./AverageDirectionalIndexIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Average Directional indicator series.
* Default required members: High, Low, Close
*
* You can use the `AverageDirectionalIndexIndicator` to measures trend strength without regard to trend direction.
*/
export let IgcAverageDirectionalIndexIndicatorComponent = /*@__PURE__*/ (() => {
class IgcAverageDirectionalIndexIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new AverageDirectionalIndexIndicator();
}
/**
* @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 (IgcAverageDirectionalIndexIndicatorComponent._observedAttributesIgcAverageDirectionalIndexIndicatorComponent == null) {
let names = getAllPropertyNames(IgcAverageDirectionalIndexIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcAverageDirectionalIndexIndicatorComponent._observedAttributesIgcAverageDirectionalIndexIndicatorComponent = names;
}
return IgcAverageDirectionalIndexIndicatorComponent._observedAttributesIgcAverageDirectionalIndexIndicatorComponent;
}
static register() {
if (!IgcAverageDirectionalIndexIndicatorComponent._isElementRegistered) {
IgcAverageDirectionalIndexIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcAverageDirectionalIndexIndicatorComponent.htmlTagName, IgcAverageDirectionalIndexIndicatorComponent);
}
}
/**
* Gets or sets the moving average period for the current AverageDirectionalIndexIndicator object.
* The typical, and initial, value for AverageDirectionalIndexIndicator periods is 14.
*
* You can use the `Period` to set the moving average.
*
* ```ts
* this.series.period = 14;
* ```
*/
get period() {
return this.i.acl;
}
set period(v) {
this.i.acl = +v;
this._a("period", this.i.acl);
}
}
IgcAverageDirectionalIndexIndicatorComponent._observedAttributesIgcAverageDirectionalIndexIndicatorComponent = null;
IgcAverageDirectionalIndexIndicatorComponent.htmlTagName = "igc-average-directional-index-indicator";
IgcAverageDirectionalIndexIndicatorComponent._isElementRegistered = false;
return IgcAverageDirectionalIndexIndicatorComponent;
})();