Bug 123828 - FILESAVE In Combined chart bar chart does not preserve the secondary axis alignment setting
Summary: FILESAVE In Combined chart bar chart does not preserve the secondary axis ali...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.3.0
Keywords: filter:xlsx
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2019-03-04 09:28 UTC by NISZ LibreOffice Team
Modified: 2019-04-17 12:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the problem in Calc. (129.52 KB, image/png)
2019-03-04 09:32 UTC, NISZ LibreOffice Team
Details
test file about the bug in ods, if you save this as ooxml you can check out the result (17.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-03-04 09:34 UTC, NISZ LibreOffice Team
Details
test file created by MSO (20.64 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-03-04 09:34 UTC, NISZ LibreOffice Team
Details
chart wizard in excel and calc (201.92 KB, image/png)
2019-03-04 09:39 UTC, Adam Kovacs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-03-04 09:28:22 UTC
Description:
If we set the axis alignment of a bar chart to secondary in a combined chart and save it to some OOXML format (docx, xlsx, …), it will be saved as primary.
Or if we open an OOXML file created by MSO with the same settings, it will also be reverted to primary.

Steps to Reproduce:
    1. Make some data series with row and column labels and with different min and max values (for example minus values in one data series and no minus values in the other)
    2. Select the area of the data series including the row and column labels
    3. Click to insert menu and select chart
    4. Select column and line chart type and enter the number of line charts you want (for example if you have 4 data series and you enter 3, then you will have 1 bar chart and 3 line charts)
    5. Click next or select data range
    6. Toggle data series in rows or columns if needed, and toggle first row or first column as label if needed
    7. Click next or select data series
    8. If you want to make bar chart from a different data series, you need to select it and click on the up arrow button as long as needed
       (for example if you have 4 data series and you entered 3 as the value of line charts, and you want the last data series to be bar chart, you need to select it and click on the up arrow button 3 times)
    9. Click on finish
    10. Click twice on the bar chart
    11. Select secondary Y axis at align data series to
    12. Click on OK button
    13. Save or save with xlsx extension, click on File menu and select reload

Actual Results:
in combined chart the secondary axis alignment setting of bar charts will be saved as primary

Expected Results:
keep the axis alignment setting as secondary


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-03-04 09:32:19 UTC
Created attachment 149702 [details]
Screenshot of the problem in Calc.
Comment 2 NISZ LibreOffice Team 2019-03-04 09:34:10 UTC
Created attachment 149703 [details]
test file about the bug in ods, if you save this as ooxml you can check out the result
Comment 3 NISZ LibreOffice Team 2019-03-04 09:34:37 UTC
Created attachment 149705 [details]
test file created by MSO
Comment 4 Adam Kovacs 2019-03-04 09:39:26 UTC
Created attachment 149708 [details]
chart wizard in excel and calc

an additional screenshot about the differences in chart wizards
Comment 5 Aron Budea 2019-03-25 02:52:16 UTC
Bug 121744 was of a somewhat similar issue, right?
Comment 6 Balázs Varga 2019-03-25 08:03:39 UTC
(In reply to Aron Budea from comment #5)
> Bug 121744 was of a somewhat similar issue, right?

This BUG different from 121744. Because this bug accompanies to all chart types not just combined chart. For example, if you do the same with two simple line chart (one series on the primary axis and one on the secondary) and then export to OOXML the gridlines and the secondary axis will disappear. I already have a working patch for that, but other problems have come up to the surface: The first export was OK but if you reopen the file and add another series to the secondary axis and save the file, there will be an XML error while you open it in MS Office. The reason is because the LibreOffice handle these series as a different linecharts.
Comment 7 raal 2019-04-09 02:13:42 UTC
Confirm with Version: 6.3.0.0.alpha0+
Build ID: 31ac398cfa30694b18240d31df17a58d699b5bf6
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;
Comment 8 Commit Notification 2019-04-17 12:31:14 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9be1b6cf5b97727135c7f5e48c971edd8dc45e70%5E%21

tdf#123828 XLSX combined chart export: fix order of axis types

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.