Bug 84347 - EDITING: charts with line on second axis do not export to Excel properly
Summary: EDITING: charts with line on second axis do not export to Excel properly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.3.2.2 release
Hardware: Other All
: medium normal
Assignee: Markus Mohrhard
URL:
Whiteboard: BSA target:5.0.0
Keywords:
: 85556 (view as bug list)
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2014-09-26 03:05 UTC by Tim Richardson
Modified: 2015-05-13 06:52 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
an example spreadsheet .ods which can be used to export to .xlsx to see the problem (80.85 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-09-26 03:05 UTC, Tim Richardson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Richardson 2014-09-26 03:05:39 UTC
Created attachment 106890 [details]
an example spreadsheet .ods which can be used to export to .xlsx to see the problem

Problem description: 

Export to excel .xlsx does not save lines on secondary axis of line chart.


Make a line chart with one line on the primary Y axis and move the second series to the secondary axis.
Export to Excel .xlsx.
Reopen in LibreOffice.

Both lines are on the primary axis. 

Current behavior:

Expected behavior:
Secondary axis settings should be preserved. 

              
Operating System: All
Version: 4.3.2.2 release
Comment 1 raal 2014-09-30 08:07:36 UTC
I can confirm with LO 4.3.2.2, Win7
Comment 2 Markus Mohrhard 2015-04-27 18:33:16 UTC
Ok, so this requires quite some refactoring in the chart export code.

Currently we create a huge mess (including invalid files) when we have such a document. We export one lineChart element with two data series + 3 axIds (which is invalid). Correct would be to export 2 lineChart element with one data series and 2 axIds each with one axis being deleted or pointing to the same x axis.

This also needs some tests before it is implemented to make sure that we understand how the secondary x-axis comes into play. Currently I assume that you can get up to 4 lineChart elements depending on these combinations: primary x with primary y, primary x with secondary y, secondary x with primary y, secondary x with secondary y.
Comment 3 Markus Mohrhard 2015-04-27 18:35:11 UTC
*** Bug 85556 has been marked as a duplicate of this bug. ***
Comment 4 Markus Mohrhard 2015-05-10 00:39:51 UTC
I have most of it fixed now.

There seem to be a few issues left with the category axis but I have no idea why that happens.
Comment 5 Markus Mohrhard 2015-05-11 01:08:00 UTC
(In reply to Markus Mohrhard from comment #4)
> I have most of it fixed now.
> 
> There seem to be a few issues left with the category axis but I have no idea
> why that happens.

Let's treat the remaining issues as a new bug. I think they are not directly related to my patch.

There are a number of issues to the export that show some API issues and the axis handling might need some improvements.
Comment 6 Commit Notification 2015-05-11 03:20:50 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cffa77304daf2379a056bb2d86fe041e7c98bc52

only export series for same axis into same chart type element, tdf#84347

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2015-05-11 03:20:54 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=285d5c52f8dc07f15c62ca9698209f6132b91467

add test for tdf#84347

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2015-05-12 18:05:39 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1573315ec978b7f53a8babeb7ad44e104896209e

export each axis only once non-deleted, related tdf#84347

It will be available in 5.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.