Using Multiple Day Bands

48 views
Skip to first unread message

aaron robb

unread,
Sep 2, 2011, 1:48:09 PM9/2/11
to simile-...@googlegroups.com
I'm having an issue with trying to create multiple bands using DAY.
Basically if i copy the original working DAY band, then the timeline blanks out.

Is there something i"m missing to make multi bands work? The overall goal is to get different event sources to each.

Here's the basic code:

function onLoad() {
   var eventSource = new Timeline.DefaultEventSource();

   
   var bandInfos = [
     Timeline.createBandInfo({
         eventSource:    eventSource,
         date:           "Aug 30 2011 00:00:00 GMT",
         width:          "100px", 
         intervalUnit:   Timeline.DateTime.DAY, 
         intervalPixels: 50
     }),
     var bandInfos = [
     Timeline.createBandInfo({
         eventSource:    eventSource,
         date:           "Aug 30 2011 00:00:00 GMT",
         width:          "100px", 
         intervalUnit:   Timeline.DateTime.MONTH, 
         intervalPixels: 60
     }),
     Timeline.createBandInfo({
         eventSource:    eventSource,
         date:           "Aug 30 2011 00:00:00 GMT",
         width:          "100px", 
         intervalUnit:   Timeline.DateTime.MONTH, 
         intervalPixels: 100
     }),
    
   ];
   bandInfos[2].syncWith = 0;
   bandInfos[1].syncWith = 0;
   bandInfos[0].highlight = true;
   
   tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
   Timeline.loadXML("wa_test.xml", function(xml, url) { eventSource.loadXML(xml, url); });

 }

Ken Thompson

unread,
Sep 5, 2011, 2:30:32 AM9/5/11
to simile-...@googlegroups.com
Hi Aaron

Not sure but you might need to remove the comma after the last band declaration.

Regards
Ken
--
You received this message because you are subscribed to the Google Groups "SIMILE Widgets" group.
To view this discussion on the web visit https://groups.google.com/d/msg/simile-widgets/-/WcVO5z39_dAJ.
To post to this group, send email to simile-...@googlegroups.com.
To unsubscribe from this group, send email to simile-widget...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/simile-widgets?hl=en.

No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1392 / Virus Database: 1520/3870 - Release Date: 09/01/11

Reply all
Reply to author
Forward
0 new messages