Bug 159547

Summary: of-pie connector lines aren't quite geometrically correct
Product: LibreOffice Reporter: kurt.nordback <kurt.nordback>
Component: ChartAssignee: kurt.nordback <kurt.nordback>
Status: RESOLVED FIXED    
Severity: trivial CC: ilmari.lauhakangas, stephane.guillou
Priority: medium    
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=50934
Whiteboard: target:24.8.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 90486    
Attachments: Very simple pie-of-pie test
comparison LO 24.8 alpha0+ (left) vs MSO 365 web (right)

Description kurt.nordback@protonmail.com 2024-02-04 02:16:14 UTC
Description:
The left endpoint of connector lines between the parts of bar-of-pie and pie-of-pie charts is not correct in cases where the left-side composite wedge is larger than half the pie. The current implementation is close, but there needs to be a little more math done.

Steps to Reproduce:
Open the attached file

Actual Results:
Connector lines aren't quite tangent to the left pie

Expected Results:
Connector lines are tangent to the left pie and terminate at the tangent point


Reproducible: Always


User Profile Reset: No

Additional Info:
This is dependent on tdf#50934
Comment 1 kurt.nordback@protonmail.com 2024-02-04 02:17:02 UTC
Created attachment 192377 [details]
Very simple pie-of-pie test
Comment 2 Buovjaga 2024-02-16 14:43:59 UTC
I'm only seeing a normal pie chart. How can I test this? Is this dependent on unmerged patches?

Arch Linux 64-bit, X11
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3b04e74503ec6d07dc4befdb756e6abdc3de4e58
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 16 February 2024
Comment 3 kurt.nordback@protonmail.com 2024-02-16 15:55:02 UTC
Yes, apologies for that. I should have made that clear. This is dependent on code for tdf#50934. If you want to try it, pull the top of this chain:
https://gerrit.libreoffice.org/c/core/+/160742/9
Comment 4 Stéphane Guillou (stragu) 2024-02-20 15:15:20 UTC
Created attachment 192661 [details]
comparison LO 24.8 alpha0+ (left) vs MSO 365 web (right)

Confirmed in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1cda27cf69054b006aa1b16cab8f56339274588b
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

More importantly: it is unclear which wedge the lines are linking to. See in screenshot that the results are still very different between MSO and LO.
Comment 5 Commit Notification 2024-05-16 08:56:52 UTC
Kurt Nordback committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/86dcdfd097b0fdd91d69ecb8be0e72a84112a514

tdf#159547 of-pie connector lines aren't quite geometrically correct

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