HighCharts LN PS
by Joshua Salwen
HTML
<script src="http://highcharts.com/js/testing.js"></script>
<div style="height:270px;width:270px;border:1px solid #000;">
<div id="container" style="height:270px;width:270px;"></div>
</div>
JavaScript
var chart = new Highcharts.Chart({
credits: {
enabled: false
},
legend: {
align: 'right',
verticalAlign: 'top',
x: 0,
y: 92,
layout: 'vertical',
borderColor: null,
labelFormatter: function() {
return this.name.length > 12 ? this.name.substring(0, 10) + '...' : this.name;
},
width: 85,
reversed: true
},
chart: {
renderTo: 'container',
plotBackgroundColor: '#000',
plotShadow: true,
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
reflow: false,
events: {
click: function(event) {
alert ('click');
},
selection: function(event) {
alert ('selection');
}
}
},
title: {
text: 'By Hiring Party'
},
tooltip: {
formatter: function() {
return '<b>' + this.point.name + ': ' + Highcharts.numberFormat(this.percentage,1) + '%</b><br/>(' + this.y + ')';
}
},
plotOptions: {
pie: {
borderWidth: 0,
size: 92,
enableMouseTracking: false, // for overview and at-a-glance
allowPointSelect: false,
cursor: 'pointer',
dataLabels: {
enabled: false
},
showInLegend: true
}
},
series: [{
type: 'pie',
name: 'Hiring Party Legend',
showInLegend: true,
data: [
{
name: 'Torts',
color: '#006699',
y: 81,
sliced: false,
selected: false,
events: {
...