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 stage = anychart.graphics.create('container');
3
4
var treeData = anychart.data.tree([
5
{id: 1, name: 'Phase 1 - Strategic Plan'},
6
{id: 2, name: 'Self-Assessment'},
7
{id: 3, name: '14%', parent: 1},
8
{id: 4, name: '25%', parent: 2},
9
{id: 5, name: 'Define business vision'},
10
{id: 6, name: 'Identify available skills'},
11
{id: 7, name: 'Decide whether to proceed'},
12
{id: 8, name: 'Define the Opportunity'},
13
{id: 9, name: 'Research the market and competition'},
14
{id: 10, name: 'Interview owners of similar businesses'},
15
{id: 11, name: 'Identify needed resources'},
16
{id: 12, name: 'Identify operating cost elements'}
17
], 'as-table');
18
19
var dataGrid = anychart.standalones.dataGrid();
20
dataGrid.data(treeData);
21
dataGrid.headerHeight(25);
22
23
// Get vertical scroll bar settings.
24
var scrollBar = dataGrid.verticalScrollBar();
25
26
scrollBar.sliderFill('#F44336');
27
28
var getColumn = dataGrid.column(0);
29
getColumn.width(60);
30
31
dataGrid.bounds(0, 0, '16%', '30%');
32
dataGrid.container(stage);
33
dataGrid.draw();
34
});