Bug 141657 - FILEOPEN XLSX Chart display is incorrect
Summary: FILEOPEN XLSX Chart display is incorrect
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2021-04-12 18:52 UTC by Xisco Faulí
Modified: 2023-05-02 07:51 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2021-04-12 18:52:44 UTC
This is a follow-up of bug 140489

Steps to reproduce:
1. Open attachment 169838 [details] from bug 140489

-> Yellow color is lost in the chart. See how it looks in excel

https://bug-attachments.documentfoundation.org/attachment.cgi?id=169839

Reproduced in


Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 8043fe3e45c8999c8eaf475ba46d50b125e38b93
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2021-04-12 18:54:17 UTC
Regression introduced by

https://cgit.freedesktop.org/libreoffice/core/commit/?id=cbe6c4929c9da28ce5553ce31782027d5111ed16

author		Tünde Tóth <tundeth@gmail.com>	2019-11-27 10:24:50 +0100
committer	Balazs Varga <balazs.varga991@gmail.com>	2020-04-28 08:02:59 +0200

"tdf#127811 tdf#127813 Introduce compatibility key for the data series"

Bisected with: bibisect-linux64-7.0

Adding Cc: to Tünde Tóth
Comment 2 Xisco Faulí 2021-04-12 18:55:14 UTC
@Szymon Kłos, Since you fixed bug 140489, I thought you might be interested in this issue
Comment 3 Xisco Faulí 2021-04-12 19:14:38 UTC
of course, the issue is fixed if ReverseSeriesOrderAreaAndNetChart is set to False
@Tünde Tóth, why ReverseSeriesOrderAreaAndNetChart is enabled by default ?
Comment 4 NISZ LibreOffice Team 2021-04-13 08:53:04 UTC
I looked into the example file (attachment 154579 [details]) of bug 127811

In 6.4 the area charts data series were in correct z-order on opening (matched PP), but in the legend the entries order was reversed. This is bug #127811

On save both the data series order and the legend entries order reversed when reopened in PP. This is bug 127811.

Now in 7.2 the area charts data series are in reversed z-order on opening (NOT matching PP), but the in legend the entries order now matches PP. This happens with the yellow area type data series in this attachment 169838 [details] example file.

On save the data series and legend entries order matches the original when the LO-saved file is opened in PP.
Comment 5 NISZ LibreOffice Team 2021-04-13 13:49:49 UTC
Another aspect of this fix:

The compatibility option was needed because the series order is different in ODF/OOXML.
The default value is there for maintaining the ODF-compatibility and the side effect is that OOXML opening changed as seen before.

Changing the compatibility option makes the OOXML area charts open just like in MSO, but in new charts created and saved&reopened to ODF the series z-order would look differently.
Comment 6 Szymon Kłos 2021-04-13 14:06:27 UTC
(In reply to NISZ LibreOffice Team from comment #5)
> Changing the compatibility option makes the OOXML area charts open just like
> in MSO, but in new charts created and saved&reopened to ODF the series
> z-order would look differently.

So we need the information in which "style" is the currently stored model and convert it accordingly to selected format on export.
Comment 7 Szymon Kłos 2021-04-14 14:41:13 UTC
fix: https://gerrit.libreoffice.org/c/core/+/114100
Comment 8 Szymon Kłos 2021-04-19 07:03:28 UTC
I found my fix in current state is not in mergable state.

Real problem is that MSO and LO are drawing series in different order:
           example: area chart has series 1 2 3 4
                    MSO draws series in order 1 2 3 4
                    LO draws series in order 4 3 2 1
                    LO and MSO draw legend in order 1 2 3 4

we have 3 possible solutions:
             1. "Do Nothing" (current approach in LO):
                legend is drawn correctly but chart areas
                in reversed order 
                - this bug will be present
             2. "Reverse series on MSO format import and export"
                chart areas are drawn correctly but legend
                in reversed order (MSO does that with ODF)
                - tdf#127811 will be again broken
             3. we introduce special chart view mode compatible
                with MSO to use with MSO formats
                (would be perfect, I tried this but requires
                 modifying all export filters to save correctly...)
                - all should be fine

I think 3rd option can cause new problems in export filters and make code more complex.
MSO has the same problem but with ODF where we draw in reversed order, they use solution 2. I think we could do the same. I think drawing chart area in correct order is more important that order of legend for data analysis. What do you think? Of course this will be workaround which will reopen tdf#127811 but close this bug instead.
Comment 9 QA Administrators 2023-04-29 03:29:31 UTC Comment hidden (obsolete)
Comment 10 Xisco Faulí 2023-05-02 07:51:42 UTC
Still reproducible in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 424bdeda9fea09f0b48b5551baf872656845c7c3
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded