Bug 112787 - Chart, x-y scatter with Sort by X values breaks with empty cells
Summary: Chart, x-y scatter with Sort by X values breaks with empty cells
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:
Keywords:
Depends on:
Blocks: XY-Scatter-Chart
  Show dependency treegraph
 
Reported: 2017-09-30 19:31 UTC by Stéphane Aulery
Modified: 2024-10-16 05:56 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Chart-sort-by-X-bug.ods (21.23 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-09-30 19:31 UTC, Stéphane Aulery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Aulery 2017-09-30 19:31:57 UTC
Created attachment 136655 [details]
Chart-sort-by-X-bug.ods

From: Shannon Dealy <dealy@deatech.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libreoffice-calc: Chart, x-y scatter with Sort by X values breaks with empty cells
Date: Sat, 02 Jul 2016 10:49:37 +0200

Package: libreoffice-calc
Version: 1:4.3.3-2+deb8u4
Severity: normal

Dear Maintainer,

I selected two columns of cells in a spreadsheet which had empty cells
between the rows of data in these columns, however, a filter was turned on
which displayed only the non-empty rows for these columns. I created an X-Y
scatter plot with points and lines in calc, with the "Sort by X values"
option and the chart was correctly created. Once the filter was turned off,
displaying the empty cells, the points remained in the correct places, however,
the order of the lines was rearranged so that the X sorting was no longer
being correctly observed. I had naturally expected that the chart would
not be affected by the filter being removed as only empty cells were added.

Some experimentation has shown that it is not the filter, but some strange
function of the number of empty cells between the rows that have data.
With the filter turned off and just inserting and deleting empty rows I get
different plots for the exact same data, given in the exact same order.
I created a spreadsheet with nothing but the data being ploted and a chart
and found that the order of the line plotting changed depending on the
number of rows of empty cells between the different rows of data values.
In other words, it does not just fail to sort the rows by the X value when
there are empty cells, but the order it uses for the plot changes based
on where and how many empty rows there are between the data values.


The attached file can be used to demonstrate the bug.

 - Select "not empty" for the Y column filter and the chart will display
   correctly, sorted by the X values.

 - Change the filter selection so all rows display again. This will
   make the chart return to its original incorrect display

 - Now select cells B8 - C11 and delete them with the option to move
   cells up. The chart will now display incorrectly in a different
   manner, even though the data has not changed and remains in the
   same order, only empty cells have been removed.

 - Other changes to the number of rows of empty cells can result
   different versions of the wrong display.

Regards,

Shannon C. Dealy           |         DeaTech Research Inc.
dealy@deatech.com          |    - Custom Software Development -
Telephone: +1 541-929-4089 |    - Natural Building Instruction -
USA only:     800-467-5820 |            www.deatech.com
Comment 1 Buovjaga 2017-11-02 17:10:50 UTC
Repro with document.

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha1+
Build ID: fff7097f1ed8493de099d79aa0613ea6b309100a
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on November 2nd 2017

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 2 QA Administrators 2018-11-03 03:50:28 UTC Comment hidden (obsolete)
Comment 3 Stéphane Aulery 2018-11-04 19:40:17 UTC
Reproduce with :

Version: 6.0.6.2 (x64)
Build ID: 0c292870b25a325b5ed35f6b45599d2ea4458e77
Threads CPU : 2; OS : Windows 6.1; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: group
Comment 4 QA Administrators 2021-03-19 04:41:07 UTC Comment hidden (obsolete)
Comment 5 Julien Nabet 2022-12-21 14:25:30 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.