Bug 168268 - Inserting a scatter chart with datetime X axis is broken
Summary: Inserting a scatter chart with datetime X axis is broken
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
25.8.0.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: XY-Scatter-Chart
  Show dependency treegraph
 
Reported: 2025-09-03 18:15 UTC by Andrey Perepelitsyn
Modified: 2025-09-06 13:12 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
spreadsheet with typed date column (9.08 KB, application/octet-stream)
2025-09-03 20:43 UTC, Andrey Perepelitsyn
Details
Corrected chart (17.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-09-03 21:15 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Perepelitsyn 2025-09-03 18:15:23 UTC
Description:
In 'Calc', made with Chart Wizard, scatter chart with datetimes in X axis is broken: chart looks like discrete vertical lines drawn on 00:00 times.
Looks like all datetimes are truncated to dates.


Steps to Reproduce:
1. Create spreadsheet with two columns, 'date' and 'value'.
2. Format 'date' column in format 'YYYY-MM-DD HH:MM:SS'.
3. Fill at least two rows, using dates with same day but different time.
4. Select resulting spreadsheet.
5. Choose 'Insert' => 'Chart...'.
6. In 'Chart Wizard' dialog window choose 'XY (Scatter)' chart type, 'Points Only', click 'Finish'


Actual Results:
All points have one X coordinate, with 00:00 time.

Expected Results:
All points should have coordinates from 'date' column.


Reproducible: Always


User Profile Reset: Yes

Additional Info:
There was no such bug in release 25.2.5.2.
It's still there in release 25.8.1.1.

There is a way to fix a chart: in edit mode, change chart somehow, then hit 'Undo'. It will be redrawn correctly.
Comment 1 Regina Henschel 2025-09-03 19:45:34 UTC
Have you examined the min and max values for the x-axis in chart edit mode?

The Wizard might not have got the type correctly. Please bring the chart in edit mode and assign the chart type again.

Please attach a document, that has the problems.
Comment 2 Andrey Perepelitsyn 2025-09-03 20:43:12 UTC
Created attachment 202681 [details]
spreadsheet with typed date column

Example spreadsheet with first column of type 'Date' for reproducing the bug.
Steps 1-3 can be skipped when using this file.
Comment 3 Regina Henschel 2025-09-03 21:15:08 UTC
Created attachment 202682 [details]
Corrected chart

The error is, that the wizard does not correctly generate an XY-chart. You need to correct it manually afterwards in the edit mode of the chart. You can e.g. click on 3D mode, wait until the preview is finished and click back on 'only point'.

One error is e.g. that the wizard checks both 'first row as label' and 'first column as label' although only two columns are marked.

I used for testing: Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 77b3fe6e8564ea579d8e9a5fc82c5eadf532072e
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 4 Regina Henschel 2025-09-03 21:16:59 UTC
Even if 'first column as label' is unchecked in the wizard, the markers for the data points are not on the correct place after creating.
Comment 5 Stéphane Guillou (stragu) 2025-09-04 07:13:18 UTC
I guess what Andrey expects is for the chart to automatically, use X axis ticks that correspond to the actual data points, especially since the interval is constant.

This can be achieved by double-clicking the X axis and changing the values in the Scale tab to:

* Minimum: 2025-09-01 01:00:00
* Maximum: 2025-09-01 03:00:00
* Major interval: 01:00:00

Is that a valid workaround, Andrey?

But it is still cumbersome, and I can see how users might like an option to "Use axis marks that match data points" or something of the sort.

Related to that, how the axis is automatically formatted is obscure, see bug 43983 and bug 152580.