Bug 132480 - Lines are not spaced correctly for log scale graphs that don't start at a power of 10
Summary: Lines are not spaced correctly for log scale graphs that don't start at a pow...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
6.4.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2020-04-28 04:25 UTC by 7qia0tp02
Modified: 2024-09-17 21:36 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Examples of good and bad log scales (104.06 KB, image/png)
2020-04-28 04:26 UTC, 7qia0tp02
Details
Example of spreadsheet with log scale graph (17.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-04-29 02:13 UTC, 7qia0tp02
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 7qia0tp02 2020-04-28 04:25:24 UTC
Description:
If you make a graph with X axis starting at 10, and ending at 1000, the minor grid lines should (and will) be drawn at:

10
20
30
40
50
60
70
80
90
100
200
300
400
500
600
700
800
900
1000

If you make a graph with X axis starting at 20, and ending at 2000, the minor grid lines should be drawn at:

20
30
40
50
60
70
80
90
100
200
300
400
500
600
700
800
900
1000
2000

However, if you try the second case in LibreOffice Calc, it draws them with the same spacing as the first case, just with different labels, so the grid lines are actually at mostly useless numbers:

20
40
60
80
100
120
140
160
180
200
400
600
800
1000
1200
1400
1600
1800
2000

Instead, the lines should always fall on multiples of 10, regardless of starting point, not on arbitrary numbers.

Steps to Reproduce:
1. Create a graph
2. Insert minor grid lines
3. Set spacing to logarithmic
4. Set starting point at anything other than a power of 10

Actual Results:
See above

Expected Results:
See above


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.2.2 (x64)
Build ID: 4e471d8c02c9c90f512f7f9ead8875b57fcb1ec3
CPU threads: 12; OS: Windows 10.0 Build 18363; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 1 7qia0tp02 2020-04-28 04:26:20 UTC
Created attachment 160012 [details]
Examples of good and bad log scales
Comment 2 m_a_riosv 2020-04-28 10:01:46 UTC
Please attach a sample file.
Comment 3 7qia0tp02 2020-04-29 02:13:55 UTC
Created attachment 160050 [details]
Example of spreadsheet with log scale graph

You mean an ODS file?
Comment 4 Ming Hua 2020-04-29 03:28:57 UTC
(In reply to 7qia0tp02 from comment #3)
> Created attachment 160050 [details]
> Example of spreadsheet with log scale graph
> 
> You mean an ODS file?
Yes, thanks for the example.  I can confirm the described behavior using the example in 6.2.8:
Version: 6.2.8.2 (x64)
Build ID: f82ddfca21ebc1e222a662a32b25c0c9d20169ee
CPU threads: 2; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: zh-CN (zh_CN); UI-Language: en-US
Calc: threaded

So Calc indeed draws minor grid lines like the "bad" one in attachment 160012 [details], however I don't use logrithmatic scale graphs enough to confirm that everyone should draw it like the "good" one.
Comment 5 7qia0tp02 2020-04-30 03:39:59 UTC
(In reply to Ming Hua from comment #4)
> however I don't use logrithmatic scale graphs enough to
> confirm that everyone should draw it like the "good" one.

Well, I use them frequently and the major ticks are always on the powers of the base, even if the labels are elsewhere.  99% of the time it's base 10, with the major ticks on the powers of 10 and minor ticks on the next significant digits.  Occasionally it's base 2 or some other thing (https://probablydance.com/2016/12/02/investigating-radix-sort/ for example) but the major ticks are still on the powers of the base.    There's no reason to put them anywhere else, it just makes the chart much harder to read.
Comment 6 Ming Hua 2020-04-30 04:25:42 UTC
(In reply to 7qia0tp02 from comment #5)
> Well, I use them frequently and the major ticks are always on the powers of
> the base, even if the labels are elsewhere.  99% of the time it's base 10,
> with the major ticks on the powers of 10 and minor ticks on the next
> significant digits.  Occasionally it's base 2 or some other thing
> (https://probablydance.com/2016/12/02/investigating-radix-sort/ for example)
> but the major ticks are still on the powers of the base.    There's no
> reason to put them anywhere else, it just makes the chart much harder to
> read.
I didn't realize that the major grid lines are different from the convention as well, until now.  Your analysis makes sense, let's ping the Chart meta bug and see if we can attract any developer into this discussion.

There is also bug 62924 that have discussions about the same topic, though it seems there are multiple issues in the comments there (labels for minor grids, default values for major and minor grids, upcoming ODF standard, etc.), so I'm leaving this as a seperate bug for now.
Comment 7 Regina Henschel 2020-09-14 16:56:33 UTC
More attributes for better describing the grid position will be introduced in ODF 1.4, see
https://issues.oasis-open.org/browse/OFFICE-3936
So whoever will working on this, should consider it.
Comment 8 QA Administrators 2022-09-15 03:46:25 UTC Comment hidden (obsolete)
Comment 9 7qia0tp02 2022-09-15 15:56:24 UTC
No, it hasn't magically fixed itself since the bug report was submitted.

Version: 7.3.2.2 (x64) / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 10 QA Administrators 2024-09-15 03:17:05 UTC Comment hidden (obsolete)
Comment 11 7qia0tp02 2024-09-17 21:36:22 UTC
No, it hasn't magically fixed itself since the bug report was submitted.
Comment 12 7qia0tp02 2024-09-17 21:36:55 UTC
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

🙄