igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
146 lines (144 loc) • 5.29 kB
JavaScript
import { __extends } from "tslib";
import { Component, Input } from '@angular/core';
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import * as i0 from "@angular/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.
*
* ```html
* <igx-data-chart
* #chart
* [dataSource]="data" >
* <igx-ordinal-time-x-axis
* dateTimeMemberPath="TimeStamp"
* #xAxis
* >
* </igx-ordinal-time-x-axis>
* <igx-numeric-y-axis
* minimumValue="0"
* #yAxis>
* </igx-numeric-y-axis>
* <igx-bollinger-bands-overlay
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close"
* volumeMemberPath="volume">
* </igx-bollinger-bands-overlay>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxBollingerBandsOverlayComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.openMemberPath = "open";
* series.highMemberPath = "high";
* series.lowMemberPath = "low";
* series.closeMemberPath = "close";
* series.volumeMemberPath="volume";
* this.chart.series.add(series);
* ```
*/
var IgxFinancialOverlayComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxFinancialOverlayComponent, _super);
function IgxFinancialOverlayComponent() {
return _super.call(this) || this;
}
Object.defineProperty(IgxFinancialOverlayComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxFinancialOverlayComponent.prototype, "isFinancialOverlay", {
/**
* Gets whether the series is financial overlay
*/
get: function () {
return this.i.fa;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxFinancialOverlayComponent.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;
* ```
*
* ```html
* <igx-data-chart
* #chart
* [dataSource]="data" >
* <igx-category-x-axis
* label="label"
* #xAxis>
* </igx-category-x-axis>
* <igx-numeric-y-axis
* minimumValue="0"
* #yAxis>
* </igx-numeric-y-axis>
* <igx-bollinger-bands-overlay
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close"
* volumeMemberPath="volume"
* ignoreFirst="2">
* </igx-bollinger-bands-overlay>
* </igx-data-chart>
* ```
*/
get: function () {
return this.i.aa7;
},
set: function (v) {
this.i.aa7 = +v;
},
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.
*/
IgxFinancialOverlayComponent.prototype.scrollIntoView = function (item) {
var iv = this.i.ge(item);
return (iv);
};
IgxFinancialOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxFinancialOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxFinancialOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxFinancialOverlayComponent, selector: "ng-component", inputs: { ignoreFirst: "ignoreFirst" }, usesInheritance: true, ngImport: i0, template: "", isInline: true });
return IgxFinancialOverlayComponent;
}(IgxFinancialSeriesComponent));
export { IgxFinancialOverlayComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxFinancialOverlayComponent, decorators: [{
type: Component,
args: [{
template: "",
}]
}], ctorParameters: function () { return []; }, propDecorators: { ignoreFirst: [{
type: Input
}] } });