dhtmlxGantt v20 Issues & Questions

  1. The config.columns section does not render the columns labels as specified and alignment specified in the header. E.g. I dont want my column header to be “Start time” but be “Start”, this is not working.

  2. Highlighting weekends and color coding links breaks the gantt chart. (see attached examples, one with both and one without weekend highlights) If you remove the weekend highlight on the templates the color coded links are shown properly including the grid lines on the gantt section. Please check if I am doing something wrong.

  3. How do you add your own holidays to be highlighted like weekends?

  4. How do you mark today’s date as a line e.g. red line like ms project

  5. How can I define the predecessors columns based on available task links? e.g. 1sf;3ss in a single task as my attached example.
    gantt with color coding.rar (1.47 KB)

Hello,

  1. It seems like a bug. Although grid configuration allows setting column label, gantt gives priority to the label that is defined in locale. So you have to override labels in locale:
    gantt.locale.labels.column_start_date = “Start”;

  2. task_cell_class template takes task object as the first argument, date goes as the second one
    docs.dhtmlx.com/gantt/api__gantt … plate.html
    template function from the attachment triggered the js error which stops bg rendering, this one should work: gantt.templates.task_cell_class = function(task, date){ if(date.getDay()==0||date.getDay()==6){ return "weekend"; } };

  3. Custom days can be highlighted the very same way as you highlight weekend - examine the date provided into the template function and return appropriate css class

  4. Currently the only way to achieve this is to highlight the whole day-column with scale_cell_class and task_cell_class

  5. Each task object has task.$source and task.$target properties that are hold arrays of links related to the task, you can use it to build list of predecessors var links = task.$source; var link = gantt.getLink(links[0]);

Hello!
When we can expect finished Java connector for new Gantt?

Regards, Ivan

We plan to release update for java and .net connectors on October 2013
Beta version will be available in two weeks.

Thanks for the prompt response, I have updated my code accordingly and everything is fine. Some more questions please.

  1. The task class, do you have full documentation on this class that will include its properties and methods? The methods seem to have fields like “order” that what can add, I don’t even know what that means?

  2. Are the columns of a task limited to the ones in the samples or one can add more and write and read these and also display them on the grid?

  3. What is the meaning of this code fragment “gantt.config.add_column = false;” and what does it actually do?

  4. Is there a method to recalculate the summary tasks start dates, finish dates and progress based on the child tasks?

  5. Can I just change the short dates for the locale without affecting the rest of the dates configuration?

  6. Are you considering adding scroll bars on the grid section? currently one has to resize it using gantt.config.grid_width, this is based on my question having additional columns on the grid that one can add.

  7. Are you considering adding calculations of the critical path?

  8. If someone has a task that they need to mark critical with color red for example, is there a way do do this without affecting the priority of the task as per your “priority” example? For example, the task has low priority but is on a critical path, what task variable can I use to store that criticality and thus mark it?

The task class, do you have full documentation on this class
There are few required fields - text, start_date, duration ( or end_date), id
There are few optional fields - parent, progress, open

docs.dhtmlx.com/gantt/desktop__loading.html

Those are fields which have special processing in gantt. In addition to them you can use any number of custom fields, which can be shown in grid, used in templates and styling. For all of them you can define editors and they will be automatically saved to the database, along with required fields.

  1. Are the columns of a task limited to the ones in the samples
    Of course not. You can add your own columns and remove the predefined ones - grid is fully configurable.

docs.dhtmlx.com/gantt/desktop__s … lumns.html

  1. What is the meaning of this code fragment “gantt.config.add_column = false;”
    It is an outdated code, will not cause any effect on the gantt ( by the way, where you have found it ? )

Is there a method to recalculate the summary tasks start dates
If summary has not defined start_date and duration, it will render self according to the start and duration of child tasks. Check the grid bars at the demo, they autosize to child task positions.
dhtmlx.com/docs/products/dhtmlxG … tures.html

Can I just change the short dates for the locale
Please provide more details, as it not clear which dates you want to change. ( in any case - I think it will be possible as dates configuration is very flexible )

Are you considering adding scroll bars on the grid section?
Currently we have not such plans. Still, we will look at feedback, and if there will be a lot of such requests - we will add the separate scroll for the grid.

Are you considering adding calculations of the critical path?
Will be in Gantt 2.1 ( October - November )

is there a way do do this without affecting the priority
It is related to the first qustion. The priority field is just a custom field, which was used in one of samples. You can have any number of custom fields, and use one or combination of them in the template to define the coloring logic. ( Also, based on feedback, we may add the “color” property, to simplify task coloring )

Thanks for the feedback, much appreciated.

A. the “add_column” method is in the example 02_custom_tree.html

Q. I have seen the example with different progresses, however I would like to display bars parallel to each other. For example, if i have planned progress as 10% and actual progress as 2%, I want to display two progresses within the bar just like a stacked column or progress within another with a different color and size.

It possible to use templates to redefine the content of the bar. As result, task bar can contain any html based on the custom template. It can be used to show multiple progress markers as well.

Thanks for the feedback, is there an example that I can perhaps find this on that is detailed to manipulate the templates?

  1. Speeding up display:

Q. How can I speed up the display of the gantt. I have 175 tasks in my plan spanning over 20 000 days of duration using a weekly and day scale. The gantt chart takes more than a minute to display and when I collapse some tree tasks it takes the same time. i understand that this could be repaining. How can the display speed be improved?

Hi,

check this example
docs.dhtmlx.com/gantt/samples/04 … ntent.html

Unfortunately I can’t suggest any good solution, gantt with duration of this big will work slowly.

The thing that affects display speed greatly is the number of steps in the time scale. The more steps displayed, the slower gantt works, so the general approach of speeding it up is a decreasing number of dispayed time columns(e.g. using a bigger time units for the scale).

You can try a little hack to reduce the total number of programmatic steps of scale - define two week scales, and specify inner HTML content of the lower one so it would look like a day scale(define content as a seven inline-block divs with a day labels). This way you could reduce number of column by 7 times, but this approach has a serious drawbacks. Your gantt won’t have an actual day columns, and this may affect some aspects of its behavior.

Can you show an example of this inner HTML content to reduce programmatic steps of scale?

Hello,
try this one.
With our test data it seems to work ~5-7 times faster that regular day columns, although i’ve tested on small ammount of tasks. With a lot of the tasks the advantage may be not so big.
dhtmlxgantt_big_scale.zip (103 KB)

Hello,

Is there a way to exclude week-ends of task’s durations ?

=> If a task has duration of 3 days and begins on monday it should end on wednesday
=> If a task has duration of 3 days and begins on friday it should end on tuesday

Thanks for your answer

It is planned for the next update and not possible with current version.

can you make the default date offset (min_date/max_date) scale_unit based?

i have changed gantt._init_tasks_range() to

var date_offset = 1;
switch(unit){
	case 'day':date_offset = 7; break;
	case 'week':date_offset = 4; break;
	case 'month':date_offset = 3; break;
	case 'year':date_offset = 1; break;
}
this._min_date = this.date[unit + "_start"](this._min_date);
if(+this._min_date == +min)
	this._min_date = this.date.add(this.date[unit + "_start"](this._min_date), -date_offset, unit);

this._max_date = this.date[unit + "_start"](this._max_date);
this._max_date = this.date.add(this._max_date, date_offset+1, unit);