Bug 96871 - Log Y axis auto scale should not expand to B^0
Summary: Log Y axis auto scale should not expand to B^0
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Laurent Balland
Whiteboard: target:5.2.0
Depends on:
Reported: 2016-01-03 12:22 UTC by Laurent Balland
Modified: 2016-10-25 19:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

XY chart with Y-axis auto log scale (19.29 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-01-03 12:22 UTC, Laurent Balland

Note You need to log in before you can comment on or make changes to this bug.
Description Laurent Balland 2016-01-03 12:22:34 UTC
Created attachment 121693 [details]
XY chart with Y-axis auto log scale

Description: ScaleAutomatism::calculateExplicitIncrementAndScaleForLogarithmic function expands Y-axis auto log scale to B^0 (=1) in almost all cases. On a log scale, "1" has no special meaning: it is not the origin, like "0" is on a linear scale.
See http://opengrok.libreoffice.org/xref/core/chart2/source/view/axes/ScaleAutomatism.cxx#calculateExplicitIncrementAndScaleForLogarithmic
step 2, more specifically
/*  If minimum is less than 5 (i.e. original source values less than
    B^5, B being the base of the scaling), or if minimum and maximum
    are in different increment intervals (means, if minimum and maximum
    are not both in the range [B^n,B^(n+1)] for a whole number n), set
    minimum to 0, which results in B^0=1 on the axis. */

Steps to reproduce:
1. Create XY data with Y values between 10^4 and 10^6
2. Create XY chart with Y-axis auto log scale or open attached document

Actual behavior:
Y-axis starts from 1, which creates an empty space between 1 and 10^4, that is 2/3 of chart area.

Expected behavior:
Y-axis should start from 10^4
Comment 1 Buovjaga 2016-01-04 13:34:04 UTC
Confirmed with attached document.

Win 7 Pro 64-bit Version:
Build ID: b4082bed2de12cd576a06a9f456a71101809f3ed
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-01-02_00:47:38
Locale: fi-FI (fi_FI)
Comment 2 Commit Notification 2016-04-06 14:26:27 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":


tdf#96871 Do not force auto log Y scale to B^0

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.