denisemauldin / d3-timeline

D3 timeline
BSD 3-Clause "New" or "Revised" License
168 stars 72 forks source link

Is there a way make the width change of a gant chart lanes based on the time given. #23

Open Akayeshmantha opened 5 years ago

Akayeshmantha commented 5 years ago

Hi when I draw the gannt chart with the time that I have It's basically creating a chart like below

Screenshot from 2019-05-28 10-58-32

but I want the lanes of it to be more wider.And to be change the width based on the least starting time and most ending time.Any idea this is my configuration

   this.chart = d3timelines.timelines()
        .stack() // toggles graph stacking
        .tickFormat({
            format: d3timeformat.timeFormat("%Y-%m-%d, %H:%M:%S")
        })
        .showTimeAxisTick()
        .margin({left:70, right:30, top:0, bottom:0})
       ;
        var idDiv = ".cls"+data.id;
        d3.select(idDiv).append('svg').attr('width', 1000)
        .datum(this.data).call(this.chart);