The class CChartsheet is used for creation sheet with a number of charts.
More...
#include <Chartsheet.h>
Public Types |
enum | EPosition |
| General property.
|
enum | EGridLines |
| Axis grid detalization property.
|
enum | ETableData |
| The enumeration contains values that determine diagramm diagram data table property.
|
enum | EAxisCross |
| The enumeration contains values that demermine point where axis will pass through.
|
enum | EBarDirection |
| The enumeration determines bars` direction in bar diagramm.
|
enum | EBarGrouping |
| The enumeration determinese several bar relative position.
|
enum | EScatterStyle |
| The enumeration determines scatter diagram styles.
|
Public Member Functions |
| CChartsheet () |
| The class default constructor.
|
| CChartsheet (uint32_t index, const _tstring &temp_path) |
| The class constructor.
|
| CChartsheet (uint32_t index, EChartTypes type, const _tstring &temp_path) |
| The class constructor.
|
virtual | ~CChartsheet () |
| The class destructor (virtual)
|
bool | AddSeries (const Series &series, bool mainChart=true) |
| Adds specified series into chartsheet.
|
bool | Save () |
| For each chart it creates and saves 5 files: chartXX.xml, sheetXX.xml, sheetXX.xml.rels, drawingXX.xml, drawingXX.xml.rels.
|
Private Member Functions |
void | Init (uint32_t index, EChartTypes type) |
| Initializes internal variables and creates the core structure of a sheet tree.
|
void | AddTitle (const TCHAR *name, uint32_t size, bool vertPos) |
| This internal method adds title section into xml object.
|
void | AddTableData () |
| Adds table data into chart if it is necessary.
|
void | AddLegend () |
| Adds legend into chart if it is necessary.
|
void | AddXAxis (const Axis &x, uint32_t crossAxisId=0) |
| Internal method adds X axis block into chart.
|
void | AddYAxis (const Axis &y, uint32_t crossAxisId=0) |
| Internal method adds Y axis block into chart.
|
void | AddLineChart (Axis &xAxis, uint32_t yAxisId, const std::vector< Series > &series, uint32_t firstSeriesId) |
| Adds line chart xml section.
|
void | AddBarChart (Axis &xAxis, uint32_t yAxisId, const std::vector< Series > &series, uint32_t firstSeriesId, EBarDirection barDir, EBarGrouping barGroup) |
| Adds bar chart xml section.
|
void | AddScatterChart (uint32_t xAxisId, uint32_t yAxisId, const std::vector< Series > &series, uint32_t firstSeriesId, EScatterStyle style) |
| Adds scatter chart xml section.
|
Detailed Description
The class CChartsheet is used for creation sheet with a number of charts.
- See Also
- EChartTypes supplying types of charts
- Note
- All created chartsheets inside workbook will be allocated on its` own sheet
Constructor & Destructor Documentation
SimpleXlsx::CChartsheet::CChartsheet |
( |
| ) |
|
The class default constructor.
- Returns
- no
SimpleXlsx::CChartsheet::CChartsheet |
( |
uint32_t |
index, |
|
|
const _tstring & |
temp_path |
|
) |
| |
The class constructor.
- Parameters
-
index | index of a sheet to be created (for example, chart1.xml) |
temp_path | path to the temporary directory where chart files must be created |
- Returns
- no
SimpleXlsx::CChartsheet::CChartsheet |
( |
uint32_t |
index, |
|
|
EChartTypes |
type, |
|
|
const _tstring & |
temp_path |
|
) |
| |
The class constructor.
- Parameters
-
index | index of a sheet to be created (for example, chart1.xml) |
type | chart type (BAR or LINEAR) |
temp_path | path to the temporary directory where chart files must be created |
- Returns
- no
SimpleXlsx::CChartsheet::~CChartsheet |
( |
| ) |
|
|
virtual |
The class destructor (virtual)
- Returns
- no
Member Function Documentation
void SimpleXlsx::CChartsheet::AddBarChart |
( |
Axis & |
xAxis, |
|
|
uint32_t |
yAxisId, |
|
|
const std::vector< Series > & |
series, |
|
|
uint32_t |
firstSeriesId, |
|
|
EBarDirection |
barDir, |
|
|
EBarGrouping |
barGroup |
|
) |
| |
|
private |
Adds bar chart xml section.
- Parameters
-
xAxis | reference to axis object |
yAxisId | id of using y axis |
series | reference to the vector of line sets |
firstSeriesId | is used for synchronization between different line charts |
barDir | barsdirection (horizontal or vertical) @param barGroup bars relative position |
- See Also
- EBarDirection
-
EBarGrouping
- Returns
- no
void SimpleXlsx::CChartsheet::AddLegend |
( |
| ) |
|
|
private |
Adds legend into chart if it is necessary.
- Returns
- no
void SimpleXlsx::CChartsheet::AddLineChart |
( |
Axis & |
xAxis, |
|
|
uint32_t |
yAxisId, |
|
|
const std::vector< Series > & |
series, |
|
|
uint32_t |
firstSeriesId |
|
) |
| |
|
private |
Adds line chart xml section.
- Parameters
-
xAxis | reference to axis object |
yAxisId | id of using y axis |
series | reference to the vector of line sets |
firstSeriesId | is used for synchronization between different line charts |
- Returns
- no
void SimpleXlsx::CChartsheet::AddScatterChart |
( |
uint32_t |
xAxisId, |
|
|
uint32_t |
yAxisId, |
|
|
const std::vector< Series > & |
series, |
|
|
uint32_t |
firstSeriesId, |
|
|
EScatterStyle |
style |
|
) |
| |
|
private |
Adds scatter chart xml section.
- Parameters
-
xAxisId | id of using x axis |
yAxisId | id of using y axis |
series | reference to the vector of line sets |
firstSeriesId | is used for synchronization between different line charts |
style | determines diagramm style |
- See Also
- EScatterStyle
- Returns
- no
bool SimpleXlsx::CChartsheet::AddSeries |
( |
const Series & |
series, |
|
|
bool |
mainChart = true |
|
) |
| |
Adds specified series into chartsheet.
- Parameters
-
series | reference to series object to be added |
mainChart | indicates whether series must be added into main chart or additional (main by default) |
- Returns
- Boolean result of the oepration
void SimpleXlsx::CChartsheet::AddTableData |
( |
| ) |
|
|
private |
Adds table data into chart if it is necessary.
- Returns
- no
void SimpleXlsx::CChartsheet::AddTitle |
( |
const TCHAR * |
name, |
|
|
uint32_t |
size, |
|
|
bool |
vertPos |
|
) |
| |
|
private |
This internal method adds title section into xml object.
- Parameters
-
name | Title value |
size | Font size |
vertPos | indicates whether the title is allocated on X axis (false) or vertical (true) |
- Returns
- no
void SimpleXlsx::CChartsheet::AddXAxis |
( |
const Axis & |
x, |
|
|
uint32_t |
crossAxisId = 0 |
|
) |
| |
|
private |
Internal method adds X axis block into chart.
- Parameters
-
x | reference to an axis object |
crossAxisId | id of axis that is used in pair with setting |
- Returns
- no
void SimpleXlsx::CChartsheet::AddYAxis |
( |
const Axis & |
y, |
|
|
uint32_t |
crossAxisId = 0 |
|
) |
| |
|
private |
Internal method adds Y axis block into chart.
- Parameters
-
y | reference to an axis object |
crossAxisId | id of axis that is used in pair with setting |
- Returns
- no
void SimpleXlsx::CChartsheet::Init |
( |
uint32_t |
index, |
|
|
EChartTypes |
type |
|
) |
| |
|
private |
Initializes internal variables and creates the core structure of a sheet tree.
- Parameters
-
index | index of a sheet to be created (for example, chart1.xml) |
type | chart type (BAR or LINEAR) |
- Returns
- no
bool SimpleXlsx::CChartsheet::Save |
( |
| ) |
|
For each chart it creates and saves 5 files: chartXX.xml, sheetXX.xml, sheetXX.xml.rels, drawingXX.xml, drawingXX.xml.rels.
- Returns
- Boolean result of the operation
The documentation for this class was generated from the following files: