HTMLcopy
1
<div id="container"></div>
CSScopy
6
1
html, body, #container {
2
width: 100%;
3
height: 100%;
4
margin: 0;
5
padding: 0;
6
}
JavaScriptcopy
x
1
anychart.onDocumentReady(function () {
2
var data = getData();
3
4
var chart = anychart.ganttProject();
5
chart.data(data, 'as-table');
6
7
var timeLine = chart.getTimeline();
8
timeLine.textMarker({value: '2000-02-27T00:00'});
9
timeLine.textMarker(1, {value: '2000-02-29T00:00'});
10
11
// Disables text marker.
12
timeLine.textMarker(false);
13
14
chart.title('Disables text marker');
15
chart.container('container');
16
chart.draw();
17
chart.fitAll();
18
});
19
20
function getData() {
21
return [
22
{
23
id: 1,
24
name: 'Phase 1 - Strategic Plan',
25
progressValue: 0.14,
26
actualStart: '2000-02-24',
27
actualEnd: '2000-02-27'
28
},
29
{
30
id: 2,
31
name: 'Self-Assessment',
32
parent: 1,
33
progressValue: 0.25,
34
actualStart: '2000-02-24',
35
actualEnd: '2000-02-29',
36
baselineStart: '2000-02-27',
37
baselineEnd: '2000-02-28T08:00'
38
},
39
{
40
id: 3,
41
name: 'Define business vision',
42
parent: 2,
43
progressValue: 0,
44
actualStart: '2000-02-24T24:00',
45
actualEnd: '2000-02-25T09:00',
46
connectTo: 4,
47
connectorType: 'finish-start'
48
},
49
{
50
id: 4,
51
name: 'Identify available skills, information and support',
52
parent: 2,
53
progressValue: 0,
54
actualStart: '2000-02-26T00:00',
55
actualEnd: '2000-02-26T09:00',
56
connectTo: 5,
57
connectorType: 'finish-start'
58
},
59
{
60
id: 5,
61
name: 'Decide whether to proceed',
62
parent: 2,
63
progressValue: 0,
64
actualStart: '2000-02-27',
65
actualEnd: '2000-02-28T08:00',
66
connectTo: 6,
67
connectorType: 'finish-start'
68
},
69
{
70
id: 6,
71
name: 'Define the Opportunity',
72
parent: 1,
73
progressValue: 0.27,
74
actualStart: '2000-02-28T08:00',
75
actualEnd: '2000-02-29'
76
},
77
{
78
id: 7,
79
name: 'Research the market and competition',
80
parent: 6,
81
progressValue: 0,
82
actualStart: '2000-02-26T08:00',
83
actualEnd: '2000-02-27'
84
}
85
];
86
}