Highcharts Demo
author(s): Torstein Hønsi
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<div id="CashInvestedAssetsChart" style="height: 400px"></div>
JavaScript
$(function () {
$('#CashInvestedAssetsChart').highcharts({
credits: {
enabled: true,
text: '©Powered by data from FE 2015',
style: {
color: 'black',
fontFamily: 'DINPro',
fontSize: '7.8409px',
fontWeight: 'normal'
}
},
chart: {
type: 'bar'
},
title: {
text: ''
},
xAxis: {
lineColor: 'red',
tickLength: 5,
tickColor: 'black',
lineWidth: 1,
gridLineWidth: 1,
gridLineColor:'#DFDFDE',
labels: {
style: {
color: 'black',
fontFamily: 'DINPro',
fontSize: '7.76px',
fontWeight: 'normal'
}
},
categories: [
'Stocks &<br/>Shares ISA','Investment<br/>Account',]
},
yAxis: {
tickPositioner: function () {
var positions = [],
tick = Math.floor(this.dataMin)
var totalLabel = 6;
var increment = Math.ceil((this.dataMax - this.dataMin) / totalLabel);
var previousTickPos = null;
for (tick; tick - increment <= this.dataMax; tick += increment) {
positions.push(tick);
}
return positions;
...