Thanks.
That does the trick, but why are the lines and the years (which should
be along the bottom) not visible?? My events show up but I can't
scroll the timeline.
See code below.
Pedro
<script>
var tl;
function onLoad() {
var eventSource = new Timeline.DefaultEventSource(0);
<!--var tl_el = document.getElementById("tl");-->
var theme = Timeline.ClassicTheme.create();
theme.event.bubble.width = 320;
theme.event.bubble.height = 220;
theme.autoWidth = true; // Set the Timeline's "width"
automatically.
// Set autoWidth on the
Timeline's first band's theme,
// will affect all bands.
theme.ether.backgroundColors[1] =
theme.ether.backgroundColors[0];
theme.timeline_start = new Date(Date.UTC(1920, 0, 1));
theme.timeline_stop = new Date(Date.UTC(2010, 0, 1));
// create a second theme for the second band because we
want it to
// have different settings
var d = Timeline.DateTime.parseGregorianDateTime("1949")
var bandInfos = [
Timeline.createBandInfo({
width: "10%", // set to a minimum,
autoWidth will then adjust
height: "10%",
intervalUnit: Timeline.DateTime.DECADE,
intervalPixels: 100,
date: d,
showEventText: false,
theme: theme,
}),
Timeline.createBandInfo({
width: "90%", // set to a minimum,
autoWidth will then adjust
height: "10%",
intervalUnit: Timeline.DateTime.DECADE,
intervalPixels: 160,
eventSource: eventSource,
date: d,
theme: theme,
}),
];
bandInfos[0].etherPainter = new
Timeline.YearCountEtherPainter({
startDate: "",
multiple: 0,
theme: theme
});
bandInfos[0].syncWith = 1;
bandInfos[0].highlight = false;
bandInfos[0].decorators = [
];
tl = Timeline.create(document.getElementById("tl"),
bandInfos, Timeline.HORIZONTAL);
tl.loadXML("glueck.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>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---