almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Dynamic timebar on timeline #375

Closed deStrO closed 10 years ago

deStrO commented 10 years ago

Hello,

As the timebar is moving, it is possible to have a mode to "follow" it, ie. the timebar stay statics but the timeline move?

Thanks :)

AlexDM0 commented 10 years ago

Hi,

You could use the streaming data example http://visjs.org/examples/graph2d/15_streaming_data.html to implement your own moving of the timeline. The core of the timeline and graph2d is the same so you could use that.

Basically, every frame you shift the timeline by 1 second. This is very computationally intensive though! Now since it may be difficult to get exactly in the same phase as the red time indicator, you could use the custom time indicator to have more control over when it updates.

Regards,

Alex