Bug 111936 - CHARTS: Bad display on data label in percent stacked chart
Summary: CHARTS: Bad display on data label in percent stacked chart
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2017-08-21 07:55 UTC by Dimitri Bouron
Modified: 2018-12-05 12:12 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Test file with number values (9.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-08-21 07:55 UTC, Dimitri Bouron
Details
Test file with percent values (12.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-08-21 07:56 UTC, Dimitri Bouron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitri Bouron 2017-08-21 07:55:25 UTC
Description:
Data label takes bad format in percent stacked chart. It displays a percent format with two decimals instead of source format.

Steps to Reproduce:
1. Click on a cell value in Calc. (See attachments)
2. Click on "Insert Chart" button and select "Column" or "Bar" chart type.
3. Select "Percent Stacked"
4. Right click on columns and select "Insert Data Label"

Actual Results:  
In attachment "test_number", data label has incoherent formatting (800.00% instead of 8 for example).
In attachment "test_percent", data label is formatted as percent with two decimals (7.61% instead of 7.6% for example).

Expected Results:
Data label format should be the same as source, like "Normal" or "Stacked" chart type.


Reproducible: Always

User Profile Reset: No

Additional Info:
In source code, data label format are defined according to Y axis. In percent stacked chart, we shouldn't consider this axis but source.


User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Comment 1 Dimitri Bouron 2017-08-21 07:55:58 UTC
Created attachment 135684 [details]
Test file with number values
Comment 2 Dimitri Bouron 2017-08-21 07:56:16 UTC
Created attachment 135685 [details]
Test file with percent values
Comment 3 Regina Henschel 2017-08-21 08:56:27 UTC
Yes, the "source" setting for format does not work, see bug 95425.

*** This bug has been marked as a duplicate of bug 95425 ***
Comment 4 Dimitri Bouron 2017-08-22 13:12:21 UTC
I agree that bug 95425 describes a very similar problem.
But, I am pretty sure we should not consider this one as a duplicate.

Indeed, steps to reproduce and expected result are different than bug 95425.
I am speaking about the default data label of stacked percent chart type, not reformatting when we open in data label edition window.

Please, consider this bug as "unconfirmed" awaiting validation of someone else.

Regards
Comment 5 Buovjaga 2017-09-02 16:48:30 UTC
Reproduced.

Works OK in 3.6 (with both files).

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 4082b5874adddedf8332fe977b6bb47b6949b302
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 31st 2017

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 6 Aron Budea 2017-09-23 13:28:52 UTC
OK in 4.2.0.4, not OK in 4.3.0.4, adjusting version field.
Comment 7 fvroman 2017-12-07 07:47:21 UTC
Can someone can review the submitted patch https://gerrit.libreoffice.org/41424 so, hopefully, it can be merged

Thanks for your time.
Comment 8 Buovjaga 2018-07-09 19:02:50 UTC
Bisected (against test_number) with Linux 44max to:
commit 9135b8b04a9f2ff33d1500876e48c6d2d42ecae0
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 21:46:04 2015 +0800

    source-hash-1d38cb365543924f9c50014e6b2227e77de1d0c9
    
    commit 1d38cb365543924f9c50014e6b2227e77de1d0c9
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Fri Jun 13 11:12:50 2014 -0400
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Thu Jun 19 14:46:56 2014 -0400
    
        fdo#71076, fdo#71767: Preserve number formats when charts are copied.

I noticed with this commit, test_percent gives labels like 454% instead of ones with decimals. It gives decimals in older ones, a mix of ,00 and ,0. But there are difficulties in investigating, because some builds create a blank chart.
Comment 9 Markus Mohrhard 2018-11-29 02:26:37 UTC
Please retest after the fix for Bug 105236 has been merged. At least in my tests it seems to be fixed.

If this is not yet fixed I might need more detailed steps how to reproduce the bug.
Comment 10 Buovjaga 2018-11-30 20:28:37 UTC
(In reply to Markus Mohrhard from comment #9)
> Please retest after the fix for Bug 105236 has been merged. At least in my
> tests it seems to be fixed.
> 
> If this is not yet fixed I might need more detailed steps how to reproduce
> the bug.

Thanks, both cases from Dimitri produce the expected result now! The other report had a somewhat different topic, so I will not close as dupe.

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: 9059457a1a8385cb80b5dd2c797cee77af4222a9
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3_kde5; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 30 November 2018