I am using DHTMLX GANTT chart, I have to create one more row inside second column(Chart section) on top above date and also divide that row into 7 columns by matching with date. currently I have created custom div inside independent row.I tried using adding row inside the second column object but it was not working. Here is the code below
html
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' type='text/css' href='http://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.css'>
<script src='http://cdn.dhtmlx.com/gantt/edge/dhtmlxgantt.js'></script>
<style>
.gantt_custom_button {
background-color: rgb(206, 206, 206);
position: absolute;
right: -10px;
top: 5px;
width: 20px;
height: 26px;
border-radius: 0;
}
</style>
</head>
<div id='gantt_here' style='width:100%; height:500px;'></div>
<body>
<script>
var task1 = {
'data': [{
'id': 1,
'text': 'Project #1',
'start_date': '01-04-2019',
'duration': 2,
'order': 10,
'progress': 0.4,
'open': true
},
{
'id': 2,
'text': 'Task #1',
'start_date': '02-04-2019',
'duration': 1,
'order': 10,
'progress': 0.6,
'parent': 1
},
{
'id': 3,
'text': 'Task #2',
'start_date': '03-04-2019',
'duration': 2,
'order': 20,
'progress': 0.6,
'parent': 1
},
{
'id': 4,
'text': 'Task #3',
'start_date': '02-04-2019',
'duration': 1,
'order': 10,
'progress': 0.6,
'parent': 1
}
],
'links': [{
'id': 1,
'source': 1,
'target': 2,
'type': '1'
},
{
'id': 2,
'source': 2,
'target': 3,
'type': '0'
},
{
'id': 3,
'source': 3,
'target': 4,
'type': '0'
},
{
'id': 4,
'source': 2,
'target': 5,
'type': '2'
}
]
};
gantt.config.layout = {
css: 'gantt_container',
cols: [{
rows: [{
height: 80
},
{
view: 'grid',
scrollX: 'gridScroll',
scrollable: true,
scrollY: 'scrollVer'
},
{
view: 'scrollbar',
id: 'gridScroll',
group: 'horizontal'
}
]
},
{
resizer: true,
width: 1
},
{
rows: [{
html: '<div class=\'custom-content\'>custom content 1</div>',
css: 'custom-content'
},
{
view: 'timeline',
scrollX: 'scrollHor',
scrollY: 'scrollVer'
}
// { view: 'scrollbar', id: 'scrollHor', group: 'horizontal' },
]
},
{
view: 'scrollbar',
id: 'scrollVer'
},
{
resizer: false,
width: 1
}
]
};
gantt.init('gantt_here');
gantt.parse(task1);
</script>
</html>