igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
121 lines (120 loc) • 5.46 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { PercentagePriceOscillatorIndicator } from "./PercentagePriceOscillatorIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent percentage price oscillator series.
* Default required members: High, Low, Volume
*
* You can use the `PercentagePriceOscillatorIndicator` to show the difference between two moving averages.
*/
var IgcPercentagePriceOscillatorIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcPercentagePriceOscillatorIndicatorComponent, _super);
function IgcPercentagePriceOscillatorIndicatorComponent() {
return _super.call(this) || this;
}
IgcPercentagePriceOscillatorIndicatorComponent.prototype.createImplementation = function () {
return new PercentagePriceOscillatorIndicator();
};
Object.defineProperty(IgcPercentagePriceOscillatorIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcPercentagePriceOscillatorIndicatorComponent.prototype.connectedCallback = function () {
if (_super.prototype["connectedCallback"]) {
_super.prototype["connectedCallback"].call(this);
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
};
IgcPercentagePriceOscillatorIndicatorComponent.prototype.disconnectedCallback = function () {
if (_super.prototype["disconnectedCallback"]) {
_super.prototype["disconnectedCallback"].call(this);
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
};
Object.defineProperty(IgcPercentagePriceOscillatorIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcPercentagePriceOscillatorIndicatorComponent._observedAttributesIgcPercentagePriceOscillatorIndicatorComponent == null) {
var names = getAllPropertyNames(IgcPercentagePriceOscillatorIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcPercentagePriceOscillatorIndicatorComponent._observedAttributesIgcPercentagePriceOscillatorIndicatorComponent = names;
}
return IgcPercentagePriceOscillatorIndicatorComponent._observedAttributesIgcPercentagePriceOscillatorIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcPercentagePriceOscillatorIndicatorComponent.register = function () {
if (!IgcPercentagePriceOscillatorIndicatorComponent._isElementRegistered) {
IgcPercentagePriceOscillatorIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcPercentagePriceOscillatorIndicatorComponent.htmlTagName, IgcPercentagePriceOscillatorIndicatorComponent);
}
};
Object.defineProperty(IgcPercentagePriceOscillatorIndicatorComponent.prototype, "shortPeriod", {
/**
* Gets or sets the short moving average period for the current PercentagePriceOscillatorIndicator object.
* The typical, and initial, value for short PPO periods is 10.
*
* You can use the `ShortPeriod` to set the short moving average period.
*
* ```ts
* this.series.shortPeriod = 10;
* ```
*/
get: function () {
return this.i.shortPeriod;
},
set: function (v) {
this.i.shortPeriod = +v;
this._a("shortPeriod", this.i.shortPeriod);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcPercentagePriceOscillatorIndicatorComponent.prototype, "longPeriod", {
/**
* Gets or sets the long moving average period for the current PercentagePriceOscillatorIndicator object.
* The typical, and initial, value for long PVO periods is 30.
*
* You can use the `LongPeriod` to set the long moving average period.
*
* ```ts
* this.series.longPeriod = 30;
* ```
*/
get: function () {
return this.i.longPeriod;
},
set: function (v) {
this.i.longPeriod = +v;
this._a("longPeriod", this.i.longPeriod);
},
enumerable: false,
configurable: true
});
IgcPercentagePriceOscillatorIndicatorComponent._observedAttributesIgcPercentagePriceOscillatorIndicatorComponent = null;
IgcPercentagePriceOscillatorIndicatorComponent.htmlTagName = "igc-percentage-price-oscillator-indicator";
IgcPercentagePriceOscillatorIndicatorComponent._isElementRegistered = false;
return IgcPercentagePriceOscillatorIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));
export { IgcPercentagePriceOscillatorIndicatorComponent };