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
// Get chart credits.
8
// You can't customize credits without a license key. See https://www.anychart.com/buy/ to learn more.
9
chart.credits(false);
10
11
chart.title('Disables chart credits');
12
chart.splitterPosition(223);
13
chart.container('container');
14
chart.draw();
15
chart.fitAll();
16
});
17
18
function getData() {
19
return [
20
{id: 1, name: 'Phase 1 - Strategic Plan', progressValue: 0.14, actualStart: '2000-02-24T08:00', actualEnd: '2000-03-28T09:00'},
21
{id: 2, name: 'Self-Assessment', parent: 1, progressValue: 0.25, actualStart: '2000-02-24T08:00', actualEnd: '2000-03-02T08:00'},
22
{id: 3, name: 'Define business vision', parent: 2, progressValue: 0, actualStart: '2000-02-25T00:00', actualEnd: '2000-02-25T09:00', connectTo: 4, connectorType: 'finish-start'},
23
{id: 4, name: 'Identify available skills, information and support', parent: 2, progressValue: 0, actualStart: '2000-02-26T00:00', actualEnd: '2000-02-26T09:00', connectTo: 5, connectorType: 'finish-start'},
24
{id: 5, name: 'Decide whether to proceed', parent: 2, progressValue: 0, actualStart: '2000-02-29T00:00', actualEnd: '2000-02-29T09:00', connectTo: 7, connectorType: 'finish-start'},
25
{id: 6, name: 'Define the Opportunity', parent: 1, progressValue: 0.27, actualStart: '2000-02-29T08:00', actualEnd: '2000-03-14T08:00'},
26
{id: 7, name: 'Research the market and competition', parent: 6, progressValue: 0, actualStart: '2000-03-01T00:00', actualEnd: '2000-03-01T09:00', connectTo: 8, connectorType: 'finish-start'},
27
{id: 8, name: 'Interview owners of similar businesses', parent: 6, progressValue: 0.6, actualStart: '2000-03-01T08:00', actualEnd: '2000-03-08T08:00', connectTo: 9, connectorType: 'finish-start'},
28
{id: 9, name: 'Identify needed resources', parent: 6, progressValue: 0, actualStart: '2000-03-09T00:00', actualEnd: '2000-03-10T09:00', connectTo: 10, connectorType: 'finish-start'},
29
{id: 10, name: 'Identify operating cost elements', parent: 6, progressValue: 0, actualStart: '2000-03-11T00:00', actualEnd: '2000-03-14T09:00', connectTo: 12, connectorType: 'finish-start'},
30
{id: 11, name: 'Evaluate Business Approach', parent: 1, progressValue: 0, actualStart: '2000-03-15T00:00', actualEnd: '2000-03-18T09:00'},
31
{id: 12, name: 'Define new entity requirements', parent: 11, progressValue: 0, actualStart: '2000-03-15T00:00', actualEnd: '2000-03-15T09:00', connectTo: 17, connectorType: 'finish-start'},
32
{id: 13, name: 'Identify on-going business purchase opportunities', parent: 11, progressValue: 0, actualStart: '2000-03-16T00:00', actualEnd: '2000-03-16T09:00', connectTo: 14, connectorType: 'finish-start'},
33
{id: 14, name: 'Research franchise possibilities', parent: 11, progressValue: 0, actualStart: '2000-03-17T00:00', actualEnd: '2000-03-17T09:00', connectTo: 15, connectorType: 'finish-start'},
34
{id: 15, name: 'Summarize business approach', parent: 11, progressValue: 0, actualStart: '2000-03-18T00:00', actualEnd: '2000-03-18T09:00', connectTo: 21, connectorType: 'finish-start'},
35
{id: 16, name: 'Evaluate Potential Risks and Rewards', parent: 1, progressValue: 0, actualStart: '2000-03-16T00:00', actualEnd: '2000-03-25T09:00'},
36
{id: 17, name: 'Assess market size and stability', parent: 16, progressValue: 0, actualStart: '2000-03-16T00:00', actualEnd: '2000-03-17T09:00', connectTo: 18, connectorType: 'finish-start'},
37
{id: 18, name: 'Estimate the competition', parent: 16, progressValue: 0, actualStart: '2000-03-18T00:00', actualEnd: '2000-03-18T09:00', connectTo: 19, connectorType: 'finish-start'}
38
];
39
}