QtExcel / QXlsx

Excel file(*.xlsx) reader/writer library using Qt 5 or 6. Descendant of QtXlsxWriter.
https://qtexcel.github.io/QXlsx/
MIT License
1.16k stars 359 forks source link

series titles do not display on chart sheets #31

Open rickbase1 opened 5 years ago

rickbase1 commented 5 years ago

Hi, This is a great extension, thanks very much for sharing!

Just a couple of issues.

1) When creating a chart sheet, I can not display the series titles. The chart title work fine though.

2) Is there a way to create a legend, ideally using the first cell value in the range?

3) Is there a way to use a cell range as your x axis range, (for instance, time in seconds)?

    VSR_excelExport->addSheet("Plots_Chart",AbstractSheet::ST_ChartSheet);
    Chartsheet *sheet = static_cast<Chartsheet*>(VSR_excelExport->currentSheet());
    Chart *lineChart = sheet->chart();

    lineChart->setChartType(Chart::CT_Surface3D);

    lineChart->setChartTitle(profile_filename_raw);

all work fine, but the next line seems to get lost, regardless of where I position it. lineChart->setAxisTitle(Chart::ChartAxisPos::Right, "Time in Seconds");

Thanks again!!

rick

j2doll commented 5 years ago

Dear @rickbase1

Thank you for reporting this issue.

Charts have many unsupported features. :sob: There were also related issues. https://github.com/QtExcel/QXlsx/issues/11

:one: I did not put the right title in the code. Because I do not use it well.

Left Top Right Bottom
BarChart o o
LineChart o o
ScatterChart o o
AreaChart o o
DoughnutChart
PieChart

:two: Some charts are not implemented. More development is needed.

/*!
  \enum Chart::ChartType

  \value CT_Area
  \value CT_Area3D,
  \value CT_Line,
  \value CT_Line3D,
  \value CT_Scatter,
  \value CT_Pie,
  \value CT_Pie3D,
  \value CT_Doughnut,
  \value CT_Bar,
  \value CT_Bar3D,

  \omitvalue CT_Stock,
  \omitvalue CT_Radar,
  \omitvalue CT_OfPie,
  \omitvalue CT_Surface,
  \omitvalue CT_Surface3D,
  \omitvalue CT_Bubble
*/

I have registered this issue as an enhancement(improvement), and I hope to be complemented someday.

If you are very busy, try using a different libraries. Qxlnt ,Qlibxlsxwriter

j2doll commented 5 years ago

When I create a axis title in Microsoft Excel, it is always displayed as the value of (left, bottom).

I may need to look at the ECMA 376 document.

rickbase1 commented 5 years ago

Ok, thanks. I appreciate your quick response

Rick

On Mon, Jan 21, 2019, 3:26 AM Jay Two <notifications@github.com wrote:

When I create a axis title in Microsoft Excel, it is always displayed as the value of (left, bottom).

I may need to look at the ECMA 376 document.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QtExcel/QXlsx/issues/31#issuecomment-455986416, or mute the thread https://github.com/notifications/unsubscribe-auth/AKqQs1P3opxiQy3R99v2C5KGb1rRRMBqks5vFXnEgaJpZM4aJ26H .