Closed cretace closed 3 years ago
@cretace @denisemauldin I have the same question. I would like to use dates instead of times. Can someone help me out how to change the code? Would very much appreciate
Hey -I gave up with d3 - dozens of annoying issues. Zoom limits were impossible to specify. Moved to Flot and all works much better - still (unix)time based but not hard to make it only do days. I abandoned zoom and slide of x axis but I think it's possible in Flot.
Thanks for your answer. I try to create a, fairly, simple timeline without zooming. So I try to get it working in d3. I use c3.js for the simple charts, so I already have d3 in place. I general I would prefer to stick to that.
@sharepointmike Are you using d3 version 4?
Hi @denisemauldin, version 4. What I try now is converting my dates to Unix times and changing the format. Would that be the way to go?
@sharepointmike Yes, this is designed to work with unix times in a relative way. Unfortunately this is not meant to display via days, but you might be able to find a tickFormat that would work.
@denisemauldin this format: d3.timeFormat("%d-%m-%y") seems to work.
Doing a sort of Gantt chart but my data is in blocks of days. I'm getting there but any idea how I change x axis to show date not times? Even zooming out I still see times. Hmm ok.. I see the axis does not redraw on zoom. This one does: https://github.com/commodityvectors/d3-timeline ..scratch head.. anyway thanks for your code