Bug 118329 - Chart for a table with three columns incorrectly extrapolates data for date range
Summary: Chart for a table with three columns incorrectly extrapolates data for date r...
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-23 11:19 UTC by Andi
Modified: 2018-06-25 19:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
A table in .fods with the wrong diagram with dates and a good one without (202.74 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-06-24 08:33 UTC, Andi
Details
Print screen showing how cell is formatted (65.75 KB, image/jpeg)
2018-06-24 16:25 UTC, Andi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andi 2018-06-23 11:19:35 UTC
In Calc I have a table with three columns. In the first column are 25 dates (dd.mm.yy), in the columns two and three are the corresponding values. The first entry is that of 06.01.18; the last entry is that of 23.06.18.

The diagram does not start on 01/06/18, but on 04/08/17. There are no date entries or values for this day and the following days up to 01/06/18. Consequently, the diagram starts with long even lines up to the first date with values (the 6.01.18).

The diagram is only created correctly if the column with the dates is not included.
Comment 1 V Stuart Foote 2018-06-23 13:57:28 UTC
Please attach a sample document so we do not have to guess at your formatting, best to use the .fods "Flat XML ODF Spreadsheet" format.

Thanks.
Comment 2 Andi 2018-06-24 08:33:35 UTC
Created attachment 143063 [details]
A table in .fods with the wrong diagram with dates and a good one without

Thank you for fast reading and reacting.
Attached is the file in the .fods format. With the described mistake.
I wrote it in .xlsx format, because my friends ar all on Excel.
Comment 3 V Stuart Foote 2018-06-24 13:31:24 UTC
Thanks for the document to work with...

I can see the issue on Windows 10 Home 64-bit en-US with
Version: 6.0.5.1 (x64)
Build ID: 0588a1cb9a40c4a6a029e1d442a2b9767d612751
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: en-US (en_US); Calc: CL

IIUC the "Dates" entered in column A are not "formatted" as dates, and instead are text. So automatic detection is assigning an incorrect value and extrapolating values. The mischarting of the X-axis resolves if select the text for the cells and set its data type to Date.
Comment 4 Andi 2018-06-24 16:25:25 UTC
Created attachment 143073 [details]
Print screen showing how cell is formatted

Thank you for your help
I'll send you a print screen showing how the date entries are formatted: LibreOffice says that the entries are formatted as date and not as text.

I think it must be an even more serious error if LibreOffice interprets the same entries on one computer as date and on another as text.

Regards
Andi
Comment 5 V Stuart Foote 2018-06-24 22:00:59 UTC
Will set this new then. Not clear what is expected behavior, but neither setting the whole first column to dates, or forcing the actual date cells (A3-A27) to be Date (de-CH) is allowing the X-Axis -> Scale "automatic" to pick up correct "Date" format.

With the Scale automatic, the Date -> Minimum of the range is being extrapolated.
Comment 6 Xisco Faulí 2018-06-25 09:58:35 UTC
Also reproducible in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.10; Render: default; 

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 7 Eike Rathke 2018-06-25 19:36:51 UTC
Cell A16 contains date 2017-04-08 not 2018-04-08 hence the date series starts there. Not a bug.