How to have the task at the begenning of a day cell when starting at begenning of working time?

Hi,

Is there is a way to have the start of a task visually coinciding with the left side of the cell when it starts at the begenning of the working hours of that day ?

In this capture, this task is starting at 8am, the begenning of the day. And visually is far later. I figured out how to hide not-working time when a cell represents an hour, and I would like to do the same when a cell is for a day.

image

Thanks

Hello Jean,
It is no possible to tear the cell.
But you can show a task at the beginning of the cell by adding a subscale with “hour” unit and hiding the scale header (if you need that). In that case, non-working hours will be hidden, and the day scale will start from the working time. And to make it more convenient, you can change the minimal column width.
Here is an example:
http://snippet.dhtmlx.com/100673055

Hello Ramil,

Thnk you for your answer. I tried your solution, and it makes the parsing and display of all the tasks way too long and it’s not usable…

Thank you again :slight_smile:

Hello Jean,
You can try applying the tweaks to improve the performance:
https://docs.dhtmlx.com/gantt/desktop__performance.html
Here are the examples:
https://docs.dhtmlx.com/gantt/samples/08_api/10_performance_tweaks.html
https://docs.dhtmlx.com/gantt/samples/02_extensions/13_smart_rendering.html
http://snippet.dhtmlx.com/c854be4ec

Hi again,

I’m already using the smart rendering.
By setting config.static_background to true, I’m losing the interrest of adding another time scale, as there is no possible way to check if the cell should be disabled or not (which would have been the point of adding an hidden day scale on my view) as I cannot use gantt.templates.task_cell_class.

They are different calendar for worktimes depending of the tasks.

I know, I’m asking a lot :smiley:

Looks like I won’t be able to solve that one to be honnest.

Thanks for your help !

Hello Jean,
It is possible to highlight the cells by using additional layers:
https://docs.dhtmlx.com/gantt/api__gantt_addtasklayer.html
Here is an example:
https://snippet.dhtmlx.com/4f4cacf4e

But it seems, that your case requires more customization (as you share the details). Maybe, it is easier to use a custom scale so that day will always start at 8:00:
http://snippet.dhtmlx.com/1885e334e