Tuesday, September 01, 2015

Another visualization trick - or annoucing timeline a new HTML5 app for timelines.

When writing freeform games, when tend end up with a lot of prose, mostly distinct that says things "A few weeks after that you received a letter".

And another character (eg on a different document) will have some text like ' 4 months ago you sent  a letter to.."

With all these relative dates, often relative to different event, so of those are relative as well, it can be very difficult to keep track of what you said happened in what order.

To ensure I was as consistent , I wanted to chart these out. In the first place I found the lovely vis.js visualisation library for the browser environment which has a timeline widget.

It was a simple matter to invoke the timeline widget with an array of events created from  by date arithemtic, and plot them. The vis.js gave me zooming , dragging etc so I could move about my timeline.

It showed me something I should have known was wrong and another, and something else a bit odd. So a success  - it has allowed me to view the timeline clearly. So successful that I had a request to use from someone who has never coded javascript before - and they managing to use it just about Ok .

Unfortunately this fact that version of the tool was so simple lead me to thinking - it can't be too hard to put a proper UI on this can it. It a bank holiday, I'll knock it up an Saturday have and the rest of the weekend to do the other things I have planned.

Famous last words , of course. By the end of Saturday - I had got it to remember the the links and allow the dependent to all about prettily when dragged, and by the end of Snday you could create events, rename events. And save your work. You couldn't load it back though.

It took Monday morning to get loading, and a good chunk  of the afternoon to get dependent object creation. Leaving me Monday evening to all my bank holiday chores.

Yeah - right.

So what you can see here is very much a work in progress -although I do have other things to be getting on with. My aim was something that can be a single file (+ some js downloaded from a cdn) people can run in their browser to manage these sort of dataset privately. It has moved a little way from that if with the addition of jquery and jquery-ui. But perhaps not to far.

At the moment I have the Javascript in seperate files, but perhaps I can a stage to build process to bring it together... but there are other feature it needs more...

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home