Bug 142328

Summary: EDITING Support “Best” rotation for bar chart category axis
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: ChartAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: buzea.bogdan, gerald, nemeth, tundeth, varga.balazs3
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=140623
https://bugs.documentfoundation.org/show_bug.cgi?id=138773
https://bugs.documentfoundation.org/show_bug.cgi?id=144794
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on: 156435    
Bug Blocks: 75057, 90486    
Attachments: Example file from Excel
Screenshot of the original document side by side in Excel and Calc
The example file in EXcel and todays nightly

Description NISZ LibreOffice Team 2021-05-17 12:31:28 UTC
Created attachment 172084 [details]
Example file from Excel

Attached XLSX file demonstrates that MSO by default uses a “Best” rotation for horizontal category axes of charts (Bar, Line, Point, Area).
On the UI it is shown as “Horizontal” text rotation, with undefined rotation angle. This is misleading a bit, since the actual text rotation will be determined based on the actual text length of the axis labels:
- with short labels/wide chart it’s gonna be horizontal
- with medium length labels it’s gonna be -45 degrees (in Word terms)
- with long labels it’s gonna be 270 degrees (in Word terms)

LO can display the text in the first two cases (when the labels overlap property is turned off manually, needed right now because of bug #140623) but it would be nice to be able to better mimic the vertical rotation of long labels; possibly with an explicit UI option (to be filed later).

Steps to reproduce:
1.	Open attached file
2.	For the first chart, open the X axis properties

Actual results:
The X axis text is not rotated to 270 degrees, but to -45 even if the Overlap property is manually turned off. 
The Text Orientation dial indicates 0 degrees orientation, which is false: that would mean the labels are horizontal. 
Ideally, there would be an “Automatic” checkbox (or radio button paired with “Vertically stacked” option) that disables this dial and sets rotation based on actual text length + font size + available space. This could be a topic for another report.

Expected results:
The X axis text should be rotated to 270 degrees.
Comment 1 NISZ LibreOffice Team 2021-05-17 12:31:55 UTC
Created attachment 172085 [details]
Screenshot of the original document side by side in Excel and Calc
Comment 2 Tünde Tóth 2021-06-10 13:38:52 UTC Comment hidden (obsolete)
Comment 3 NISZ LibreOffice Team 2021-06-11 07:32:41 UTC
Created attachment 172790 [details]
The example file in EXcel and todays nightly

Still not great in:

Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 239b4bb27fd8db26e8416045b3015688a8b1b0ae
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL

but at least not terrible anymore.
Comment 4 BogdanB 2021-11-02 09:33:17 UTC Comment hidden (obsolete)
Comment 5 Gabor Kelemen (allotropia) 2021-11-02 09:59:30 UTC
(In reply to BogdanB from comment #4)
> Marked as duplicate based on comment 2
> 
> *** This bug has been marked as a duplicate of bug 140623 ***

NOT. A. DUPLICATE.
Comment 6 Gabor Kelemen (allotropia) 2023-07-24 11:40:07 UTC
*** Bug 156435 has been marked as a duplicate of this bug. ***