igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
104 lines (103 loc) • 4.48 kB
JavaScript
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { PercentageVolumeOscillatorIndicator } from "./PercentageVolumeOscillatorIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Percentage Volume Oscillator (PVO) series.
* Default required members: Volume
*
* You can use the `PercentageVolumeOscillatorIndicator` to show the percentage difference volume.
*/
export let IgcPercentageVolumeOscillatorIndicatorComponent = /*@__PURE__*/ (() => {
class IgcPercentageVolumeOscillatorIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new PercentageVolumeOscillatorIndicator();
}
/**
* @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 (IgcPercentageVolumeOscillatorIndicatorComponent._observedAttributesIgcPercentageVolumeOscillatorIndicatorComponent == null) {
let names = getAllPropertyNames(IgcPercentageVolumeOscillatorIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcPercentageVolumeOscillatorIndicatorComponent._observedAttributesIgcPercentageVolumeOscillatorIndicatorComponent = names;
}
return IgcPercentageVolumeOscillatorIndicatorComponent._observedAttributesIgcPercentageVolumeOscillatorIndicatorComponent;
}
static register() {
if (!IgcPercentageVolumeOscillatorIndicatorComponent._isElementRegistered) {
IgcPercentageVolumeOscillatorIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcPercentageVolumeOscillatorIndicatorComponent.htmlTagName, IgcPercentageVolumeOscillatorIndicatorComponent);
}
}
/**
* Gets or sets the short moving average period for the current PercentageVolumeOscillatorIndicator object.
* The typical, and initial, value for short PVO periods is 10.
*
* You can use the `ShortPeriod` to set the short moving average period.
*
* ```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 short moving average period for the current PercentageVolumeOscillatorIndicator 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 longPeriod() {
return this.i.longPeriod;
}
set longPeriod(v) {
this.i.longPeriod = +v;
this._a("longPeriod", this.i.longPeriod);
}
}
IgcPercentageVolumeOscillatorIndicatorComponent._observedAttributesIgcPercentageVolumeOscillatorIndicatorComponent = null;
IgcPercentageVolumeOscillatorIndicatorComponent.htmlTagName = "igc-percentage-volume-oscillator-indicator";
IgcPercentageVolumeOscillatorIndicatorComponent._isElementRegistered = false;
return IgcPercentageVolumeOscillatorIndicatorComponent;
})();