30

This is what I'm trying to accomplish:

Timeline

In this example, I have a starting date (1º Jun 2011), an ending date (1º Jul 2012) and multiple events between this range.

Each event is related to one day of the calendar (although it is possible to have many events on a single day).

This data is fetched from a MySQL DB.

Any help or suggestion will be highly appreciated.

3 Answers 3

51

I recently had to do something similar. I ended up writing a d3 plugin that could handle this case among a few others. https://github.com/jiahuang/d3-timeline

enter image description here

enter image description here

enter image description here

enter image description here

I'm pretty new to D3 as well, but I hope it's useful.

3
  • I had to make some changes in the code, but your plugin was exactly what I needed. Thanks and sorry for the late response, I was busy with another stuff.
    – azeós
    Feb 13, 2013 at 16:15
  • 2
    @azeós could you share your modifications with the class? I am very curious. Dec 19, 2014 at 16:44
  • @randomblink It was for an old and dead project. I'll search through the files and see if I can find it.
    – azeós
    Dec 19, 2014 at 20:35
9

You should be able to accomplish this with a time scale and an axis

Scott Murray has a really good set of tutorials that culminates in one for axes

Just think of your time line as a 1-dimensional scatterplot with a time scale.

1
  • 7
    Is there a tutorial for D3 tailored to 5 year olds? I need something like that. May 2, 2015 at 2:47
1

I am going to develop similar visualization and found on Github timeknots component based on d3.js.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.