Issue 35226 - XY diagrams+regressions are incorrect if input data has gaps
Summary: XY diagrams+regressions are incorrect if input data has gaps
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-09 13:42 UTC by Matthias Basler
Modified: 2013-02-24 21:18 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Spreadsheet showing a diagram with a wrong regression line. (12.01 KB, application/vnd.sun.xml.math)
2004-10-09 13:44 UTC, Matthias Basler
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Matthias Basler 2004-10-09 13:42:36 UTC
Working with X-Y-Diagrams and regressions I discovered some erroneous behaviour
concerning the diagram's axis scale and regression display:

- The x axis scale will automatically start at 0, even if there is no value of o
in the table (except the gap, which should be ignored!)
- A linear regression shown in the diagram is placed incorrectly if the axis
scale(s) are manually changed. It always assumes the axis to start at 0.

To make this much clearer I have an example document attached. You can also do
the following to reproduce the error:

Open a new document
Enter a XY table with at least one gap, e.g.
	X	Y
A	5	10
B	6	12
C	7	13
D		        <-gap
E	9	21
F	11	20
G	4	7
H	3	6

Calculate the regression: y=x*2.01-0.2
This works correctly. 
1.
Now insert an X-Y-diagram. The diagram will scale the x axis from 0 to 11,
although is should be 3 to 11. This is because of the data gap, but nonetheless
is an error of OOo.
2.
Now insert a linear regression. It will show up correctly.
Now manually rescale the x axis from 3 to 11. The data points will change
accordingly, but not the linear regression. It remains where it was and
consequently is WRONG.
3.
Now set the x axis back to automatic values.
Then enter some data into the gap (see how the diagram changes) and remove it
afterwards.
Now the x axis scales (automatically) correctly, but the regression is wrong
again. Funny, isn't it?

Result:
- A gap in the data set makes XY diagrams scales their axis' incorrectly
  (start at 0)
- A gap in the data set makes regressions to be drawn wrongly
  unless the x axis starts at 0.

I think this error is serious, because it simply produces wrong regression
diagrams - a big problem for serious scientific work!
Comment 1 Matthias Basler 2004-10-09 13:44:27 UTC
Created attachment 18259 [details]
Spreadsheet showing a diagram with a wrong regression line.
Comment 2 Matthias Basler 2004-10-09 14:35:43 UTC
Found in the OOo2.0 branch (OOo1.9.54) as well. This definitely needs to be
fixed until OOo2.0 final IMHO.
Comment 3 frank 2004-10-11 07:50:17 UTC
Wrong Component, I've changed it.

Frank
Comment 4 frank 2004-10-11 07:50:59 UTC
reassigned and confirmed
Comment 5 kla 2004-10-11 14:24:38 UTC
Hi Bjoern,
pls have a look.
tk
Comment 6 bjoern.milcke 2004-10-25 14:21:29 UTC
The gap is probably taken into account in the calculation of "n", the number of
data points for the calculation.
Comment 7 IngridvdM 2007-07-27 18:50:32 UTC
This bug was fixed with the complete re-implementation of the chart module
starting with version SRC680m213.
Comment 8 bjoern.milcke 2007-07-30 15:42:52 UTC
->kla: Please verify and close.
Comment 9 kla 2007-08-02 14:27:44 UTC
verified
Comment 10 kla 2007-08-02 14:28:13 UTC
seen ok in master -> closed