jiahuang / d3-timeline

Simple JS timeline plugin for d3
1.04k stars 280 forks source link

Fix #87 support d3 v4, and add horizontal zoom (fixes #57) #93

Open fidlr opened 7 years ago

kwe7 commented 7 years ago

You have saved my week fidlr! This is fantastic. Thank you.

fidlr commented 7 years ago

Happy to help @kwe7

kwe7 commented 7 years ago

Hi fidlr, do you know how to apply clipping to your zoom feature? The zoom works perfectly, but the timeline will expand to block my view of the y-axis values.

Also, I think this might be more of a me problem, but upon following your v4 updates, my time axis shows correct minutes but not correct hours. d.starting_time and d.ending_time are still correct. Do you have any insight as to why only my time axis was affected in this way?

Thanks!

fidlr commented 7 years ago

I have the same issue with the labels, but it was like that in the original code with scrolling so I left it as-is for now. I might get back to it later if it becomes an issue. If you post a fix, I'd definitely want it. As for the date, I might have had the same problem, not sure. Make sure you call "new Date(d)", instantiating a new Date object.

kwe7 commented 7 years ago

I think that I have successfully added clipping for the zoom. How do I add a commit so everyone can see the changes?

fidlr commented 7 years ago

You can either fork and submit a pull request, or attach a patch, and I'd be happy to merge it to this fork.