Gantt chart task related queries

Hi,

I have a requirement where…

  1. List item

task should not look for start_date and end_date from its parent, Parent should only get start_date and end_date from its child not from parent or any sibling.(forward planning)
please refer attachmnet -
all date under blue line is taking start_date and end_date from the task under red line.

  1. List item

In one of the column which is of type long is coming null , because there is no value for that column for that task. We want to show nothing if the value is null. Please provide solution for number and string type values.

Thanks & Regards,
Sweeti

Hi,
please suggest if it is possible to show two different bar chart for different task columns.
Please refer attached screenshot-
We need bar chart for start time and end time entities.
Another bar chart for the tasks which has planned start date planned end date.
Is it possible to show and how.



Thanks & Regards,
Sweeti

Hello Sweeti,

task should not look for start_date and end_date from its parent,

Looks like your tasks do not have start_date parameter. All tasks should have start_date, end_date and duration parameters if you want to see them in the timeline. But there are also unscheduled tasks:
https://docs.dhtmlx.com/gantt/desktop__unscheduled_tasks.html
So you can add tasks without start_date as unscheduled. Here is an example:
http://snippet.dhtmlx.com/46b2ca92a

Parent should only get start_date and end_date from its child not from parent or any sibling.

There is project task type that already has that functionality. Projects take dates depending on their children:
https://docs.dhtmlx.com/gantt/desktop__task_types.html

In one of the column which is of type long is coming null , because there is no value for that column for that task. We want to show nothing if the value is null. Please provide solution for number and string type values.

You can define what is displayed in the grid using columns config:
https://docs.dhtmlx.com/gantt/api__gantt_columns_config.html
You just check if there is planned_date or any other parameter and return '' if there is no such a parameter. It should work regardless of the value type.
Here is an example:
http://snippet.dhtmlx.com/a420ce90c

please suggest if it is possible to show two different bar chart for different task columns.
Please refer attached screenshot-
We need bar chart for start time and end time entities.
Another bar chart for the tasks which has planned start date planned end date.
Is it possible to show and how.

It is possible to show several views in the chart using layout.config:
https://docs.dhtmlx.com/gantt/desktop__layout_config.html
But it is not possible to show different Gantt charts in the same view.
Here is an example where you can see two different grids:
http://snippet.dhtmlx.com/30bc392fb

Hi Ramil,

Thanks for your quick response.
For the last point I want to elaborate more-
please refer attached screenshot-

As you can see- There are 2 bars available in same view.
Yellow bar is generating for the start , end and Duration in MD column values.
Blue bar is generating for the plannedduration, plannedstartdate, plannedenddate columns values.
same we want in our chart, to show two different bars depending on the different columns and we want this in same chart , as shown in screenshot, not in different layout.

Looking forward for your response.

Thanks & Regards,
Sweeti

Hello Sweeti,
Thank you for the clarification.
If you want to see additional bars, you can add them using addTaskLayer function:
https://docs.dhtmlx.com/gantt/api__gantt_addtasklayer.html
https://docs.dhtmlx.com/gantt/desktop__baselines.html
We have an example called “baselines” in our samples where you can put planned dates:
https://docs.dhtmlx.com/gantt/samples/04_customization/15_baselines.html
But you can add more bars at the same time if you want:
http://snippet.dhtmlx.com/8d4cf916d

Hi Ramil,

Thank you for your quick response.
Is this task-Layer feature is available in trail version.
We are using trial version.

Thanks & Regards,
Sweeti

Hello Sweeti,
Yes, The trial version includes all Pro features.

Hi Ramil,

But I am getting the error - addTaskLayer is not a function.

Regards,
Sweeti

Hello Sweeti,
Please check the following things to make sure that gantt works as expected.

  1. Open the javascript file, dhtmlxgantt.js and check that you have “Professional” version. If you see “Standard” then it means that it is the free version:
    http://prntscr.com/l6b6dy
  2. Open your html-file (or another file where you connect gantt) and make sure that you connected correct file.
    http://prntscr.com/jkjw9e
  3. Open “time.is” or any other website that checks your time. If the date on the computer is incorrect, gantt might not work correctly.

Hi Ramil,

We are using standard version. In standard version all pro features available?
Like - Type- project, addTaskLayer etc.

Regards,
Sweeti

Hi Ramil,
We are using standard version of gantt.

1. Parent should only get start_date and end_date from its children not from parent or any sibling.

As you suggested - There is project task type that already has that functionality. Projects take dates depending on their children.
In our case, we have the scenario, if parent does not have start_date , end_date , duration. It should take from its children and If it has start_date , end_date , duration, it should use its own.
But if parent and its children all don’t have start_date , end_date , duration, it should be blank.

Now I am checking if its any of its children do not have start_date , end_date , duration,… I am setting unscheduled = true and type = milestone.
If parent or its any of the children have start_date , end_date , duration, I am setting unscheduled = false and type = project.
But things are not working properly , even using milestone duration is 1 if task does not have duration.

Please suggest your solution.

Regards,
Sweeti

Hi Ramil,

Please let me know what is the difference between standard version and trail version.
How we can configure the pro trail version for our angular4 project. We want to be sure if required features are working fine with our project, before purchasing the product.
Project conf-
fornt end -Angular4, typescript (not using jquery)
backend - C#

Thanks & Regards,
Sweeti

Hello Sweeti,
The Standard version is not a Pro/Trial version. It doesn’t have PRO-features. The Trial version has all PRO-features.

In our case, we have the scenario, if parent does not have start_date , end_date , duration. It should take from its children and If it has start_date , end_date , duration, it should use its own.

“Projects” ignore start_date, end_date and duration parameters. Looks like you need to get something custom and project type doesn’t fit your needs.

I made a snippet where it is checked for the start date to make the task unscheduled. After everything is loaded we get all parents and obtain maximal end_date and minimal date start_date:
http://snippet.dhtmlx.com/f61b6b246
However, it works only after the data is loaded. Gantt doesn’t control parent dates if you drag tasks. So you need to add event handlers and control parent dates.

To install PRO or Trial version in an angular project, use the following command:

npm install "path to unpacked gantt folder with package.json"

https://docs.dhtmlx.com/gantt/desktop__install_with_bower.html#addingprofessionaleditionintoproject

Hi Ramil,

Gantt is taking default value of duration ‘1’, if duration does not have any value. so in case if start_date or end_date does not exists, in that case duration column should be empty… but it is showing 1. I can’t use milestone…that does not fit for our requirement.
Please suggest how we can have no value in duration column.

Please refer below screenshot -

Thanks & Regards,
Sweeti

Hello Sweeti,
You need to return an empty string in the column config for unscheduled tasks.
Here is the snippet:
http://snippet.dhtmlx.com/cfeb540ac

And you probably need to use the following method to hide the date control in the lightbox for unscheduled tasks:

gantt.config.lightbox.sections = [
		{name: "description", height: 70, map_to: "text", type: "textarea", focus: true},
		{name: "time", map_to: "auto", button: true, type: "duration_optional"}
];

http://snippet.dhtmlx.com/2cfae3bc3