UNPKG

igniteui-angular-charts

Version:

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

76 lines (75 loc) 4.69 kB
import { Component, forwardRef, ChangeDetectionStrategy } from '@angular/core'; import { IgxItemwiseStrategyBasedIndicatorComponent } from "./igx-itemwise-strategy-based-indicator-component"; 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 { WeightedCloseIndicator } from "./WeightedCloseIndicator"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent Weigted Close indicator series. * The weighted close indicator shows an average of the high low and close * for a day but with the closing price counted twice in the average. * Default required members: High, Low, Close * * The `WeightedCloseIndicator` is similar to the `TypicalPriceIndicator` in that it represents an average of the high price, low price, and closing price for a day. * However, with the `WeightedCloseIndicator`, more emphasis is placed on the closing price and it is included twice when calculating the arithmetic average. * * ```html * <igx-data-chart * [dataSource]="data"> * <igx-category-x-axis #xAxis * label="label"> * </igx-category-x-axis> * <igx-numeric-y-axis #yAxis> * </igx-numeric-y-axis> * <igx-weighted-close-indicator * [xAxis]="xAxis" * [yAxis]="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close"> * </igx-weighted-close-indicator> * </igx-data-chart> * ``` * * ```ts * let series = new IgxWeightedCloseIndicatorComponent(); * 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); * ``` */ export let IgxWeightedCloseIndicatorComponent = /*@__PURE__*/ (() => { class IgxWeightedCloseIndicatorComponent extends IgxItemwiseStrategyBasedIndicatorComponent { constructor() { super(); } createImplementation() { return new WeightedCloseIndicator(); } /** * @hidden */ get i() { return this._implementation; } } IgxWeightedCloseIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxWeightedCloseIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxWeightedCloseIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxWeightedCloseIndicatorComponent, selector: "igx-weighted-close-indicator", providers: [{ provide: IgxItemwiseStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxWeightedCloseIndicatorComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxWeightedCloseIndicatorComponent, decorators: [{ type: Component, args: [{ selector: 'igx-weighted-close-indicator', template: ``, providers: [{ provide: IgxItemwiseStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxWeightedCloseIndicatorComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; } });