I am developing a timeline module in javascript (d3 + react) Each task is drawn along the X axis based on its start date and duration. The tasks are likely to overlap and I am looking for the most efficient way to calculate their height and position on the Y axis according to this overlap. Does somebody have an idea ? Thanks for your help !