@@ -6,6 +6,8 @@ To gain the desired look for the Gantt chart, dhtmlxGantt provides 2 objects:
66- [ gantt.config] ( api/refs/gantt_props.md ) - configuration options for dates, scale, controls etc.
77- [ gantt.templates] ( api/refs/gantt_templates.md ) - formatting templates for dates and labels used in the Gantt chart.
88
9+
10+
911'gantt.config' object
1012------------------------
1113All the configuration options are declared in the ** gantt.config** object.
@@ -14,10 +16,9 @@ To set the desired option, just write it as it's stated in this documentation.
1416
1517Beware, configuration options should go before the code line with dhtmlxGantt initialization.
1618
17-
1819~~~ js
1920gantt .scales = [
20- { unit: " year" , step: 1 , format: " %Y" }
21+ { unit: " year" , step: 1 , format: " %Y" }
2122];
2223
2324gantt .init (" gantt_here" );
@@ -29,6 +30,8 @@ See the full list of the **gantt.config** properties in ["Gantt API:Properties"
2930 03_scales/02_month_days.html
3031}}
3132
33+
34+
3235'gantt.templates' object
3336-------------------------------------
3437
@@ -38,13 +41,12 @@ To define a template, just write it as it's stated in this documentation. Rememb
3841
3942
4043~~~ js
41- gantt .templates .task_text = function ( start , end , task ){
42- return " <b>Text:</b> " + task .text + " ,<b> Holders:</b> " + task .users ;
43- };
44+ gantt .templates .task_text =
45+ ( start , end , task ) => ` <b>Text:</b> ${ task .text } ,<b> Holders:</b> ${ task .users } ` ;
46+
4447gantt .init (" gantt_here" );
4548~~~
4649
47-
4850<img src =" desktop/gantt_templates.png " />
4951
5052See the full list of available templates in the [ Gantt API: Templates ] ( api/refs/gantt_templates.md ) section.
0 commit comments