When setting a task as a milestone without time, such as Task # 4.2 and Task # 2.4, the Gantt set_ Task_ The row background color becomes invalid.
But milestones with time, such as the Mediate milestone, are effective.
Another question
Task # 4.1 does not have a time, but it is displayed in the timeline area for one day. Can it be avoided?
And the display of Task # 4 does not include the scope of Task # 4.1, only calculating the time of the Mediate milestone
There is also a requirement consultation
If I want to make the row and column of the cell where the mouse is located display background color when I move the mouse over the timeline area, is there any good method to achieve this?
If you load tasks without enough date parameters Gantt will assign them from their children or from other tasks. But in that case, you won’t be able to drag or resize these tasks.
You can check how it works in the following sample: https://snippet.dhtmlx.com/wpxeeiap
It seems that when the task date is not valid, Gantt calls the task_row_class template for the parent task. So, when the mouse is over the #2.4 and #4.2 tasks, the template is called for their parent tasks. This is not a bug as Gantt expects the date parameters for all tasks.
If you unschedule the tasks with the incorrect dates, the template will be called correctly for these tasks.
Here is the updated snippet: http://snippet.dhtmlx.com/5/73fbe21dd
Another question
Task # 4.1 does not have a time, but it is displayed in the timeline area for one day. Can it be avoided?
And the display of Task # 4 does not include the scope of Task # 4.1, only calculating the time of the Mediate milestone
Task #4 is a regular task. As it is said before, the dates are obtained from other tasks. If you drag Mediate milestone, Task #4 will follow it. You will need to unschedule the task, then it won’t be displayed in the timeline.
There is also a requirement consultation
If I want to make the row and column of the cell where the mouse is located display background color when I move the mouse over the timeline area, is there any good method to achieve this?
You will need to check the task row element and obtain the task ID there.
Here is the example of the implementation:
Hey, bro, thank you very much for your timely answer. Unschedule is a great help, making my charts no longer just hidden in CSS. I will study your response carefully and modify the code. If there are any questions, I will consult again.
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan