I need a stacked column chart to be created to display the data captured for a requirement as below.
Show the hours worked by an employee against different projects (Project1,Project2, Project3).
I tried to use Highcharts. When I tried to enable the Scrollable feature for the chart, as there can more number of employees, the labels (employee names) are not getting displayed in the X-axis.
Also, the scrolling seems to be incorrect.
Can anyone help me on making this chart scrollable and also show the employee names as labels on X-Axis.
I have shared the chart I have created so far in ,
http://jsfiddle.net/sri421/Yyq5N/1/
The code is also as below, $(function() { $('#container').highcharts('StockChart', {
chart: {
type: 'column',
inverted:true
},
title: {
text: 'Total Hours worked Vs Different Projects'
},
xAxis: {
categories: ['user1', 'user2', 'user3', 'user4', 'user5','user6', 'user7', 'user8', 'user9', 'user10','user11', 'user12', 'user13', 'user14', 'user15','user16', 'user17', 'user18', 'user19', 'user20'],
labels: {
rotation: -45,
align: 'right',
style: {
fontSize: '13px',
fontFamily: 'Verdana, sans-serif'
}
}
},
yAxis: {
min: 0,
title: {
text: 'Total Hours Worked'
},
stackLabels: {
enabled: true,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'red'
}
}
},
plotOptions: {
column: {
stacking: 'normal'
}
},
scrollbar: {
enabled:true
},
rangeSelector: {
enabled: false
},
series: [{
name: 'Project1',
data: [5, 3, 4, 7, 2,5, 3, 4, 7, 2 ,5, 3, 4, 7, 2,5, 3, 4, 7, 2]
}, {
name: 'Project2',
data: [2, 2, 3, 2, 1,5, 3, 4, 7, 2, 5, 3, 4, 7, 2,5, 3, 4, 7, 2]
}, {
name: 'Projecct3',
data: [3, 4, 4, 2, 5,5, 3, 4, 7, 2, 5, 3, 4, 7, 2,5, 3, 4, 7, 2]
}]
});
}); Thanks, Sri