igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
80 lines (79 loc) • 3.44 kB
JavaScript
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { CommodityChannelIndexIndicator } from "./CommodityChannelIndexIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
let IgcCommodityChannelIndexIndicatorComponent = /*@__PURE__*/ (() => {
class IgcCommodityChannelIndexIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new CommodityChannelIndexIndicator();
}
/**
* @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 (IgcCommodityChannelIndexIndicatorComponent._observedAttributesIgcCommodityChannelIndexIndicatorComponent == null) {
let names = getAllPropertyNames(IgcCommodityChannelIndexIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcCommodityChannelIndexIndicatorComponent._observedAttributesIgcCommodityChannelIndexIndicatorComponent = names;
}
return IgcCommodityChannelIndexIndicatorComponent._observedAttributesIgcCommodityChannelIndexIndicatorComponent;
}
static register() {
if (!IgcCommodityChannelIndexIndicatorComponent._isElementRegistered) {
IgcCommodityChannelIndexIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcCommodityChannelIndexIndicatorComponent.htmlTagName, IgcCommodityChannelIndexIndicatorComponent);
}
}
/**
* Gets or sets the moving average period for the current CCISeries object.
* The typical, and initial, value for CCI periods is 20.
*
* ```ts
* this.series.period = 30;
* ```
*/
get period() {
return this.i.ac1;
}
set period(v) {
this.i.ac1 = +v;
this._a("period", this.i.ac1);
}
}
IgcCommodityChannelIndexIndicatorComponent._observedAttributesIgcCommodityChannelIndexIndicatorComponent = null;
IgcCommodityChannelIndexIndicatorComponent.htmlTagName = "igc-commodity-channel-index-indicator";
IgcCommodityChannelIndexIndicatorComponent._isElementRegistered = false;
return IgcCommodityChannelIndexIndicatorComponent;
})();
export { IgcCommodityChannelIndexIndicatorComponent };