Bug 136257 - Calc loses date/time info in a chart with time axis
Summary: Calc loses date/time info in a chart with time axis
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.0 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls, preBibisect, regression
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2020-08-29 06:08 UTC by ZithraMestor
Modified: 2024-01-29 04:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example xls saved file of chart problem (7.50 KB, application/x-ole-storage)
2020-08-30 01:39 UTC, ZithraMestor
Details
Example ods file (17.07 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-08-30 06:39 UTC, ZithraMestor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ZithraMestor 2020-08-29 06:08:01 UTC
Description:
With the x-axis of a chart in the form DDD MM/DD/YY HH:MM, exiting calc and opening again, the x-axis is incorrect. Happens in older 6.4.4.2 x64 and new 7.0.0.3 x64.

Steps to Reproduce:
1. Create 2 columns. First formatted DDD MM/DD/YY HH:MM.  E.g., Sat 08/22/20 18:57.  Second column some numbers.
2. Make a chart, type XY Scatter.
3. Save. Close Calc. Reopen the document.


Actual Results:
The x-axis labels change from form Sat 08/22/20 18:57 to some numbers unrelated to the data even though source format is still checked.  Editing the x-axis numbers to explicitly request DDD MM/DD/YY HH:MM does not help. They seem in fact to go back to the beginning of time.

Expected Results:
Maintain the values and format of the source data.


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
none
Comment 1 m_a_riosv 2020-08-29 16:23:35 UTC
Please attach a sample file.
Comment 2 ZithraMestor 2020-08-30 01:39:14 UTC
Created attachment 164861 [details]
Example xls saved file of chart problem

Thank you.  I discovered there is a bit more to this. When setting up for the chart choose extra blank rows below the existing data, in anticipation of future data.  When saved in native ods format the problem is NOT reproducible. When taking the .ods file and doing save as .xls the problem appears as can be seen in the uploaded file.
Comment 3 BogdanB 2020-08-30 05:57:53 UTC
In order to have time instead of that numbers when you go to Data Renges select also time and value, NOT just value!

Please test again and I am waiting for your result.
Comment 4 ZithraMestor 2020-08-30 06:39:13 UTC
Created attachment 164863 [details]
Example ods file

I do not understand the latest comment and upload Charting.ods.  Open this file and then use "save as" to make Charting.xls.  Close it.  Open Charting.xls and the time axis has become just a serial number, not time.
Comment 5 BogdanB 2020-08-30 07:54:37 UTC
When saving as .xls I get this error:
"The document contains more columns than supported in the selected format. Additional columns were no saved."
Comment 6 ZithraMestor 2020-08-30 08:57:55 UTC
This is interesting.  I do not see that problem/error!
I think there are 2 things going on.  One is the conversion to .xls and the other is the inclusion of empty cells below the data when composing the chart.

When I downloaded the file that I had uploaded I did not have any problems.  But I checked and the ranges did not include any empty cells in that file, unlike the file I thought I uploaded.

When I created the example I filled in data cells for 4 rows and kept the formatting the same up to row 20.  Then I select the first 2  columns and rows #1 up to #20 for the scatter chart.  Make chart. Save as .ods.  Save as .xls.  Exit.  Open .xls.  This x-axis corruption is totally reproducible for me.

I suggest taking the .ods file I uploaded, check that formatting is the same in col 1 up to row 20, deleting the chart, and making a chart using rows up to row 20.  Now save as .xls, exit and re edit the .xls file. The x-axis data points should no longer be times, but should be 1,2,3,4.

Let me know if I can further clarify.  Thanks for your help.
Comment 7 BogdanB 2020-08-30 10:45:22 UTC
Yes, with this steps I reproduce the bug.
-----------
I suggest taking the .ods file I uploaded, check that formatting is the same in col 1 up to row 20, deleting the chart, and making a chart using rows up to row 20.  Now save as .xls, exit and re edit the .xls file. The x-axis data points should no longer be times, but should be 1,2,3,4.
-----------
Confirm with
Version: 6.4.5.2
Build ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3; 
Locale: ro-RO (ro_RO.UTF-8); UI-Language: en-US
Calc: threaded
Comment 8 QA Administrators 2022-08-31 03:34:58 UTC Comment hidden (obsolete)
Comment 9 Stéphane Guillou (stragu) 2023-09-30 21:31:21 UTC
Reproduced in recent master build with steps:

1. open attachment 164863 [details]
2. Select range A1:B20
3. Insert > Chart > XY (scatter) > Points and Lines > OK
4. Save as XLS
5. File > Reload

Result: integer indices as X axis labels.

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

Interestingly, it's a regression starting in LO 3.4.0rc1. Not reproduced in LO 3.3.4. (Tested with linux-64-releases bibisect repository.)