Click or drag to resize

How to develop a BarType

A BarType determines how the Bars will be constructed. What kind of data will be used to construct the bars, what ChartStyle will be supported is defined here.

Basic concept

On each incoming tick (in realtime or when the historical data is read) ArthaChitra calls the OnBarUpdate(BarUpdateEventArgs, DateTime, Double, Double, Double, Double, Double, Double, Double, Double) method. Whether the incoming tick should form a new bar or is appended with the existing bar is defined here. The AddBar method or the UpdateBar method is called to add or update the bar respectively.

How the bars will be displayed on the ChartView is determined by a ChartStyle. A BarType class implements the ChartStyle property for this purpose.

The BarType may have one or more supported ChartStyles. How may ChartStyle the BarType supports is determined by the ChartStyles property. A BarType must have alteast one ChartStyle in order to display it in the ChartView. This is an abstract property and user must implement it.

The BuiltDataType property determines whether the bar pulls tick data, minute data or day data from the database to construct the bars.

Configuring properties via GUI using Xaml templates
See Also