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 624340 - Cannot create weekly/bi-weekly axis ticks
Cannot create weekly/bi-weekly axis ticks
Status: RESOLVED FIXED
Product: libgoffice
Classification: Other
Component: Graphing / Charting
0.8.x
Other All
: Normal minor
: ---
Assigned To: Jean Bréfort
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-07-14 12:55 UTC by Richard Smith
Modified: 2010-07-30 22:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
2 graphs, X=normal works as intended, X=Date exhibits glitch. (4.46 KB, application/x-gnumeric)
2010-07-14 12:55 UTC, Richard Smith
  Details
Proposed patch (612 bytes, patch)
2010-07-14 14:09 UTC, Jean Bréfort
none Details | Review

Description Richard Smith 2010-07-14 12:55:16 UTC
Created attachment 165875 [details]
2 graphs, X=normal works as intended, X=Date exhibits glitch.

If you try to use a date range as the X axis for a plot, and choose the Major gridline interval to be 7 - to divide off weeks, then the display fails.
It seems to somehow drop to Monthly divisions for any interval > 1.
Minor divisions are also not represented correctly.

See attached file for illustration.
(Major Minor works fine for 'normal' formatted X axis values)
Comment 1 Jean Bréfort 2010-07-14 14:06:16 UTC
Looks like if interval is > 1, it is at least one month.
Comment 2 Jean Bréfort 2010-07-14 14:09:52 UTC
Created attachment 165882 [details] [review]
Proposed patch

Morten, any comment?
Comment 3 Morten Welinder 2010-07-14 17:03:04 UTC
This is clearly a case of "I didn't think about that!"

I'll have to think about this -- please keep this open for a while.

There are almost certainly issues near 30 days for this.  For 30 we want
monthly, for 28 we probably want that.

Also, say we have one-week intervals.  Where should be axis ticks be?
Sunday and Monday are likely candidates, Thursday not so much.  Hopefully,
if we set the minimum that overrides any automatics.
Comment 4 Andreas J. Guelzow 2010-07-15 05:07:13 UTC
Morten, I think that we should use the locale information for the first day in a week:

       week   followed by a list of three values: The number of days in a week
              (by default 7), a date of beginning of the week (by default cor‐
              responds to Sunday), and the minimal length of the first week in
              year (by default 4).  Regarding the start of the week,  19971130
              shall  be used for Sunday and 19971201 shall be used for Monday.
              Thus, countries using 19971130 should have local Sunday name  as
              the  first  day  in the day list, while countries using 19971201
              should have Monday translation as the  first  item  in  the  day
              list.

       first_weekday (since glibc 2.2)
              Number  of the first day from the day list to be shown in calen‐
              dar applications.  The default value of 1 corresponds to  either
              Sunday  or Monday depending on the value of the second week list
              item.

If users want a locale independent presentation they could specify the minimum.
Comment 5 Morten Welinder 2010-07-30 19:49:03 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.

I totally ignored the start-of-week issue.  Major ticks start when the graph
starts.
Comment 6 Richard Smith 2010-07-30 22:47:33 UTC
(In reply to comment #5)
> I totally ignored the start-of-week issue.  Major ticks start when the graph
> starts.

Personally - I believe the start of week should be ignored - as 'scientific data' rarely observes the 'business' week.
e.g. - more likely the major ticks will not be 7 days - but the period of an astromonic event, or the life cycle of some organism, or.. or... . . ..

Thankyou for incredible professional service!
I was amazed by the attention to a reasonably trivial behaviour .

Richard.