Bug 157295

Summary: Chart export to SVG places X-axis labels vertically centred instead of along axis
Product: LibreOffice Reporter: Jabari <jzakiya>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, caolan.mcnamara, stephane.guillou, xiscofauli
Priority: medium Keywords: bibisected, bisected, filter:svg, regression
Version: 7.5.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=150462
https://bugs.documentfoundation.org/show_bug.cgi?id=158036
https://bugs.documentfoundation.org/show_bug.cgi?id=158299
Whiteboard:
Crash report or crash signature: Regression By: Caolán McNamara
Bug Depends on:    
Bug Blocks: 108542, 158315    
Attachments: Example of bad svg image.
Test data
Correct svg done with 7.4.7.2

Description Jabari 2023-09-17 19:50:49 UTC
Description:
This problem occurred after 7.4.7.2 and exists in 7.5 and 7.6 series.

I have calc graphs with numerical x|y-axis data.
When I "export image" to svg, the x-axis values are moved from the x-axis and are placed in seemingly random places, in a line, within the graph. Y-axis data values, title, and legend are unaffected.

I used AppImgs of LO back to 7.2 and found exporting to svg worked fine up through 7.4.7.2.  Starting with 7.5 thru current 7.6, the problem exists.

Steps to Reproduce:
1.Create in Calc 2 columns of numerical data
2.Use chart helper and create x|y-axis graph with numerical values along each axis
3.Export image to svg from the graph

Actual Results:
The data values along the x-axis are placed in a line within the graph body

Expected Results:
The x-axis data values should appear along the bottom of the x-axis


Reproducible: Always


User Profile Reset: No

Additional Info:
This occurs with line graphs, histographs, step graphs, et al I tried.
Comment 1 Jabari 2023-09-17 19:56:19 UTC
Created attachment 189658 [details]
Example of bad svg image.
Comment 2 Jabari 2023-09-17 19:57:36 UTC
Created attachment 189659 [details]
Test data
Comment 3 Jabari 2023-09-17 20:01:01 UTC
Created attachment 189660 [details]
Correct svg done with 7.4.7.2
Comment 4 ady 2023-09-18 01:41:10 UTC
Repro on MS Windows > NEW, regression.

I'm not sure I would say the x-axis is placed at "random" places, but rather roughly centered on the exported SVG image; it is true that it is not placed at the same location as the original chart shows.
Comment 5 Xisco Faulí 2023-09-18 10:06:09 UTC
Regression introduced by

author	Caolán McNamara <caolanm@redhat.com>	2022-08-16 23:39:53 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2022-08-18 20:30:33 +0200
commit 1fa731d03ba0f22cb9392a578124ea977eaab2e9 (patch)
tree fd415b74a5f728e0eb99eb25b552c248c80112e9
parent b72ebcf5b26ab2e54c5251c5c45e6d45cade9236 (diff)
tdf#150462 don't prescale dxarray before using DrawTextArray

Bisected with: bibisect-linux64-7.5

Adding Cc: to Caolán McNamara
Comment 6 Stéphane Guillou (stragu) 2023-11-08 10:36:19 UTC
Repro in recent master build:

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