Skip to content

Commit 8afca59

Browse files
author
Maria Rudenko
committed
Merge pull request '[update] 'Configuration' article' (#78) from GS-2739 into master
Reviewed-on: https://git.webix.io/Servers/gantt-docs/pulls/78
2 parents a6846dd + 923151a commit 8afca59

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

data/desktop/common_configuration.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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
------------------------
1113
All 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

1517
Beware, configuration options should go before the code line with dhtmlxGantt initialization.
1618

17-
1819
~~~js
1920
gantt.scales = [
20-
{ unit: "year", step: 1, format: "%Y" }
21+
{ unit: "year", step: 1, format: "%Y" }
2122
];
2223

2324
gantt.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+
4447
gantt.init("gantt_here");
4548
~~~
4649

47-
4850
<img src="desktop/gantt_templates.png"/>
4951

5052
See the full list of available templates in the [Gantt API:Templates](api/refs/gantt_templates.md) section.

media/desktop/gantt_templates.png

46.5 KB
Loading

0 commit comments

Comments
 (0)