UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

169 lines (168 loc) 7.78 kB
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 { PercentageVolumeOscillatorIndicator } from "./PercentageVolumeOscillatorIndicator"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent Percentage Volume Oscillator (PVO) series. * Default required members: Volume * * You can use the `PercentageVolumeOscillatorIndicator` to show the percentage difference volume. * * ```html * <igx-data-chart * [dataSource]="data" > * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-percentage-volume-oscillator-indicator * [xAxis]="xAxis" * [yAxis]="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close"> * </igx-percentage-volume-oscillator-indicator> * </igx-data-chart> * ``` * * ```ts * let series = new IgxPercentageVolumeOscillatorIndicatorComponent(); * 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 IgxPercentageVolumeOscillatorIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxPercentageVolumeOscillatorIndicatorComponent, _super); function IgxPercentageVolumeOscillatorIndicatorComponent() { return _super.call(this) || this; } IgxPercentageVolumeOscillatorIndicatorComponent.prototype.createImplementation = function () { return new PercentageVolumeOscillatorIndicator(); }; Object.defineProperty(IgxPercentageVolumeOscillatorIndicatorComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxPercentageVolumeOscillatorIndicatorComponent.prototype, "shortPeriod", { /** * Gets or sets the short moving average period for the current PercentageVolumeOscillatorIndicator object. * The typical, and initial, value for short PVO periods is 10. * * You can use the `ShortPeriod` to set the short moving average period. * * ```html * <igx-data-chart * [dataSource]="data" > * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-percentage-volume-oscillator-indicator * #series * [xAxis]="xAxis" * [yAxis]="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close" * shortPeriod="10"> * </igx-percentage-volume-oscillator-indicator> * </igx-data-chart> * ``` * * ```ts * this.series.shortPeriod = 30; * ``` */ get: function () { return this.i.shortPeriod; }, set: function (v) { this.i.shortPeriod = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxPercentageVolumeOscillatorIndicatorComponent.prototype, "longPeriod", { /** * Gets or sets the short moving average period for the current PercentageVolumeOscillatorIndicator object. * The typical, and initial, value for long PVO periods is 30. * * You can use the `LongPeriod` to set the long moving average period. * * ```html * <igx-data-chart * [dataSource]="data" > * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-percentage-volume-oscillator-indicator * #series * [xAxis]="xAxis" * [yAxis]="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close" * longPeriod="30"> * </igx-percentage-volume-oscillator-indicator> * </igx-data-chart> * ``` * * ```ts * this.series.longPeriod = 30; * ``` */ get: function () { return this.i.longPeriod; }, set: function (v) { this.i.longPeriod = +v; }, enumerable: false, configurable: true }); IgxPercentageVolumeOscillatorIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxPercentageVolumeOscillatorIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxPercentageVolumeOscillatorIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxPercentageVolumeOscillatorIndicatorComponent, selector: "igx-percentage-volume-oscillator-indicator", inputs: { shortPeriod: "shortPeriod", longPeriod: "longPeriod" }, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxPercentageVolumeOscillatorIndicatorComponent; }(IgxStrategyBasedIndicatorComponent)); export { IgxPercentageVolumeOscillatorIndicatorComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxPercentageVolumeOscillatorIndicatorComponent, decorators: [{ type: Component, args: [{ selector: 'igx-percentage-volume-oscillator-indicator', template: "", providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxPercentageVolumeOscillatorIndicatorComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { shortPeriod: [{ type: Input }], longPeriod: [{ type: Input }] } });