#include <ChartGanttSerie.h>
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. |
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.
void CChartGanttSerie::AddPoint | ( | double | StartTime, | |
double | EndTime, | |||
double | YValue | |||
) |
Adds a new point to the series.
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.
pDC | The device context used to draw |
Implements CChartSerie.
void CChartGanttSerie::DrawAll | ( | CDC * | pDC | ) | [protected, virtual] |
void CChartGanttSerie::DrawLegend | ( | CDC * | pDC, | |
const CRect & | rectBitmap | |||
) | const [protected, virtual] |
Draws the legend icon for the series.
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.
screenPoint | The screen point to test | |
uIndex | If the point is close to a specific point of the series, its index is stored here. |
Implements CChartSerie.
void CChartGanttSerie::SetGradient | ( | COLORREF | GradientColor, | |
EGradientType | GradientType | |||
) |
Sets the gradient style.
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, ...) |