CChartLabelProvider< PointType > Class Template Reference

Interface which should be implemented in order to provide text to a label. More...

#include <ChartLabel.h>

List of all members.

Public Member Functions

 CChartLabelProvider ()
 Constructor.
virtual ~CChartLabelProvider ()
 Destructor.
virtual TChartString GetText (CChartSerieBase< PointType > *pSerie, unsigned PointIndex)=0
 Method to override in order to provide the text of the label.


Detailed Description

template<class PointType>
class CChartLabelProvider< PointType >

Interface which should be implemented in order to provide text to a label.

This class is a template class with the template parameter being the point type of the series to which the label is attached.

Using a CChartLabelProvider provides more flexibility in the way to supply text to the label. You can for instance embedd in the string some information about the point (XValue, YValue, index, ...). In that case, a single CChartLabelProvider object can be provided for all labels. Changing the displayed text of all labels becomes also easier: you only have to adapt the string returned by this object and refresh the control and all labels will be updated.


Member Function Documentation

template<class PointType>
virtual TChartString CChartLabelProvider< PointType >::GetText ( CChartSerieBase< PointType > *  pSerie,
unsigned  PointIndex 
) [pure virtual]

Method to override in order to provide the text of the label.

Parameters:
pSerie The series to which the label is attached
uPtIndex The index of the point in the series to which the label is attached
Returns:
a string which will be the text displayed in the label.


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

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