Michele,

Try to remove the line

bandInfos[1].eventPainter.setLayout(bandInfos[0].eventPainter.getLayout());

and see if that helps. That's a legacy feature not supported in Timeline 
2.x.

David

Michele wrote:
> Hi,
> I am the Office Manager at a fire department and have been given a
> project that utilizes the Timeline.  I am a beginner here with code so
> be easy on me.  I have my code done (I think) and my XML file of
> events to pull from but nothing happens when I run it.  I get the
> outline of the Timeline but no bands or events.  I’ve included my
> code  and XML file for your help in reviewing what I’m doing wrong.
>
> Thank You and Be Safe,
> Michele R. Grogean
> Office Manager
> Beavercreek Twp. Fire Dept.
>
>
> My Code:
> <html>
> <head>
>       <title>Station 62 Construction Timeline</title>
>       <script src="http://static.simile.mit.edu/timeline/api-2.3.0/timeline-
> api.js?bundle=true" type="text/javascript"></script>
>       <script type="text/javascript">
> <script>
>
>       var tl;
>       function onLoad() {
>       var eventSource = new Timeline.DefaultEventSource();
>       var bandInfos = [
>    Timeline.createBandInfo({
>         eventSource:    eventSource,
>         width:          "35%",
>         intervalUnit:   Timeline.DateTime.HOUR,
>         intervalPixels: 100
>     }),
>     Timeline.createBandInfo({
>       showEventText:  false,
>         trackHeight:    0.5,
>         trackGap:       0.2,
>         eventSource:    eventSource,
>         width:          "35%",
>         intervalUnit:   Timeline.DateTime.DAY,
>         intervalPixels: 200
>     }),
>         Timeline.createBandInfo({
>       showEventText:  false,
>         trackHeight:    0.5,
>         trackGap:       0.2,
>         eventSource:    eventSource,
>         width:          "15%",
>         intervalUnit:   Timeline.DateTime.WEEK,
>         intervalPixels: 200
>     }),
>           Timeline.createBandInfo({
>       showEventText:  false,
>         trackHeight:    0.5,
>         trackGap:       0.2,
>         eventSource:    eventSource,
>         width:          "15%",
>         intervalUnit:   Timeline.DateTime.MONTH,
>         intervalPixels: 200
>     })
>   ];
>       bandInfos[1].syncWith = 0;
>       bandInfos[1].highlight = true;
>       bandInfos[1].eventPainter.setLayout(bandInfos
> [0].eventPainter.getLayout());
>
>   bandInfos[2].syncWith = 0;
>   bandInfos[2].highlight = true;
>
>   bandInfos[3].syncWith = 0;
>   bandInfos[3].highlight = true;
>
>   tl = Timeline.create(document.getElementById("my-timeline"),
> bandInfos);
>   Timeline.loadXML("Station_62_Timeline.xml", function(xml, url)
> { eventSource.loadXML(xml, url); });
>
> }
>
>       var resizeTimerID = null;
>       function onResize() {
>     if (resizeTimerID == null) {
>         resizeTimerID = window.setTimeout(function() {
>             resizeTimerID = null;
>             tl.layout();
>         }, 500);
>     }
> }
> </script>
> <style type="text/css">
>  table {
>     font-size: 100%;
> }
>
> .timeline-default {
>     font-family: Trebuchet MS, Helvetica, Arial, sans serif;
>     font-size: 8pt;
> }
> </style>
> </head>
> <body onload="onLoad();" onresize="onResize();" class="timeline-
> default">
> <div id="my-timeline" style="height: 250px; border: 2px solid #aaa"></
> div>
> </body>
> </html>
>
> My XML:
>   <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
> - <data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>   <event start="June 4 2009" end="June 4 2009" isDuration="true"
> title="Pre-Construction Open House">An open house was put on at
> Station 62 for the public</event>
>   <event start="June 7 2009" end="June 10 2009" isDuration="true"
> title="Temporary Move Out">The crews had to move out for the asbestos
> removal</event>
>   <event start="June 8 2009" end="June 10 2009" isDuration="true"
> title="Asbestos Removal" xsi:nil="true" />
>   <event start="June 18 2009" end="June 18 2009" isDuration="true"
> title="Pre-Construction Meeting" xsi:nil="true" />
>   <event start="June 19 2009" end="June 21 2009" isDuration="true"
> title="Big Move Out" xsi:nil="true" />
>   <event start="June 22 2009" end="February 17 2010" isDuration="true"
> title="Construction Time" xsi:nil="true" />
>   </data>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SIMILE Widgets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simile-widgets?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to