Hello,

Reno Brown wrote:
> Hi,
> 
> I'd like to display Weeks instead of Years in my Timeplot.
> 
> I've tried creating my DefaultTimeGeometry like this:
> 
> var tg = new Timeplot.DefaultTimeGeometry({
>       gridColor: "#000000",
>       axisLabelsPlacement: "top",
>       unit: Timeline.DateTime.WEEK
> });
> 
> but it doesn't work.  I've looked in the documentation, but can't seem  
> to find anything relevant to help me -- I've even tried digging  
> through the source code.  I guess I'm missing something trivial.

The 'unit' param is actually for a class of object to assist with 
interpreting units of time, the default being ISO8601.  It's not for 
specifying an interval unit.

Timeplot decides for you which units to use; see 
http://static.simile.mit.edu/timeplot/api/1.0/scripts/geometry.js in the 
_calculateGrid function, where the interval unit calculated is dependent 
on the window between the earliest and latest date.

> If someone could point me at the right docs, or give me a hand it  
> would be greatly appreciated.

While I don't advocate for this being the one right way, the direct 
answer to your question is that the feature does not presently exist. 
Since you mentioned the magic words "digging through source code," I 
feel you should know we'll happily take patches.  I suspect 
_calculateGrid is the only real code involved with adding such a feature.

-- 
Ryan Lee                  [EMAIL PROTECTED]
MIT CSAIL Research Staff  http://simile.mit.edu/
http://people.csail.mit.edu/ryanlee/
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to