igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
127 lines (126 loc) • 5.26 kB
JavaScript
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxFinancialOverlayComponent } from "./igx-financial-overlay-component";
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { PriceChannelOverlay } from "./PriceChannelOverlay";
import { toPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
* Represents a IgxDataChartComponent Financial Price Channel Overlay series.
* Default required members: High, Low
*
* You can use the `PriceChannelOverlay` to display price volatility.
*
* ```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-price-channel-overlay
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close">
* </igx-price-channel-overlay>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxPriceChannelOverlayComponent();
* 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 IgxPriceChannelOverlayComponent = /*@__PURE__*/ (() => {
class IgxPriceChannelOverlayComponent extends IgxFinancialOverlayComponent {
constructor() {
super();
}
createImplementation() {
return new PriceChannelOverlay();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
/**
* Gets or sets the moving average period for the current PriceChannelOverlay object.
* The typical, and initial, value for Bollinger band periods is 14.
*
* You can use the `Period` to set the moving average.
*
* ```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-price-channel-overlay
* #series
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close"
* period="14">
* </igx-price-channel-overlay>
* </igx-data-chart>
* ```
*
* ```ts
* this.series.period = 14;
* ```
*/
get period() {
return this.i.aa7;
}
set period(v) {
this.i.aa7 = +v;
}
getSeriesValue(world, useInterpolation, skipUnknowns) {
let iv = this.i.i4(toPoint(world), useInterpolation, skipUnknowns);
return (iv);
}
getNextOrExactIndex(world, skipUnknowns) {
let iv = this.i.j7(toPoint(world), skipUnknowns);
return (iv);
}
getPreviousOrExactIndex(world, skipUnknowns) {
let iv = this.i.j9(toPoint(world), skipUnknowns);
return (iv);
}
}
IgxPriceChannelOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxPriceChannelOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxPriceChannelOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxPriceChannelOverlayComponent, selector: "igx-price-channel-overlay", inputs: { period: "period" }, providers: [{ provide: IgxFinancialOverlayComponent, useExisting: forwardRef(() => IgxPriceChannelOverlayComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxPriceChannelOverlayComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxPriceChannelOverlayComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxPriceChannelOverlayComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxPriceChannelOverlayComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-price-channel-overlay',
template: ``,
providers: [{ provide: IgxFinancialOverlayComponent, useExisting: forwardRef(() => IgxPriceChannelOverlayComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxPriceChannelOverlayComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxPriceChannelOverlayComponent) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { period: [{
type: Input
}] } });