How can I make those thin lines like on the image? The thin lines are original timestamps, while the “normal” boxes are updated timestamps.
Hi Chris,
in the Gantt you can create such thin lines using addTaskLayer
method like in code below:
gantt.addTaskLayer({
renderer: {
render: function draw_planned(task) {
if (task.planned_start && task.planned_end) {
var sizes = gantt.getTaskPosition(task, task.planned_start, task.planned_end);
var el = document.createElement('div');
el.className = 'baseline';
el.style.left = sizes.left + 'px';
el.style.width = sizes.width + 'px';
el.style.top = sizes.top + gantt.config.task_height + 13 + 'px';
return el;
}
return false;
},
// define getRectangle in order to hook layer with the smart rendering
getRectangle: function(task, view){
if (task.planned_start && task.planned_end) {
return gantt.getTaskPosition(task, task.planned_start, task.planned_end);
}
return null;
}
}
});
after creating baseline using addTaskLayer
and changing CSS:
.baseline {
position: absolute;
height: 0;
opacity: 0.6;
padding-bottom: 0px;
background: #049ae1;
border: 1px solid #049ae1;
}
the baseline will be as in the image you sent.
I made a snippet close where you can change these lines dynamically via lightbox:
http://snippet.dhtmlx.com/5/b9b3fbac6
If this is not what you meant, please explain in more detail.