igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
80 lines (79 loc) • 4.09 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { NegativeVolumeIndexIndicator } from "./NegativeVolumeIndexIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Negative Volume Index indicator (NVI) series.
* Default required members: Close, Volume
*
* The `NegativeVolumeIndexIndicator` (NVI) is a finacial indicator frequently used in combination with the PositiveVolumeIndexIndicator. This calculation can be used to identify bull markets. These two indicators are based on the premise that smart money trades on low volume days and less informed or overly optimistic investors trade on high volume days.
*
* Using this indicator requires setting both the `CloseMemberPath` and `VolumeMemberPath`.
*/
export var IgcNegativeVolumeIndexIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcNegativeVolumeIndexIndicatorComponent, _super);
function IgcNegativeVolumeIndexIndicatorComponent() {
return _super.call(this) || this;
}
IgcNegativeVolumeIndexIndicatorComponent.prototype.createImplementation = function () {
return new NegativeVolumeIndexIndicator();
};
Object.defineProperty(IgcNegativeVolumeIndexIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcNegativeVolumeIndexIndicatorComponent.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();
}
};
IgcNegativeVolumeIndexIndicatorComponent.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(IgcNegativeVolumeIndexIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcNegativeVolumeIndexIndicatorComponent._observedAttributesIgcNegativeVolumeIndexIndicatorComponent == null) {
var names = getAllPropertyNames(IgcNegativeVolumeIndexIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcNegativeVolumeIndexIndicatorComponent._observedAttributesIgcNegativeVolumeIndexIndicatorComponent = names;
}
return IgcNegativeVolumeIndexIndicatorComponent._observedAttributesIgcNegativeVolumeIndexIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcNegativeVolumeIndexIndicatorComponent.register = function () {
if (!IgcNegativeVolumeIndexIndicatorComponent._isElementRegistered) {
IgcNegativeVolumeIndexIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcNegativeVolumeIndexIndicatorComponent.htmlTagName, IgcNegativeVolumeIndexIndicatorComponent);
}
};
IgcNegativeVolumeIndexIndicatorComponent._observedAttributesIgcNegativeVolumeIndexIndicatorComponent = null;
IgcNegativeVolumeIndexIndicatorComponent.htmlTagName = "igc-negative-volume-index-indicator";
IgcNegativeVolumeIndexIndicatorComponent._isElementRegistered = false;
return IgcNegativeVolumeIndexIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));