SRGraphData Class
class SRGraphData: public CObject
Manages one item of data within a graphSRGraphData can be considered as the controller for one node in a chart, one bar on a graph, one slice of a pie chart, etc.
Each node has a value member (held in m_Value) and an annotation list (held in m_strAnnotationList).
The SRGraphAnnotationList enables a single node to hold many text annotations which are recognized according to a locale-specific code. These annotations may then be used to reproduce graphs for different languages without needing to alter the data itself.
Defined in: SRGDat.h
Developer Notes
The data items now contain a null flag (m_bNull) which may be set to exclude a data item from the display.Class Members
Data members
CScale m_HiLoValue
Accumulated high and low values
double m_dValue
Floating-point current value of the graph data item
SRGraphAnnotationList m_strAnnotationList
Manages the multi-lingual annotation list
SRGraphStyle m_Style
Style settings for this data object
BOOL m_bNULL
Semaphore -- when TRUE the data held in this item is NULL and should not be used
Member functions
virtual ~SRGraphData()
Destructor
virtual SRGraphStyle * GetStyle()
Returns the style of the data item
virtual void SetNull(BOOL b)
Sets the m_bNull member
virtual BOOL GetNull()
Interrogates the m_bNull member
virtual double GetLogValue()
Returns the true logarithmic value for m_value
virtual void Zero()
Returns all data to zero and cleans the hi-lo data
virtual CScale GetHiLoData()
Returns the hi-lo data value
virtual BOOL IsDynamic()
Returns FALSE because this is not a dynamic data storage object
virtual CString& GetAnnotation(int code=1)
Retrieves the annotation for this object that is associated with the given country code
virtual double GetValue(BOOL bLogData=FALSE)
Retrieves the current value for this data object
virtual void SetValue(double number)
Initializes the value for this object
Constructor with default initialization of the data members
SRGraphData(double value, CString text, int style=0)
Constructor with explicit initialization of data members
virtual void Serialize(CArchive& ar)
Handles storage and retrieval
virtual void SetAnnotation(int code, LPCTSTR text)
Overload 1. Sets text in an annotation for given country code
virtual void SetAnnotation(LPCTSTR text, BOOL clear=FALSE, int code=1)
Overload 2. Sets text in an annotation -- flexible
virtual SRGraphAnnotationList* GetAnnotationList()
Returns a pointer to the annotation list associated with this object
virtual CScale* GetHiLoValue()
Returns a pointer to the CScale item (hi-lo history) associated with this object
void Dump(CDumpContext &dc) const
Dumps this object to a CDumpContext