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