igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
57 lines (56 loc) • 1.88 kB
JavaScript
import { IgrItemwiseStrategyBasedIndicator } from "./igr-itemwise-strategy-based-indicator";
import { WeightedCloseIndicator } from "./WeightedCloseIndicator";
/**
* 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.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Year" />
* <IgrNumericYAxis name="yAxis" />
*
* <IgrWeightedCloseIndicator
* name="series1"
* xAxisName="xAxis"
* yAxisName="yAxis"
* openMemberPath="Open"
* closeMemberPath="close"
* highMemberPath="High"
* lowMemberPath="Low" />
* </IgrDataChart>
* ```
*
* ```ts
* let series = new IgrWeightedCloseIndicator({name:"series"});
* 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 class IgrWeightedCloseIndicator extends IgrItemwiseStrategyBasedIndicator {
createImplementation() {
return new WeightedCloseIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
}