After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 315288 - Issues with axis bounds and ticks when using dates
Issues with axis bounds and ticks when using dates
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
1.5.x
Other All
: Normal normal
: ---
Assigned To: Emmanuel Pacaud
Jody Goldberg
Depends on: 414383
Blocks:
 
 
Reported: 2005-09-05 12:40 UTC by Ludovic Brenta
Modified: 2009-04-28 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ludovic Brenta 2005-09-05 12:40:56 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.
Comment 1 Emmanuel Pacaud 2005-09-05 13:05:36 UTC
>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. 
Comment 2 Ludovic Brenta 2005-09-05 13:20:37 UTC
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.
Comment 3 Morten Welinder 2009-04-28 13:21:07 UTC
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.