Scott, Looks like you are doing exactly what I want! I am doing a lot of extra hoops cause I don't load the json just once. I am including my JSON data via this method:
<link href="people-exhibit-json.xq?id=jefferson-thomas" type="application/json" rel="exhibit/data" /> However, you seem to be suggesting a better way of doing this? Is there an example of using the req.responseText method in any of the simile Examples? I didn't find it on my first pass through... I did find this post that looked related... http://groups.google.com/group/simile-widgets/browse_thread/thread/881cda360855420f Eric On Jan 22, 2009, at 5:09 PM, Scott Thomson wrote: > Hi Eric, > > I might not be understanding yoiur question clearly but I update my > timeline with dynamic json data. > > Have you tried reading your json into a memory object > > var my_json = eval('(' + req.responseText + ')'); // this is > turning ajax response JSON text data into a JSON object > > and then: > > var min_start = calcMinStart(my_json); > var max_end = calcMaxEnd(my_json); > > : > theme.timeline_start = min_start; > theme.timeline_start = max_end; > : > > // then just load your JSON directly to the event source > eventSource.loadJSON(my_json, ''); > > On Fri, Jan 23, 2009 at 1:07 AM, Eric Pugh <[email protected] > > wrote: > > Hi all, > > I've been using the custom timeline constructor to set the start and > end time of the timeline in Exhibit (I am using trunk of the timeline > project): > > theme.timeline_start = new Date(Date.UTC(1725, 0, 1)); > theme.timeline_stop = new Date(Date.UTC(2015, 0, 1)); > > Is there anyway to instead make the start and stop based on my JSON > data source? > > Eric > > ----------------------------------------------------- > Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | > http://www.opensourceconnections.com > Free/Busy: http://tinyurl.com/eric-cal > > > > > > > > > > -- > Scott Thomson > 0401 726 889 > > > ----------------------------------------------------- Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | http://www.opensourceconnections.com Free/Busy: http://tinyurl.com/eric-cal --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
