Highcharts.chart('container1', {
chart: {
type: 'column'
},
credits: {
enabled: false
},
legend: {
align: 'right',
verticalAlign: 'top',
layout: 'vertical',
x: 0,
y: 100
},
title: {
text: 'Cash Flow Analysis and Breakdown',
align: 'left',
x: 0,
style: {
color: '#000000',
fontWeight: 'normal',
textTransform : 'Uppercase',
fontSize : '14px',
}
},
xAxis: {
categories: ['Year 0', 'Year 1', 'Year 2', 'Year 3', 'Year 4', 'Year 5'],
lineColor: '#000000',
lineWidth: 2
},
yAxis: {
min: 0,
tickInterval: 50,
title: {
text: ''
},
gridLineWidth : 0,
lineColor: '#cccccc',
lineWidth: 1
},
tooltip: {
pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
shared: true
},
plotOptions: {
column: {
stacking: 'normal'
},
bar:{
groupPadding:0.1,
pointWidth:20,
},
series:{
pointWidth: 40
}
},
series: [{
name: 'Benifit(One time)',
data: [0,50, 60, 80, 50, 60],
color: '#005998'
},{
name: 'Benifit(Recurring)',
data: [0,150, 150, 180, 120, 140],
color: '#0FAAFF'
}, {
type: 'line',
name: 'Cost',
data: [35, 15, 25, 14, 10, 7],
color: '#E35500',
marker: {
lineWidth: 2,
lineColor: '#E35500',
fillColor: '#E35500'
}
},{
type: 'line',
name: 'Cash Flow',
data: [-50, 180, 170, 220, 160, 190],
color: '#FFC000',
marker: {
lineWidth: 2,
lineColor: '#FFC000',
fillColor: '#FFC000'
}
}
]
});
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container1"></div>
See Question&Answers more detail:
os