Bug 93030 - No line breaking in date/time x labels
Summary: No line breaking in date/time x labels
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 123769 (view as bug list)
Depends on:
Blocks: Chart-Labels
  Show dependency treegraph
 
Reported: 2015-07-30 15:18 UTC by Chris H
Modified: 2023-10-05 08:57 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Example showing how date/time X axis labels aren't broken but are rotated. (65.25 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-03 08:30 UTC, Chris H
Details
date axis labels are broken (133.76 KB, image/png)
2019-03-11 12:02 UTC, Balázs Varga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris H 2015-07-30 15:18:18 UTC
When I plot against a date/time formatted set of x values (e.g. DD/MM HH:MM), the "Break" option in on the "Label" tab of the "X Axis" dialog is ignored.  If I set the "Major Interval" ("Scale" tab) to a small enough value that the labels would overlap, i.e. should break) they are instead drawn on 45 degrees, despite the orientation being set to 0 degrees (unless I specify "Overlap" as well, in which case they overlap).  

Surely the label should break at the space.  The 2nd issue may be seperate, but surely setting an angle of 0 manually shouldn't ever be overridden by 45 degrees -- this is specific to 0 (setting 1 degree works though of course looks horrible).


Version: 4.3.7.2 Build ID: 8a35821d8636a03b8bf4e15b48f59794652c68ba on Windows 7x86-64, replicated on Version 4.2.8.2 Build 420m0(Build 2) on Ubuntu 14.04 x86.

A bit of background is at http://superuser.com/questions/946288/libreoffice-cell-axis-format-insert-a-newline  but this doesn't add any real detail.
Comment 1 Buovjaga 2015-08-01 15:40:20 UTC
Could you attach an example document?

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the document.
Comment 2 Chris H 2015-08-03 08:30:46 UTC
Created attachment 117617 [details]
Example showing how date/time X axis labels aren't broken but are rotated.
Comment 3 Chris H 2015-08-03 08:31:51 UTC
Attachment added with dummy data.
Comment 4 Buovjaga 2015-08-03 09:48:43 UTC
Confirmed that it is impossible to get the text flow to break.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 902255645328efde34ddf62227c8278e8dd61ff0
TinderBox: Win-x86@39, Branch:master, Time: 2015-07-30_03:52:07
Locale: en-US (fi_FI)
Comment 5 QA Administrators 2016-09-20 10:20:49 UTC Comment hidden (obsolete)
Comment 6 Chris Hodges 2016-09-26 11:12:33 UTC
Unchanged in latest stable:
Version: 5.1.5.2
Build ID: 7a864d8825610a8c07cfc3bc01dd4fce6a9447e5
CPU Threads: 4; OS Version: Windows 6.1

