Bug 99883 - Chart axis description is not imported properply
Summary: Chart axis description is not imported properply
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords:
Depends on:
Blocks: Chart-Labels
  Show dependency treegraph
 
Reported: 2016-05-16 15:40 UTC by Dennis Roczek
Modified: 2023-09-30 18:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
comparison of Excel 2013 and LibreOffice (151.29 KB, image/png)
2016-05-16 15:40 UTC, Dennis Roczek
Details
VDS90 (18.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-05-16 15:43 UTC, Dennis Roczek
Details
How it looks in 6.2 master (86.13 KB, image/png)
2018-09-12 13:43 UTC, Xisco Faulí
Details
This is how it look in LO 6.2 on Windows. (118.39 KB, image/png)
2018-09-12 13:49 UTC, BogdanB
Details
The example file in current Calc master (141.01 KB, image/png)
2019-11-08 09:42 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Roczek 2016-05-16 15:40:05 UTC
Created attachment 125093 [details]
comparison of Excel 2013 and LibreOffice

Version: 5.2.0.0.alpha1+
Build-ID: d8f73e1da3f799b004dec3875f433aa44685fc23
CPU-Threads: 4; BS-Version: Windows 6.2; UI-Render: Standard; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-05-01_13:08:56
Gebietsschema: de-DE (de_DE)

the chart at the sheet "Auswertug" is imported not correctly, see screenshot. the axis description is rotated by 45° and not all descriptions are displayed.
Comment 1 Dennis Roczek 2016-05-16 15:43:00 UTC
Created attachment 125094 [details]
VDS90
Comment 2 Buovjaga 2016-05-16 16:43:33 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.2.0.0.alpha1+
Build ID: 1dbdc947fcc9d843764731e6dae7ce60082576e0
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on May 14th 2016
Comment 3 JoNi 2016-05-21 22:13:14 UTC
it's not a problem with import but with presentation

specific with presentation of multi line tick labels

the tick label in VDS90.ods, table "Auswertung", cell C36 is
"Organische Syndrome (Gedächtnis,
Konzentration)"

Excel displays this as "Organische Syndrome (Gedächtnis,..." in the chart.

While LO tries to squeeze both lines in the chart, fails and falls back to a 45° auto rotate mode. Then tries to display as many labels as possible in that mode. Then fails again (different bug I guess, details PS) and fits only 4 labels on the y-axis.

proof:
* open VDS90.ods
* goto table "Auswertung", cell C36
* unprotect sheet (tools - [x]protect sheet...)
* remove the second line from that cell value
--> Chart displays correctly


PS:
This bug exposes an other weird behaviour. There should fit more labels on y-axis in 45° rotation.
unprotect the sheet, select the y-axis, change text orientation to 1°
--> every second label is shown, including the one from C36
guess the overlapping check for tick labels is very basic.
The 45° auto rotate mode might be a good idea for x-axis tick labels but for y-axis tick labels it actually fits less labels than plain 0°.

So either improve the overlapping check for y-axis tick labels or disable the 45° auto rotate mode for y-axis.
Comment 4 Commit Notification 2016-06-11 10:25:59 UTC
Jochen Nitschke committed a patch related to this issue.
It has been pushed to "master":

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

try auto rotate tick labels only when useful tdf#99883

It will be available in 5.3.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 5 JoNi 2016-06-11 11:34:04 UTC
(In reply to Commit Notification from comment #4)
> Jochen Nitschke committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=99226f343e4ad9ebcbb4e31c17d3fb706153e18b
> 
> try auto rotate tick labels only when useful tdf#99883
Now every second tick label should be displayed.

Next step is to detect manual line breaks in tick labels
and shorten such labels at the line break if needed.
It might be a good idea to check for very long labels at the same time and shorten these too. see bug#89863

question is: what is too long?
Comment 6 Xisco Faulí 2016-12-06 11:33:37 UTC
Hello Jochen,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Comment 7 Xisco Faulí 2018-09-12 13:43:19 UTC
Created attachment 144818 [details]
How it looks in 6.2 master
Comment 8 BogdanB 2018-09-12 13:49:02 UTC
Created attachment 144819 [details]
This is how it look in LO 6.2 on Windows.

This is how it look in LO 6.2 on Windows.
Comment 9 QA Administrators 2019-09-13 02:50:28 UTC Comment hidden (obsolete)
Comment 10 NISZ LibreOffice Team 2019-11-08 09:42:12 UTC
Created attachment 155629 [details]
The example file in current Calc master

Looks somewhat better in current master:

Version: 6.4.0.0.alpha1+ (x86)
Build ID: 80109586e6cb6d3e2e0a53a9079c3125ec9b8368
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

The problem is with the long "Organische Syndrome (Gedächtnis, Konzentration)" text.
Excel truncates this but LO does not. 
To display all categories in LO one needs to enable the Overlap axis label property. Manually enabling it displays all labels, and Calc saves it to ODS correctly.
Excel has no such property, and because of the truncation behavior it does not need it. So it does not even save it in ODS.

The example ODS was last saved by Excel, this is why the Overlap property is missing and every second label is not displayed in Calc.

One can argue that this is not our bug. Manually reducing the length of that string makes all labels appear.

In the long run we should probably copy the label truncation behavior of Excel, there are other bugs about that.
Comment 11 QA Administrators 2021-11-08 04:08:27 UTC Comment hidden (obsolete)
Comment 12 Dennis Roczek 2021-11-16 09:33:53 UTC
(In reply to NISZ LibreOffice Team from comment #10)
> Created attachment 155629 [details]
> The example file in current Calc master
> 
</snip>
nothing changed with
Version: 7.2.2.2 (x64) / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 13 Stéphane Guillou (stragu) 2023-09-30 18:30:46 UTC
Same in recent master build:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e9a0c97de95688b2f86bbb4dd8c823af5442401c
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded