options = {
return {
chart: {
animation: false,
backgroundColor: "transparent",
reflow: false,
style: { fontSize: '1em' },
type: 'waterfall'
},
legend: {
itemStyle: { fontSize: '0.875em', fontWeight: 'normal' },
symbolRadius: 0
},
plotOptions: {
series: { animation: false, groupPadding: 0.2, pointPadding: 0.05 },
waterfall: { dashStyle: 'dash', stacking: 'normal' }
},
series: [
{
borderColor: '#BDBDBD',
color: '#EEEEEE',
data: data.broughtForwardHeadcounts1,
legendIndex: 0,
lineColor: 'transparent',
lineWidth: 0,
name: 'Headcount',
stack: 0
},
{
borderColor: '#66BB6A',
color: '#C8E6C9',
data: data.hires,
legendIndex: 1,
lineColor: 'transparent',
lineWidth: 0,
name: 'Hires',
stack: 0
},
{
borderColor: 'transparent',
color: 'transparent',
data: data.terminations,
lineColor: '#BDBDBD',
lineWidth: 1,
showInLegend: false,
stack: 0
},
{
borderColor: '#BDBDBD',
color: '#EEEEEE',
data: data.carryForwardHeadcounts1,
lineColor: 'transparent',
lineWidth: 0,
name: "Headcount",
//pointPadding: -0.5,
//pointPlacement: 0.15,
showInLegend: false,
stack: 0
},
{
borderColor: 'transparent',
color: 'transparent',
data: data.broughtForwardHeadcounts2,
lineColor: 'transparent',
lineWidth: 0,
showInLegend: false,
stack: 1
},
{
borderColor: '#FFA726',
color: '#FFCC7F',
data: data.terminations,
legendIndex: 2,
lineColor: 'transparent',
lineWidth: 0,
name: 'Terminations',
stack: 1
},
{
borderColor: 'transparent',
color: 'transparent',
data: data.offsets,
lineColor: 'transparent',
lineWidth: 0,
showInLegend: false,
stack: 1
},
{
borderColor: 'transparent',
color: 'transparent',
data: data.carryForwardHeadcounts2,
lineColor: 'transparent',
lineWidth: 0,
name: "Headcount",
//pointPadding: -0.5,
//pointPlacement: 0.15,
showInLegend: false,
stack: 1
},
{
color: 'transparent',
data: data.openingHeadcounts,
name: 'Opening',
showInLegend: false,
type: 'line'
},
{
color: 'transparent',
data: data.closingHeadcounts,
name: 'Closing',
showInLegend: false,
type: 'line'
},
{
color: '#2196F3',
data: data.averageHeadcounts,
legendIndex: 3,
name: 'Average Headcount',
type: 'line'
}
],
title: {
style: { fontSize: '1.125em' },
text: `Headcount Progression by Month for ${WorkforceData.sizeByMonthForCalendarYear.year}`
},
tooltip: {
formatter: function(tooltip) {
return buildTooltip(this);
},
shared: true,
useHTML: true
},
xAxis: [
{
categories: ["Open"].concat(Data.monthAbbreviations.concat(["Close"])),
crosshair: true,
labels: { style: { fontSize: '0.875em' } }
}
],
yAxis: {
labels: { format: '{value:,.0f}', style: { fontSize: '0.875em' } },
min: 1075,
title: { text: 'Headcount' }
}
};
}