CChartCandlestickSerie Class Reference

Specialization of a CChartSerieBase to display a candlestick series. More...

#include <ChartCandlestickSerie.h>

Inheritance diagram for CChartCandlestickSerie:

CChartSerieBase< SChartCandlestickPoint > CChartSerie

List of all members.

Public Member Functions

 CChartCandlestickSerie (CChartCtrl *pParent)
 Constructor.
 ~CChartCandlestickSerie ()
 Destructor.
bool IsPointOnSerie (const CPoint &screenPoint, unsigned &uIndex) const
 Tests if a certain screen point is on the series.
void AddPoint (double XVal, double Low, double High, double Open, double Close)
 Adds a new point in the series.
void SetWidth (int Width)
 Sets the width (in pixels) of all candlestick points in the series.
int GetWidth ()
 Returns the width (in pixels) of a point in the series.

Protected Member Functions

void DrawLegend (CDC *pDC, const CRect &rectBitmap) const
 Draws the legend icon for the series.
void Draw (CDC *pDC)
 Draws the most recent points of the series.
void DrawAll (CDC *pDC)
 Redraws the full series.


Detailed Description

Specialization of a CChartSerieBase to display a candlestick series.

Each point in the series has an X value (the time), a high value (the highest market price), a low value (the lowest market price), an open value (the market price at the opening) and a close value (the market price at the closing).


Member Function Documentation

void CChartCandlestickSerie::AddPoint ( double  XVal,
double  Low,
double  High,
double  Open,
double  Close 
)

Adds a new point in the series.

Parameters:
XVal The X value of the point (the time)
Low The lowest market price
High The highest market price
Open The market price at the opening
Close The market price at the closing

void CChartCandlestickSerie::Draw ( CDC *  pDC  )  [protected, virtual]

Draws the most recent points of the series.

This function should only draw the points that were not previously drawn.

Parameters:
pDC The device context used to draw

Implements CChartSerie.

void CChartCandlestickSerie::DrawAll ( CDC *  pDC  )  [protected, virtual]

Redraws the full series.

Parameters:
pDC The device context used to draw

Implements CChartSerie.

void CChartCandlestickSerie::DrawLegend ( CDC *  pDC,
const CRect &  rectBitmap 
) const [protected, virtual]

Draws the legend icon for the series.

Parameters:
pDC The device context used to draw
rectBitmap The rectangle in which to draw the legend icon

Implements CChartSerie.

bool CChartCandlestickSerie::IsPointOnSerie ( const CPoint &  screenPoint,
unsigned &  uIndex 
) const [virtual]

Tests if a certain screen point is on the series.

Parameters:
screenPoint The screen point to test
uIndex If the point is close to a specific point of the series, its index is stored here.
Returns:
true if the point is on the series

Implements CChartSerie.


The documentation for this class was generated from the following files:

Generated on Sun Jan 17 13:33:10 2010 for ChartDemo by  doxygen 1.5.8