Bug 56580 - logarithmic graph Y error shows as a diagonal line when apply negative error values
Summary: logarithmic graph Y error shows as a diagonal line when apply negative error ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: Other All
: high normal
Assignee: kurt.nordback@protonmail.com
URL:
Whiteboard: BSA target:7.5.0 target:7.4.0.0.beta2
Keywords:
: 139256 (view as bug list)
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2012-10-30 11:47 UTC by stephanfrye
Modified: 2022-07-04 08:58 UTC (History)
2 users (show)

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


Attachments
Sample graph showing diagonal negative error bar (3.94 KB, image/png)
2012-10-30 12:53 UTC, stephanfrye
Details
testcase (11.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-05-30 18:59 UTC, Jorendc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stephanfrye 2012-10-30 11:47:54 UTC
Problem description: 
Diagonal Y error bar

Steps to reproduce:
1. make column diagram
2. logarithmic Y axis
3. set value for the negative Y-error greater than the Y-value

Current behavior:
negative error bar starts in the upper left corner

Expected behavior:
error bar goes into negative area

Platform (if different from the browser): 
              
Browser: Opera/9.80 (Windows NT 5.1; U; de) Presto/2.10.289 Version/12.02
Comment 1 stephanfrye 2012-10-30 12:53:09 UTC
Created attachment 69304 [details]
Sample graph showing diagonal negative error bar
Comment 2 Jorendc 2013-05-30 18:33:51 UTC
hi,

Thanks for reporting. I did some tests and I can reproduce your behavior.

Some more detailed steps:
* Open Calc
* Type some values in rows and columns
* select values and create a regular bar chart of it (just skip all steps of creating one)
* Double click on your chart
* Format > Axis > Y
* Go to tab 'scale'
* check 'logaritmic scale' -> OK

* Insert > Y Error Bars
* 'Constant Value' and make sure you set 'Negative (-)' value quite high
* Ok

Deselect chart (if necessary)

Result: just a line, no chart. If you select the line and double click on it, a chart will be displayed again.

Tested using Linux Mint 15 x64 with LibreOffice Version: 4.2.0.0.alpha0+
Build ID: fa3d5ca1f99fe253689004a45ec2888ebbe85fd

Kind regards,
Joren
Comment 3 Jorendc 2013-05-30 18:59:07 UTC
Created attachment 80064 [details]
testcase
Comment 4 QA Administrators 2015-06-08 14:42:04 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2015-06-21 18:51:33 UTC
(In reply to Jorendc from comment #3)
> Created attachment 80064 [details]
> testcase

Confirmed.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 6 QA Administrators 2016-09-20 10:10:37 UTC Comment hidden (obsolete)
Comment 7 wim.burmeister@ibs.fr 2016-10-20 05:40:05 UTC
The bug still persists in version 5.2.2.
Tested on Windows

Using logarithmic y scale, negative values of the error bar provokes diagonal lines, graph collapses to diagonal line when not selected.

Same problem as Bug 86407. 

Under linux graph draws correctly but collapses to diagonal line when not selected.
Comment 8 QA Administrators 2017-10-23 14:04:28 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-05-23 03:43:08 UTC Comment hidden (obsolete)
Comment 10 snowboard975 2020-12-27 11:36:10 UTC
*** Bug 139256 has been marked as a duplicate of this bug. ***
Comment 11 snowboard975 2020-12-27 11:37:28 UTC
Reproducible on Libreoffice Calc version 6.4.7.2 (x64) in Windows
Comment 12 kurt.nordback@protonmail.com 2022-05-29 21:28:32 UTC
I've committed a proposed fix for this bug. It checks in VSeriesPlotter::createErrorBar() for a non-finite negative error bar position, and turns off the negative bar in that case. This mimics the behavior of MS Office, though Office also shows a pop-up dialog warning.

I was trying to keep this very focused so I didn't add corresponding code in the positive case (which I can see being a problem only in the event of numerical overflow).
Comment 13 Buovjaga 2022-05-30 05:43:47 UTC
(In reply to kurt.nordback@protonmail.com from comment #12)
> I've committed a proposed fix for this bug. It checks in
> VSeriesPlotter::createErrorBar() for a non-finite negative error bar
> position, and turns off the negative bar in that case. This mimics the
> behavior of MS Office, though Office also shows a pop-up dialog warning.
> 
> I was trying to keep this very focused so I didn't add corresponding code in
> the positive case (which I can see being a problem only in the event of
> numerical overflow).

Patch: https://gerrit.libreoffice.org/c/core/+/135106
Comment 14 Commit Notification 2022-07-01 07:13:12 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

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

tdf#56580 Fix negative error bars on log chart

It will be available in 7.5.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 15 Buovjaga 2022-07-01 07:37:46 UTC
Thank you Kurt for the fix and Mike for the review, let's close this.
Comment 16 Commit Notification 2022-07-04 08:58:46 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/31e982283e1abd0233c06f6f224c34298efabe97

tdf#56580 Fix negative error bars on log chart

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