GNOME Bugzilla – Bug 315288
Issues with axis bounds and ticks when using dates
Last modified: 2009-04-28 13:21:07 UTC
Version details: Debian 1.5.1-1 Distribution/Version: Debian Etch (testing) I have the following data in a sheet: Release date: Number of packages: 1996-06-01 403 1996-12-01 586 1997-07-01 888 1998-07-01 1376 1999-03-09 1882 2000-08-15 3007 2002-07-19 5731 2005-06-07 9053 I create an XY chart with the date as the X axis and the numbers on the Y axis. The chart's X axis, by default, says 34000 35000 36000 ... 39000, probably indicating numbers of days since the Epoch. In the chart's preferences, I now click on X1 axis, Format, Date, yyyy-mm-dd and click OK. The chart is not updated, the format request ignored. If I open the preferences again, the format I chose is still there. Similarly, I am unable to change the bounds of the axis. If I try to set the bounds explicitly to "1993-01-01" and "2006-01-01", the chart is empty as all data is off-chart. Apparently, the preferences dialogue does not support dates in axis bounds. If I type "date(1993;1;1)" and "date(2006;1;1)", the bounds are correclty changed. -- Ludovic Brenta.
>I create an XY chart with the date as the X axis and the numbers on >the Y axis. The chart's X axis, by default, says 34000 35000 36000 ... 39000, >probably indicating numbers of days since the Epoch. > >In the chart's preferences, I now click on X1 axis, Format, Date, yyyy-mm-dd >and click OK. It should works fine with last release (1.5.5). >Similarly, I am unable to change the bounds of the axis. If I try to set >the bounds explicitly to "1993-01-01" and "2006-01-01", the chart is empty >as all data is off-chart. Apparently, the preferences dialogue does not >support dates in axis bounds. If I type "date(1993;1;1)" and "date(2006;1;1)", >the bounds are correclty changed. There's two issue here: - we should try to convert user entry using current number format. - major tick location and spacing are computed using corresponding real number, not dates.
I agree with the first issue, but what is the problem with using the underlying real number to compute the tick interval? I can set that to 365.2652 to get one-year major ticks, and e.g. 365.2652/12 to get months as the minor ticks. I'll try the date formatting on 1.5.5 when it reaches testing, hopefully in 4 days from now. -- Ludovic Brenta.
Part of bug 574681. This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.