Hi,
I have been trying to add events to the Timeline without having to
load data through an external file. After some searching I put this
code together.
var eventSource = new Timeline.DefaultEventSource();
var tmpEventsArray = new Array();
var dateEvent = new Date();
var evt = new Timeline.DefaultEventSource.Event(
dateEvent, //start
dateEvent, //end
dateEvent, //latestStart
dateEvent, //earliestEnd
true, //instant
"Event ", //text
"Description for Event " //description
);
tmpEventsArray.push(evt);
eventSource.addMany(tmpEventsArray);
var bandInfos = [
Timeline.createBandInfo({
width: "70%,",
intervalUnit: Timeline.DateTime.DAY,
intervalPixels: 100,
eventSource: eventSource,
date: new Date()
}),
Timeline.createBandInfo({
showEventText: false,
width: "30%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 200,
eventSource: eventSource,
date: new Date()
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
t1 = Timeline.create(document.getElementById("my-timeline"),
bandInfos);
It is not giving any errors but still doesn't add anything to the
Timeline.
Please help me out!
Thanks
Abhinav
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---