Alan,

I just did something like that on a timeline using different XML files.

I identified different event sources variables first:

 function onLoad() {

  var eventSourcePrint = new Timeline.DefaultEventSource();
  var eventSourhceWeb = new Timeline.DefaultEventSource();

…

told the bands to use that source

…

 var bandInfos = [
        Timeline.createBandInfo({
        eventSource:    eventSourceWeb,
        width:          "30%",
        intervalUnit:   Timeline.DateTime.MONTH,
        intervalPixels: 50,
        theme:                  webTheme
    }),
        Timeline.createBandInfo({
        eventSource:    eventSourcePrint,
        width:          "30%",
        intervalUnit:   Timeline.DateTime.MONTH,
        intervalPixels: 50,
        theme:                  printTheme
    }),

…

then finally link to the appropriate XML file

…

tl = Timeline.create(document.getElementById("my-timeline"), bandInfos); Timeline.loadXML("webHistory.xml", function(xml, url) { eventSourceWeb.loadXML(xml, url); });

tl = Timeline.create(document.getElementById("my-timeline"), bandInfos); Timeline.loadXML("printHistory.xml", function(xml, url) { eventSourcePrint.loadXML(xml, url); });

}


Hope this helps.


Florian



On May 17, 2007, at 8:39 AM, [EMAIL PROTECTED] wrote:

From: Alan McMorran <[EMAIL PROTECTED]>
Subject: Adding Events to only Bands

Quick question, which is probably covered in the documentation but
I'm just missing it.  Is there a way to have events appear in only
select bands on a timeline? The reason I ask is that I'm adding in
some events that are in the millisecond range and while I want them
to appear in the seconds band, they just clutter up the hours and
days bands. I have other duration events which cover the entire life-
span of the incident (it's for showing faults on an electrical
network), so I'd like them to appear in the long-term view, but when
you scroll to it, the individual events that caused the incident will
be in the seconds and minutes bands.

I figure there must be a way to add attributes to each event that
denotes which band it should appear in, and if there is no current
way I'll have a fiddle with the code. I just wondered if the
functionality was there already or if anyone had figured out a nice
elegant way of doing it (since anything I come up with will
undoubtedly be just a hack!)

Cheers

Alan


--

Dr Alan McMorran
Research Fellow
Advanced Electrical Systems Group
Institute for Energy and Environment
Electronic and Electrical Engineering Department
Royal College Building
University of Strathclyde
Glasgow G1 1XW.
Tel: +44 (0)141 548 4839
Mob: +44 (0) 7968 024 063



-

honest communications
for a better tomorroh

http://fangohr.com


_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general

Reply via email to