Bug 134059 - Loss of nominated Chart data series Labels when target cells hidden or grouped & collapsed
Summary: Loss of nominated Chart data series Labels when target cells hidden or groupe...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Leyan
URL:
Whiteboard: target:7.2.0 target:7.1.0.0.beta2
Keywords:
Depends on:
Blocks: Chart-Labels
  Show dependency treegraph
 
Reported: 2020-06-17 05:44 UTC by HHumber
Modified: 2021-02-08 19:32 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample data I used with basic chart as created. (14.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-06-17 05:44 UTC, HHumber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description HHumber 2020-06-17 05:44:07 UTC
Created attachment 162089 [details]
Sample data I used with basic chart as created.

I've been playing with some simple charts amd was surprised at some behaviour of Calc in how it displays nominated data series labels. If I hide or otherwise group the row or columns containing the cells I've nominated; the labels default to the application column or row header; i.e. A, B, C... or 1, 2, 3....

Normally either grouping or hiding cells in my past experiences still leaves them addressable by other means? 

I'm running LO version: 6.3.6.2 under Windows 10, and I also replicated the behaviour with 6.0.7.3 under Linux Mint 19.3 under which I logged this.


Hopefully my screen shots linked from imgur are acceptable;

* https://i.imgur.com/Ww9GWa9.jpg - Looks OK, but I want to use shorter form column descriptions on the chart legend at right. See row 10.

* https://i.imgur.com/Kn359wv.jpg - The only part of the wizard dialog I tweak in order to achieve what I want. Shown are the defaults.

* https://i.imgur.com/75ocdzP.jpg - Manually selected cells in the corresponding columns in row 10 for the label names.

* https://i.imgur.com/B463CyB.jpg - Chart exactly how I hoped.

* https://i.imgur.com/pYeRMik.jpg - Wanting to tidy up the appearance of the tabular data, I hide the row with the short form column labels. Ack! The chart labels disappear and pick up column default.

* https://i.imgur.com/QVU0Ccy.jpg - Similar behaviour Showing/unhiding the row and grouping & collapsing it instead.


Original tabular data with chart attached;
Comment 1 Buovjaga 2020-11-09 09:25:59 UTC
Reproduced with file. Also seen with 4.4.7 and 3.3.0 on Win 10.

Arch Linux 64-bit
Version: 7.1.0.0.alpha1+
Build ID: c9b320c32aceab7e22d381b688e7b44030e01c2d
CPU threads: 8; OS: Linux 5.9; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 8 November 2020
Comment 2 Leyan 2020-11-19 22:49:51 UTC
This is not a bug, hidden cells are filtered by design. If you want to see their values, you can select the data series in the chart, go to "Format Data Series ...", then Options, then "Include values from hidden cells". However, that will apply to both values and labels.

Excel has the same option, but with a different behavior: labels in hidden cells are always displayed, regardless of the option status, which seems to be closer to the behavior you expected.
Comment 3 Buovjaga 2020-11-20 06:35:39 UTC
(In reply to Leyan from comment #2)
> This is not a bug, hidden cells are filtered by design. If you want to see
> their values, you can select the data series in the chart, go to "Format
> Data Series ...", then Options, then "Include values from hidden cells".
> However, that will apply to both values and labels.
> 
> Excel has the same option, but with a different behavior: labels in hidden
> cells are always displayed, regardless of the option status, which seems to
> be closer to the behavior you expected.

Thanks, Leyan. Let's ask UX team for opinions before closing this as notabug.
Comment 4 Leyan 2020-11-21 14:59:11 UTC
(In reply to Buovjaga from comment #3)
> 
> Thanks, Leyan. Let's ask UX team for opinions before closing this as notabug.
I had a look at the ODF standard and it seems to agree with the bug reporter. This option is aimed to data points, not cells related to label or other usage: 
> The chart:include-hidden-cells attribute specifies whether data points 
> in hidden cells are plotted in a chart. The default is to plot data points 
> in hidden cells.
This is also what Excel does, and I agree that it would be a better user experience. I proposed a patch to change this behavior and always use hidden cells in the label, regardless of the include-hidden-cells setting: https://gerrit.libreoffice.org/c/core/+/106317
Comment 5 Commit Notification 2020-11-23 06:31:30 UTC
Ouyang Leyan committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fd5f3b212a38ec6ef35d2686ce5a7cc39cb7d377

tdf#134059 Always include hidden cells in chart series label

It will be available in 7.2.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 6 Heiko Tietze 2020-11-23 09:46:54 UTC
(In reply to Commit Notification from comment #5)
> Ouyang Leyan committed a patch related to this issue.

Please resolve this ticket as fixed if the issue has been solved or mitigated.
Comment 7 Commit Notification 2020-11-23 14:39:27 UTC
Ouyang Leyan committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/b030440833e39bc15a72a2db4b2e782b882e0baa

tdf#134059 Always include hidden cells in chart series label

It will be available in 7.1.0.0.beta2.

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 8 Heiko Tietze 2020-11-27 10:07:59 UTC
Removing UX since a patch has been submitted; NEEDINFO in respect to comment 6.
Comment 9 Buovjaga 2020-11-27 10:51:07 UTC
NEEDINFO is needlessly dangerous & destructive here
Comment 10 Xisco Faulí 2021-02-08 14:58:49 UTC
I do confirm this issue is fixed in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: faadf530c22d1874640936b8554845d7ff36f263
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Leyan, thanks for fixing this issue. Closing as VERIFIED FIXED

I've added a UItest in https://gerrit.libreoffice.org/c/core/+/110582
Comment 11 Commit Notification 2021-02-08 19:32:19 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1bda6965c905924e8f315063973772585ca87402

tdf#134059: sc: Add UItest

It will be available in 7.2.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.