CChartGanttSerie Class Reference

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

#include <ChartGanttSerie.h>

Inheritance diagram for CChartGanttSerie:

CChartSerieBase< SChartGanttPoint > CChartSerie

List of all members.

Public Member Functions

 CChartGanttSerie (CChartCtrl *pParent)
 Constructor.
 ~CChartGanttSerie ()
 Destructor.
void AddPoint (double StartTime, double EndTime, double YValue)
 Adds a new point to the series.
bool IsPointOnSerie (const CPoint &screenPoint, unsigned &uIndex) const
 Tests if a certain screen point is on the series.
void SetBorderColor (COLORREF BorderColor)
 Sets the bars border color.
COLORREF GetBorderColor () const
 Returns the bars border color.
void SetBorderWidth (int Width)
 Sets the bars border width.
int GetBorderWidth () const
 Returns the bars border width.
void SetBarWidth (int Width)
 Sets the bars width (in pixels).
int GetBarWidth () const
 Returns the bars width (in pixels).
void ShowGradient (bool bShow)
 Specifies if a gradient is applied to the bars.
void SetGradient (COLORREF GradientColor, EGradientType GradientType)
 Sets the gradient style.

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 gantt series.

Each point in a gantt series is amde of three values: a start and end time and an Y value. The points are displayed as horizontal bars that are positionned on the Y axis depending on their Y value and which starts at the start time and end at the end time along the X axis.


Member Function Documentation

void CChartGanttSerie::AddPoint ( double  StartTime,
double  EndTime,
double  YValue 
)

Adds a new point to the series.

Parameters:
StartTime The start time of the Gantt bar
EndTime The end time of the Gantt bar
YValue The YValue of the Gantt bar

void CChartGanttSerie::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 CChartGanttSerie::DrawAll ( CDC *  pDC  )  [protected, virtual]

Redraws the full series.

Parameters:
pDC The device context used to draw

Implements CChartSerie.

void CChartGanttSerie::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 CChartGanttSerie::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.

void CChartGanttSerie::SetGradient ( COLORREF  GradientColor,
EGradientType  GradientType 
)

Sets the gradient style.

Parameters:
GradientColor The second color used for the gradient (the first one being the original series color).
GradientType The type of gradient used between the two colors (vertical, horizontal, ...)


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

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