I am having difficulties in completing a task which requires to display lines as animations in a web app.
The lines data is stored in a database and consists of x, y and time information. The x and y coordinates specify the position of the drawn points whereas time represents the timestamps (in milliseconds) of the respective points.
For instance,
point 1 (x=10, y=23, t=152)
point 2 (x=21, y=29, t=385)
point 3 (x=15, y=20, t=506)
…
…
So, the task is to display these points in a web app based on the given timestamps.
My problem is first that I do not know what kind of graphical plugin to use and then how to implement it (that is how to use timers, how to do the animation, etc).
I would appreciate any help from you! Please let me know in case you need more information about this task. I would gladly provide it.
Kind regards,
Frida
I think I would use Raphaël for something like this. It is easy to use and has support for all major browsers. The animated line drawing can be a little troublesome because you have to generate each step as a seperate path, but it shouldn’t be to hard.
Here is a very simple example
And here is a fiddle where you can see it in action: http://jsfiddle.net/toxicsyntax/FLPdr/
UPDATE
Here is a complete HTML page that uses the above code. It is still a simplified example, but you should be able to work your way from that.
The points are at the end of the HTML page, and in your application you could generate those from your model.