Bug 142328 - EDITING Support “Best” rotation for bar chart category axis
Summary: EDITING Support “Best” rotation for bar chart category axis
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 156435
Blocks: OOXML-Chart Chart
  Show dependency treegraph
 
Reported: 2021-05-17 12:31 UTC by NISZ LibreOffice Team
Modified: 2023-08-21 17:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Excel (24.54 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-05-17 12:31 UTC, NISZ LibreOffice Team
Details
Screenshot of the original document side by side in Excel and Calc (162.92 KB, image/png)
2021-05-17 12:31 UTC, NISZ LibreOffice Team
Details
The example file in EXcel and todays nightly (153.10 KB, image/png)
2021-06-11 07:32 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
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. ***