igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
157 lines (156 loc) • 6.34 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { AbsoluteVolumeOscillatorIndicator } from "./AbsoluteVolumeOscillatorIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Absolute Volume Oscillator indicator series.
* Default required members: Volume
*
* You can use the `AbsoluteVolumeOscillatorIndicator` to identify whether volume trands are increasing or decreasing.
*
* ```html
* <igc-data-chart id="chart">
* <igc-category-x-axis
* label="label"
* name="xAxis">
* </igc-category-x-axis>
* <igc-numeric-y-axis
* key="yAxis">
* </igc-numeric-y-axis>
* <igc-absolute-volume-oscillator-indicator
* xAxisName="xAxis"
* yAxisName="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close">
* </igc-absolute-volume-oscillator-indicator>
* </igc-data-chart>
* ```
*
* ```ts
* let chart = document.getElementById("chart")! as IgcDataChart;
* chart.dataSource = this.data;
* ```
*
* ```ts
* let series = new IgcAbsoluteVolumeOscillatorIndicatorComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.openMemberPath = "open";
* series.highMemberPath = "high";
* series.lowMemberPath = "low";
* series.closeMemberPath = "close";
* this.chart.series.add(series);
* ```
*/
var IgcAbsoluteVolumeOscillatorIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcAbsoluteVolumeOscillatorIndicatorComponent, _super);
function IgcAbsoluteVolumeOscillatorIndicatorComponent() {
return _super.call(this) || this;
}
IgcAbsoluteVolumeOscillatorIndicatorComponent.prototype.createImplementation = function () {
return new AbsoluteVolumeOscillatorIndicator();
};
Object.defineProperty(IgcAbsoluteVolumeOscillatorIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcAbsoluteVolumeOscillatorIndicatorComponent.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();
}
};
IgcAbsoluteVolumeOscillatorIndicatorComponent.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(IgcAbsoluteVolumeOscillatorIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent == null) {
var names = getAllPropertyNames(IgcAbsoluteVolumeOscillatorIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent = names;
}
return IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcAbsoluteVolumeOscillatorIndicatorComponent.register = function () {
if (!IgcAbsoluteVolumeOscillatorIndicatorComponent._isElementRegistered) {
IgcAbsoluteVolumeOscillatorIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcAbsoluteVolumeOscillatorIndicatorComponent.htmlTagName, IgcAbsoluteVolumeOscillatorIndicatorComponent);
}
};
Object.defineProperty(IgcAbsoluteVolumeOscillatorIndicatorComponent.prototype, "shortPeriod", {
/**
* Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object.
* The typical, and initial, value for short AVO 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(IgcAbsoluteVolumeOscillatorIndicatorComponent.prototype, "longPeriod", {
/**
* Gets or sets the short moving average period for the current AbsoluteVolumeOscillatorIndicator object.
* The typical, and initial, value for long AVO 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
});
IgcAbsoluteVolumeOscillatorIndicatorComponent._observedAttributesIgcAbsoluteVolumeOscillatorIndicatorComponent = null;
IgcAbsoluteVolumeOscillatorIndicatorComponent.htmlTagName = "igc-absolute-volume-oscillator-indicator";
IgcAbsoluteVolumeOscillatorIndicatorComponent._isElementRegistered = false;
return IgcAbsoluteVolumeOscillatorIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));
export { IgcAbsoluteVolumeOscillatorIndicatorComponent };