(I'm the OP under a new account)
Comment 7 Xisco Faulí 2017-09-29 08:51:12 UTC Comment hidden (obsolete)
Comment 8 Chris Hodges 2017-10-02 09:17:07 UTC
Confirmed on 5.3.6.1 under Windows 7

From Help|About:
Build ID: 686f202eff87ef707079aeb7f485847613344eb7
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: en-GB (en_GB); Calc: group
Comment 9 Gabor Kelemen (allotropia) 2019-03-07 11:54:08 UTC
*** Bug 123769 has been marked as a duplicate of this bug. ***
Comment 10 Balázs Varga 2019-03-11 12:02:31 UTC
Created attachment 149877 [details]
date axis labels are broken

It looks good to me!
Comment 11 Buovjaga 2019-03-11 12:12:25 UTC
(In reply to Balázs Varga from comment #10)
> Created attachment 149877 [details]
> date axis labels are broken
> 
> It looks good to me!

Great! Do you know the commit that fixed it?
Comment 12 Balázs Varga 2019-03-11 12:18:22 UTC
> Great! Do you know the commit that fixed it?

Probably, this patch also helped here.

Balazs Varga committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/997a1ae35041dc8eba5ba7c4e7e3552632ea08d4%5E%21

tdf#122091 OOXML Import: Automatically break of X Axis labels

It will be available in 6.2.1.

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 13 Chris Hodges 2022-09-07 12:35:59 UTC
Opening my original demonstration in 6.4.7.2 I still can't persuade the date/time labels to break. Starting in a blank file doesn't allow breaking either.

Perhaps there's a sequence of steps that are necessary for the fix to be effective, but I can't see them and the diff doesn't offer any hints (to me at least).  Hopefully it's just a matter of making things clearer.

(BTW I don't know how I wasn't notified of the status change at the time - I'm supposed to be subscribed to this bug)
Comment 14 Buovjaga 2022-09-07 12:48:06 UTC
(In reply to Chris Hodges from comment #13)
> Opening my original demonstration in 6.4.7.2 I still can't persuade the
> date/time labels to break. Starting in a blank file doesn't allow breaking
> either.
> 
> Perhaps there's a sequence of steps that are necessary for the fix to be
> effective, but I can't see them and the diff doesn't offer any hints (to me
> at least).  Hopefully it's just a matter of making things clearer.
> 
> (BTW I don't know how I wasn't notified of the status change at the time -
> I'm supposed to be subscribed to this bug)

You reported this bug in 2015, but apparently created a new account afterwards and never added it to the Cc.
Comment 15 Chris Hodges 2022-09-07 12:54:02 UTC
OK I've found the necessary steps.

It looks like the fix requires the additional user step of inserting a line break in the number formatting of the axis.  

Alternatively ticking "source format" and inserting the line break into the format  for the source cells breaks the axis labels correctly, but in the source cells the line break is suppressed so the effect is 01/02/0304:05; inserting a space as well breaks the centre-alignment of the 2 lines on top of each other in the axis labels

The only way to get the line break in was given by a superuser answer https://superuser.com/a/1581574/245275 and consists of copy-pasting a line break from a cell where it was entered using ctrl+enter - there seems to be no way to enter it in a custom formatting box though it displays nicely as ↵ (but copies as a carriage return).

So IMO this needs explaining somewhere
Comment 16 Chris Hodges 2022-09-07 12:56:37 UTC
(In reply to Buovjaga from comment #14)
> (In reply to Chris Hodges from comment #13)
> > Opening my original demonstration in 6.4.7.2 I still can't persuade the
> > date/time labels to break. Starting in a blank file doesn't allow breaking
> > either.
> > 
> > Perhaps there's a sequence of steps that are necessary for the fix to be
> > effective, but I can't see them and the diff doesn't offer any hints (to me
> > at least).  Hopefully it's just a matter of making things clearer.
> > 
> > (BTW I don't know how I wasn't notified of the status change at the time -
> > I'm supposed to be subscribed to this bug)
> 
> You reported this bug in 2015, but apparently created a new account
> afterwards and never added it to the Cc.

I still receive emails to the address associated with the original account but got nothing there.  However one of the reasons I moved away from it was vanishing emails.  I am on the CC list now - I just checked - and I thought commenting auto-added me, but maybe I'm thinking of a different bug system.
Comment 17 Buovjaga 2022-09-07 14:44:46 UTC
(In reply to Chris Hodges from comment #15)
> OK I've found the necessary steps.
> 
> It looks like the fix requires the additional user step of inserting a line
> break in the number formatting of the axis.  
> 
> Alternatively ticking "source format" and inserting the line break into the
> format  for the source cells breaks the axis labels correctly, but in the
> source cells the line break is suppressed so the effect is 01/02/0304:05;
> inserting a space as well breaks the centre-alignment of the 2 lines on top
> of each other in the axis labels
> 
> The only way to get the line break in was given by a superuser answer
> https://superuser.com/a/1581574/245275 and consists of copy-pasting a line
> break from a cell where it was entered using ctrl+enter - there seems to be
> no way to enter it in a custom formatting box though it displays nicely as ↵
> (but copies as a carriage return).
> 
> So IMO this needs explaining somewhere

Balázs: any comment on this?
Comment 18 Stéphane Guillou (stragu) 2023-10-05 08:57:52 UTC
Reproduced in OOo 3.3, so inherited.