Code: Select all
Highcharts.ganttChart('container', {
title: {
text: 'Go-Live Downtime'
},
series: [{
name: 'gantt Chart example',
data: exampleData.map(function (outage, i) {
return {
id: 'db-' +i,
name: outage.DATABASE,
start:$scope.timeInUtc(outage.STARTTIME),
end: $scope.timeInUtc(outage.ENDTIME),
durationDb: outage.DURATIONDB,
durationApp:outage.DURATIONAPP,
y: i,
color: outage.TYPE == 'DB'?'#BF0B23':'#FFA500'
}
})
}],
yAxis: {
type: 'category',
grid: {
enabled: true,
borderColor: 'rgba(0,0,0,0.3)',
borderWidth: 1,
columns: [{
title: {
text: 'Database',
y: -15
},
labels: {
format: '{point.name}'
}
}, {
title: {
text: 'Duration<br>(DB)(hrs)',
y: -15
},
labels: {
useHTML:true,
format: '<p> {point.durationDb} </p>'
}
}, {
title: {
text: 'Duration<br>(APP)(hrs)',
y: -15
},
labels: {
useHTML:true,
format: '<p> {point.durationApp} </p>'
}
}]
}
}
});