Bug 118705 - FILESAVE XLSX Column chart data label placement changes from above to outside
Summary: FILESAVE XLSX Column chart data label placement changes from above to outside
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:6.2.0 target:6.3.0 target:6.2.0.2
Keywords: filter:xlsx
Depends on:
Blocks:
 
Reported: 2018-07-11 18:02 UTC by Gabor Kelemen (allotropia)
Modified: 2018-12-20 09:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example chart (13.90 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-11 18:02 UTC, Gabor Kelemen (allotropia)
Details
Same chart as xlsx (7.16 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-07-11 18:02 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the two documents side by side in current master (291.14 KB, image/png)
2018-07-11 18:03 UTC, Gabor Kelemen (allotropia)
Details
Another example file from Word to test import options (57.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-09-11 14:20 UTC, Gabor Kelemen (allotropia)
Details
Label set as outside (119.94 KB, image/png)
2018-09-11 14:22 UTC, Gabor Kelemen (allotropia)
Details
Label set as center (128.41 KB, image/png)
2018-09-11 14:31 UTC, Gabor Kelemen (allotropia)
Details
Label set as inside (135.06 KB, image/png)
2018-09-11 14:43 UTC, Gabor Kelemen (allotropia)
Details
Label set as at base (41.41 KB, image/png)
2018-09-11 14:47 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-07-11 18:02:35 UTC
Created attachment 143484 [details]
Example chart

Attached simple column chart has data labels turned on.
Placement of the data labels by default is Above, so they appear above the columns.
After export to xlsx this changes to Outside, causing most of the labels still appear above the columns. 
However if there is a column with 0 value, the 0 no longer appears above the X axis, but under it, making itself and the X axis text both unreadable.

To reproduce:
1, Create a column chart, make sure to have one data with 0 value
2, Right click on a data series, choose Insert Data Labels
3, The data labels appear above the columns
4, Save as xlsx
5, Reload the xlsx, now the 0 data label appears below the X axis
Comment 1 Gabor Kelemen (allotropia) 2018-07-11 18:02:54 UTC
Created attachment 143485 [details]
Same chart as xlsx
Comment 2 Gabor Kelemen (allotropia) 2018-07-11 18:03:33 UTC
Created attachment 143486 [details]
Screenshot of the two documents side by side in current master
Comment 3 Xisco Faulí 2018-07-12 15:39:43 UTC
I can reproduce it in

Version: 6.2.0.0.alpha0+
Build ID: 4b345f95ce7cb09011892bf465cfdf3811adaf8e
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

Version: 5.0.0.0.alpha1+
Build ID: 0db96caf0fcce09b87621c11b584a6d81cc7df86
Locale: ca-ES (ca_ES.UTF-8)

in previous versions the data labels weren't exported...
Comment 4 Gabor Kelemen (allotropia) 2018-09-11 14:20:55 UTC
Created attachment 144793 [details]
Another example file from Word to test import options

This is another example of the situation: A simple Word file with a column chart, containing all four possible label alignment Word supports.
Comment 5 Gabor Kelemen (allotropia) 2018-09-11 14:22:46 UTC
Created attachment 144794 [details]
Label set as outside

By default Word sets labels as Outside. 
0 values are displayed above the horizontal axis in Word, but below it in Writer.
Comment 6 Gabor Kelemen (allotropia) 2018-09-11 14:31:18 UTC
Created attachment 144795 [details]
Label set as center

Label set as Center/Middle in Word makes 0 values appear above the horizontal axis, but at the middle of the axis in Writer.
Comment 7 Gabor Kelemen (allotropia) 2018-09-11 14:43:57 UTC
Created attachment 144796 [details]
Label set as inside

When the label is set as "At the value, inside" in Word, 0 values still appear above the horizontal axis, and they do so in Writer as well.
I think whatever happens in Writer in this case, should happen in the other cases as well.
Comment 8 Gabor Kelemen (allotropia) 2018-09-11 14:47:38 UTC
Created attachment 144797 [details]
Label set as at base

Fourth chart has label placement set as "At the base, inside". 
0 values appear above the horizontal axis in Word, and below in it Writer.
Comment 9 Commit Notification 2018-09-21 07:43:24 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

tdf#118705 Fix Column and Bar Chart data label placement

It will be available in 6.2.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 10 Commit Notification 2018-12-14 21:47:08 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#118705 Fix Column/Bar Chart data label placement

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.
Comment 11 Commit Notification 2018-12-20 09:42:19 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

Related: tdf#118705 Fix Column/Bar Chart data label placement

It will be available in 6.2.0.2.

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.