igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
112 lines (110 loc) • 4.42 kB
JavaScript
import { __extends } from "tslib";
import { IgcFinancialSeriesComponent } from "./igc-financial-series-component";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
/**
* Represents the base functionality for a IgxDataChartComponent financial overlay series.
* The difference between a FinancialIndicator and a FinancialOverlay is small.
* Overlays are usually drawn against the same axes as the price, but they don't
* have to be. Overlays mostly display multiple values, but not all of them, and so
* so some indicators.
*
* The `FinancialOverlay` class represents the base functionality for a IgxDataChartComponent financial overlay series.
*/
var IgcFinancialOverlayComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcFinancialOverlayComponent, _super);
function IgcFinancialOverlayComponent() {
return _super.call(this) || this;
}
Object.defineProperty(IgcFinancialOverlayComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcFinancialOverlayComponent.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();
}
};
IgcFinancialOverlayComponent.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(IgcFinancialOverlayComponent, "observedAttributes", {
get: function () {
if (IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent == null) {
var names = getAllPropertyNames(IgcFinancialOverlayComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent = names;
}
return IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialOverlayComponent.prototype, "isFinancialOverlay", {
/**
* Gets whether the series is financial overlay
*/
get: function () {
return this.i.fa;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcFinancialOverlayComponent.prototype, "ignoreFirst", {
/**
* Gets or sets the number of values to hide at the beginning of the indicator.
*
* Use the `IgnoreFirst` property to sets the number of values to hide at the beginning of the indicator.
*
* ```ts
* series.ignoreFirst=2;
* ```
*/
get: function () {
return this.i.aa7;
},
set: function (v) {
this.i.aa7 = +v;
this._a("ignoreFirst", this.i.aa7);
},
enumerable: false,
configurable: true
});
/**
* Scrolls the series to display the item for the specified data item.
* The series is scrolled by the minimum amount required to place the specified data item within
* the central 80% of the visible axis.
* @param item * The data item (item) to scroll to.
*
* Use the `ScrollIntoView` method to scrolls the series to display the item for the specified data item.
*/
IgcFinancialOverlayComponent.prototype.scrollIntoView = function (item) {
var iv = this.i.ge(item);
return (iv);
};
IgcFinancialOverlayComponent._observedAttributesIgcFinancialOverlayComponent = null;
return IgcFinancialOverlayComponent;
}(IgcFinancialSeriesComponent));
export { IgcFinancialOverlayComponent };