3D High Chart fancy
by Rob Sedgwick
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/highcharts-3d.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="width: 810px; height: 500px; margin: 0 auto"></div>
JavaScript
$(function () {
var chartXData = ["Jan 2015", "Feb 2015", "Mar 2015"];
var chartTitle = 614 + " feeds generated during the period January - March";
$('#container').highcharts({
credits: {
enabled: false
},
chart: {
type: 'column',
marginRight: 150,
options3d: {
enabled: true,
alpha: 15,
beta: 15,
viewDistance: 25,
depth: 40
},
},
title: {
text: chartTitle
},
xAxis: {
categories: chartXData
},
yAxis: {
min: 0,
// max: 100,
title: {
text: ''
},
labels: {
formatter: function () {
return this.value + '%';
}
},
stackLabels: {
enabled: false,
style: {
fontWeight: 'bold',
color: (Highcharts.theme && Highcharts.theme.textColor) || 'gray'
}
}
},
legend: {
align: 'right',
verticalAlign: 'middle',
floating: true,
backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
borderColor: '#CCC',
borderWidth: 1,
shadow: false,
layout: 'vertical',
x: 0,
y: 10,
itemStyle: {
fontWeight: 'normal'
}
},
tooltip: {
formatter: function () {
return '<b>' + this.x + '</b><br/>' + this.series.name + ': ' + this.y + '<br/>' +
'Total: ' + this.point.stackTotal + '(' + Highcharts.numberFormat(this.point.percentage, 0) + '%)';
}
},
plotOptions: {
column: {
depth: 40,
...