QXlsx icon indicating copy to clipboard operation
QXlsx copied to clipboard

XY-Scatter Charts are broken

Open WilheJo opened this issue 2 years ago • 2 comments

Hi, it seems XY-Scatter Charts do not behave as expected.

After spending some time figuring out why my series A1:C6 did not produce 2 XY-charts with x-data from A1:A6, I found this one:

https://github.com/QtExcel/QXlsx/blob/499901003f02da34f7fbc1ec214a24e4dc128b74/QXlsx/source/xlsxchart.cpp#L1305

After changing this to "#if 1", everything works as expected.

I can see no other place where x-data is set... so this seem a mistake to me.

WilheJo avatar Jul 19 '23 12:07 WilheJo

@WilheJo provide project with problem please. I have checked "chart1.xlsx" generated by example and it works good, isn't it? image

But I want to ask Ralf Tralow what #if 0 means... May be time to remove debug code have came?

AndreiCherniaev avatar Aug 28 '24 12:08 AndreiCherniaev

well, as your graphs show, this is broken, still.

the XY chart should make a single graph with the x and y data.

It should output something like this: image

BTW: this is done by just removing the "#if 0"/#endif to enable the generation of the correct data for the chart.

I updated my repo to latest on the master to verify the problem and my changes were made to lines 1172 and 1189 in xlschart.cpp.

Regards

WilheJo avatar Dec 11 '24 12:12 WilheJo