Download it now!
Bug 130969 - Embedded Graphs Axis Precision Incorrect
Summary: Embedded Graphs Axis Precision Incorrect
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
6.3.4.2 release
Hardware: All All
: medium normal
Assignee: Balázs Varga
URL:
Whiteboard: target:7.0.0
Keywords: bibisected, bisected
: 134219 (view as bug list)
Depends on:
Blocks: OOXML-Chart
  Show dependency treegraph
 
Reported: 2020-02-26 20:57 UTC by Devon Powell
Modified: 2020-06-22 09:55 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
DOCX file with correct X and Y axis (31.59 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-02-26 20:58 UTC, Devon Powell
Details
PDF file with incorrect X and Y axis (51.77 KB, application/pdf)
2020-02-26 20:59 UTC, Devon Powell
Details
PDF file with incorrect X and Y axis worse (6.4.2) (28.91 KB, application/pdf)
2020-02-26 21:41 UTC, Devon Powell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Devon Powell 2020-02-26 20:57:54 UTC
Description:
When converting a word document to a PDF the values for the X and Y access are truncated/rounded losing the original values associated.

Steps to Reproduce:
1. Convert file to PDF using 'soffice --headless --nolockcheck --nodefault --nofirststartwizard --nologo --norestore --convert-to pdf --outdir /tmp /tmp/test.docx'
2. Open PDF using a viewer
3. Observer the X and Y axis values do not match between the original DOCX and the converted PDF

Actual Results:
The X and Y axis values are incorrect

Expected Results:
The X and Y axis values are correct


Reproducible: Always


User Profile Reset: No



Additional Info:
This looks related to issue
https://bugs.documentfoundation.org/show_bug.cgi?id=124083
But seems to be more of a rounding/truncation problem instead of just a scaling one
Comment 1 Devon Powell 2020-02-26 20:58:39 UTC
Created attachment 158214 [details]
DOCX file with correct X and Y axis
Comment 2 Devon Powell 2020-02-26 20:59:01 UTC
Created attachment 158215 [details]
PDF file with incorrect X and Y axis
Comment 3 Devon Powell 2020-02-26 21:08:41 UTC
I also noticed that the equation displayed on the graph is incorrect:

y = -8.7361x + 1.8318

in the original vs the conversion:

f(x) = − 8.74 x + 1.83

Seems to be a similar rounding issue
Comment 4 Devon Powell 2020-02-26 21:36:27 UTC
Same issue present in LibreOffice 6.3.5.2 30(Build:2)
Comment 5 Devon Powell 2020-02-26 21:40:54 UTC
Issue still present in LibreOffice 6.4.1.2 40(Build:2) but also looses some additional axis values
Comment 6 Devon Powell 2020-02-26 21:41:24 UTC
Created attachment 158217 [details]
PDF file with incorrect X and Y axis worse (6.4.2)
Comment 7 Xisco Faulí 2020-03-17 10:54:59 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7f373a4c88961348f35e4f990182628488878efe

author	Balazs Varga <balazs.varga991@gmail.com>	2019-05-30 13:30:26 +0200
committer	László Németh <nemeth@numbertext.org>	2019-06-03 16:11:06 +0200
commit	7f373a4c88961348f35e4f990182628488878efe (patch)
tree	7094560bf1e66918e92eded573fbee0849a666ca
parent	90ace7be71d41257e29a28fa2e7c0adf8f84050d (diff)
tdf#48041 Chart: do not duplicate major value

Bisected with: bibisect-linux64-6.4$

Adding Cc: to Balazs Varga
Comment 8 Balázs Varga 2020-03-24 13:23:32 UTC
I do not think it is a regression, because we have always used two decimals in case of embedded charts as a GENERAL number format, unlike the Calc where we use UNLIMITED_PRECISION.
By the way a potential fix in gerrit: https://gerrit.libreoffice.org/c/core/+/90984
Comment 9 Commit Notification 2020-04-01 09:21:03 UTC
Balazs Varga committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/61aa663d9b1d75d1bb0cfc7c4c9e4cb17d8dd00a

tdf#130969 Chart view: fix incorrect precision of axis labels

It will be available in 7.0.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 10 Xisco Faulí 2020-06-22 09:55:18 UTC
*** Bug 134219 has been marked as a duplicate of this bug. ***