I am using a custom lightbox so I have ignored step 1. However I have followed steps 2 and 3.
Step 2 required a tweak because I am using remote JSON and have to escape all values with quotation marks “”.
gantt.templates.rightside_text = function(start, end, task){
if(task.type == "gantt.config.types.milestone"){
return task.text;
}
return "";
};
The right side text is working now, however the milestone still shows as a regular event with zero duration.
{ "data":[{"id":"1","text":"This is a test task","duration":"2","type":"0","start_date":"13-04-2013","parent_id":"0"},{"id":"2","text":"Another Awesome Task","duration":"4","type":"0","start_date":"13-04-2013","parent_id":"0"},{"id":"3","text":"This is a milestone","duration":"0","type":"gantt.config.types.milestone","start_date":"13-04-2013","parent_id":"0"}]}
Hello,
“gantt.config.types.milestone” - you need to remove quotes from this.
Gantt configuration has option which holds all defined types (so you can add custom types there). They are stored as ‘name’->‘value’ map.
The default value of types config is following:gantt.config.types = {
'task': 'task',
'project': 'project',
'milestone': 'milestone'
};
Types can be mapped to different database values (e.g. if you have existing data, which can be loaded to gantt), in that case config can be redefined.
So you data should contain a value of gantt.config.types.milestone property, not the property name itself. With the default settings your code should look following:gantt.templates.rightside_text = function(start, end, task){
if(task.type == gantt.config.types.milestone){
return task.text;
}
return "";
};
Data:
{"id":"3","text":"This is a milestone","duration":"0","type":"milestone","start_date":"13-04-2013","parent_id":"0"}
Hello Gayathri,
After you purchase the license, you will get an archive with the Pro version. You will find the codebase folder there. You need to unpack the archive somewhere. /opt/gantt_trial is an example of the path to a folder on Linux. Here is an example with another folder on Linux:
If you use Windows, it can be:
C:\Gantt_Pro\
In Mac it can be:
~/Library/Gantt_Pro/
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan