Try add very basic barChart support.

This commit is contained in:
Debao Zhang
2014-01-18 15:19:46 +08:00
parent 327fa0b9b3
commit 727b8b609f
9 changed files with 225 additions and 49 deletions
+8 -3
View File
@@ -1,6 +1,7 @@
#include <QtCore>
#include "xlsxdocument.h"
#include "xlsxpiechart.h"
#include "xlsxbarchart.h"
#include "xlsxworksheet.h"
using namespace QXlsx;
@@ -16,9 +17,13 @@ int main()
//![0]
//![1]
PieChart *chart = new PieChart;
chart->addSeries(CellRange("A1:A9"), sheet->sheetName());
sheet->insertChart(3, 3, chart, QSize(300, 300));
PieChart *pieChart = new PieChart;
pieChart->addSeries(CellRange("A1:A9"), sheet->sheetName());
sheet->insertChart(3, 3, pieChart, QSize(300, 300));
BarChart *barChart = new BarChart;
barChart->addSeries(CellRange("A1:A9"), sheet->sheetName());
sheet->insertChart(6, 6, barChart, QSize(300, 300));
//![1]
//![2]