igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
97 lines (96 loc) • 5.69 kB
JavaScript
import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxStrategyBasedIndicatorComponent } from "./igx-strategy-based-indicator-component";
import { IgxFinancialIndicatorComponent } from "./igx-financial-indicator-component";
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { StandardDeviationIndicator } from "./StandardDeviationIndicator";
import * as i0 from "@angular/core";
/**
* Represents a IgxDataChartComponent Standard Deviation indicator series.
* Default required members: High, Low, Close
*
* `StandardDeviationIndicator` (SDI) measures statistical variation in stock prices or volatility. The difference between an individual security’s closing price and the average security closing price is called the dispersion. The larger the dispersion is the higher the standard deviation will be and therefore the volatility. The smaller the dispersion is (the difference between an individual closing price and the average price), the smaller the standard deviation and the lower the price volatility.
*
* Using this indicator requires setting both the `HighMemberPath`, `LowMemberPath` and `CloseMemberPath`.
*
* ```html
* <igx-data-chart
* width=500px
* height=500px
* [dataSource]="data" >
* <igx-ordinal-time-x-axis
* dateTimeMemberPath="TimeStamp"
* #xAxis>
* </igx-ordinal-time-x-axis>
* <igx-numeric-y-axis
* #yAxis></igx-numeric-y-axis>
* <igx-standard-deviation-indicator
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* closeMemberPath="Close"
* highMemberPath="High"
* lowMemberPath="Low">
* </igx-standard-deviation-indicator>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxStandardDeviatioIndicatorComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.highMemberPath = "high";
* series.lowMemberPath = "low";
* series.closeMemberPath = "close";
* this.chart.series.add(series);
*
* ```
*/
var IgxStandardDeviationIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxStandardDeviationIndicatorComponent, _super);
function IgxStandardDeviationIndicatorComponent() {
return _super.call(this) || this;
}
IgxStandardDeviationIndicatorComponent.prototype.createImplementation = function () {
return new StandardDeviationIndicator();
};
Object.defineProperty(IgxStandardDeviationIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxStandardDeviationIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the current StandardDeviationIndicator object.
* The typical, and initial, value for STDEV periods is 20.
*/
get: function () {
return this.i.ac1;
},
set: function (v) {
this.i.ac1 = +v;
},
enumerable: false,
configurable: true
});
IgxStandardDeviationIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxStandardDeviationIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxStandardDeviationIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxStandardDeviationIndicatorComponent, selector: "igx-standard-deviation-indicator", inputs: { period: "period" }, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxStandardDeviationIndicatorComponent;
}(IgxStrategyBasedIndicatorComponent));
export { IgxStandardDeviationIndicatorComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxStandardDeviationIndicatorComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-standard-deviation-indicator',
template: "",
providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxStandardDeviationIndicatorComponent; }) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { period: [{
type: Input
}] } });