dbzhang800 / QtXlsxWriter

.xlsx file reader and writer for Qt5
http://qtxlsx.debao.me
Other
1.23k stars 631 forks source link

examples Chart::CT_Line #205

Open seaCheng opened 3 years ago

seaCheng commented 3 years ago

examples chart Chart::CT_Line and CT_Area, Chart::CT_Scatter excel file can't open correctly

Chart *line3DChart = xlsx.insertChart(43, 9, QSize(300, 300)); line3DChart->setChartType(Chart::CT_Line3D); line3DChart->addSeries(CellRange("A1:C9"));

Chart *areaChart = xlsx.insertChart(63, 3, QSize(300, 300));
areaChart->setChartType(Chart::CT_Area);
areaChart->addSeries(CellRange("A1:C9"));

Chart *area3DChart = xlsx.insertChart(63, 9, QSize(300, 300));
area3DChart->setChartType(Chart::CT_Area3D);
area3DChart->addSeries(CellRange("A1:C9"));

Chart *scatterChart = xlsx.insertChart(83, 3, QSize(300, 300));
scatterChart->setChartType(Chart::CT_Scatter);
// Will generate three lines.
scatterChart->addSeries(CellRange("A1:A9"));
scatterChart->addSeries(CellRange("B1:B9"));
scatterChart->addSeries(CellRange("C1:C9"));

Chart *scatterChart_2 = xlsx.insertChart(83, 9, QSize(300, 300));
scatterChart_2->setChartType(Chart::CT_Scatter);
// Will generate two lines.
scatterChart_2->addSeries(CellRange("A1:C9"));

Chart *doughnutChart = xlsx.insertChart(103, 3, QSize(300, 300));
doughnutChart->setChartType(Chart::CT_Doughnut);
doughnutChart->addSeries(CellRange("A1:C9"));