class StackedBarChart: public Chart
Implements a stacked bar chart. A stacked bar chart contains a set of stacked bar data elements, grid lines, two axes and a headline label.
Inherits from Chart.
| StackedBarChart | Implements a stacked bar chart. |
| Functions | |
| StackedBarChart | Initializes the object. |
| ~StackedBarChart | Releases all allocated resources. |
| Draw | Draws the chart. |
| DrawLabels | Draws the label assigned to the chart. |
| ChangePosition | Unused function. |
| ChangeAlpha | Unused function. |
| GetConnectedDataElementByDataGroup | Returns the stacked bar which represents the given data group. |
| GetConnectedBar | Returns the bar data element which represents the given data entry. |
| GetAllBars | Returns a vector containing all visible (not filtered) bars of all stacked bars of the chart. |
| GetHighestVisibleSum | Returns the highest sum of values of a stacked bar among all visible (not filtered) stacked bars. |
| GetIndexOfBar | Returns the index of a given bar in its stacked bar, counting from the bottom up. |
| GetVisibleDataGroups | Returns a vector containing all visible data groups of the given data groups, i.e. |
| ContainsDataEntry | Lookup function which checks the existence of a given data entry pointer in a given vector. |
void Draw( QPainter * pPainter )
Draws the chart. Inherited from AlterableObject.
| pPainter | The QPainter object that shall be used for painting. |
void DrawLabels( QPainter * pPainter )
Draws the label assigned to the chart. Inherited from AlterableObject.
| pPainter | The QPainter object that shall be used for painting. |
void ChangePosition( float fDeltaLeft, float fDeltaTop, float fDeltaBottom )
Unused function. Inherited from AlterableObject.
| fDeltaLeft | Unused parameter. |
| fDeltaTop | Unused parameter. |
| fDeltaBottom | Unused parameter. |
void ChangeAlpha( float fDeltaAlpha )
Unused function. Inherited from AlterableObject.
| fDeltaAlpha | Unused parameter. |
DataElement* GetConnectedDataElementByDataGroup( DataGroup * pDataGroup )
Returns the stacked bar which represents the given data group. If no such stacked bar exists, NULL is returned.
| pDataGroup | Pointer to the data group to be searched. |
The stacked bar which represents the given data group if present, else NULL.
DataElement* GetConnectedBar( DataEntry * pDataEntry )
Returns the bar data element which represents the given data entry. If no such bar exists among all stacked bars, NULL is returned.
| pDataEntry | Pointer to the data entry to be searched. |
The bar data element which represents the given data entry if present, else NULL.
std::vector<DataGroup*> GetVisibleDataGroups( std:: vector<DataGroup*> vAllDataGroups )
Returns a vector containing all visible data groups of the given data groups, i.e. all data groups with at least one unfiltered data entry.
| vAllDataGroups | A vector containing all data groups of a data set. |
A vector containing all visible data groups of the given data groups.
bool ContainsDataEntry( std:: vector<DataEntry*> vDataEntries, DataEntry * pDataEntry )
Lookup function which checks the existence of a given data entry pointer in a given vector.
| vDataEntries | A vector of data entry pointers. |
| pDataEntry | A data entry pointer to be searched. |
A boolean value indicating if the vector contains the data entry.
Implements a stacked bar chart.
class StackedBarChart: public Chart
Initializes the object.
StackedBarChart( DataSet * pDataSet )
Releases all allocated resources.
~StackedBarChart()
Draws the chart.
void Draw( QPainter * pPainter )
Draws the label assigned to the chart.
void DrawLabels( QPainter * pPainter )
Unused function.
void ChangePosition( float fDeltaLeft, float fDeltaTop, float fDeltaBottom )
Unused function.
void ChangeAlpha( float fDeltaAlpha )
Returns the stacked bar which represents the given data group.
DataElement* GetConnectedDataElementByDataGroup( DataGroup * pDataGroup )
Returns the bar data element which represents the given data entry.
DataElement* GetConnectedBar( DataEntry * pDataEntry )
Returns a vector containing all visible (not filtered) bars of all stacked bars of the chart.
std::vector<DataElement*> GetAllBars()
Returns the highest sum of values of a stacked bar among all visible (not filtered) stacked bars.
double GetHighestVisibleSum()
Returns the index of a given bar in its stacked bar, counting from the bottom up.
unsigned int GetIndexOfBar( DataElement * pDataElement )
Returns a vector containing all visible data groups of the given data groups, i.e.
std::vector<DataGroup*> GetVisibleDataGroups( std:: vector<DataGroup*> vAllDataGroups )
Lookup function which checks the existence of a given data entry pointer in a given vector.
bool ContainsDataEntry( std:: vector<DataEntry*> vDataEntries, DataEntry * pDataEntry )
Abstract class that implements the skeleton of a chart.
class Chart: public AlterableObject
Abstract class that implements the skeleton of an alterable object, i.e.
class AlterableObject