Hello Joseph,
This is not something for which we can apply a quick fix to the code so we'll need to know a little about the type of use you envisage, ie. whether all your dates in a chart will be restricted to the pre Dec 1899 period or whether you expect a mixture of pre-post 1899 mixes in a single chart? ... or whether showing just whole day increments may be sufficient.
The problem (for us as chart designers) comes down to the date implementation by Microsoft for Windows. The zero date being midnight, 30 December 1899.
Note from the reference here:
https://learn.microsoft.com/en-us/dotne ... ew=net-8.0
An OLE Automation date is implemented as a floating-point number whose integral component is the number of days before or after midnight, 30 December 1899, and whose fractional component represents the time on that day divided by 24. For example, midnight, 31 December 1899 is represented by 1.0; 6 A.M., 1 January 1900 is represented by 2.25; midnight, 29 December 1899 is represented by -1.0; and 6 A.M., 29 December 1899 is represented by -1.25.
That makes it easy to handle whole days linearly, as they count back from 0. 1 being 29th Dec 1899, 2 being 28th, etc. But the inconvenience is that the fractional part of each day, 1/24 being one hour, is also counted backwards meaning that a simple date conversion in a table is no problem but that visually, on a chart,
time goes backwards from the 30 December 1899.
For a chart merely showing whole days that is fine but to resolve that for each incremental fraction of the day requires inverting the fractional part of each integer (day) segment for any day-time data to plot correctly. We are looking at options.
In the meantime, an alternative option would be to set the x-values of the Series as non-datetime, simply numeric incremented values like 1,2,3 ..., and to set Labels either from an associated label table or calculating them according to a value algorithm.
We can work on an example for that if you're able to confirm a little about your intended use of the daterange.
With thanks.
Regards,
Marc Meumann