Gay Marriage opinions
by Adam Nekola
HTML
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="width: 300px; height: 500px; margin: 0 auto; border:1px solid #ccc;"></div>
JavaScript
$(function () {
var chart;
$(document).ready(function () {
// Radialize the colors
Highcharts.getOptions().colors = Highcharts.map(Highcharts.getOptions().colors, function(color) {
return {
radialGradient: { cx: 0.5, cy: 0.6, r: 0.8 },
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
]
};
});
// Build the chart
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: ''
},
exporting: {
enabled: false
},
credits: {
enabled: false
},
tooltip: {
formatter: function() {
return this.point.name + '<br/><b>'+ this.y +'%</b>';
},
// pointFormat: '<b>{point.percentage}%</b>',
percentageDecimals: 1,
style: {
fontSize: '12px',
padding: '5px'
}
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
size: '100%',
dataLabels: {
enabled: false
},
showInLegend: true,
point: {
events: {
legendItemClick: function () {
this.select();
chart.tooltip.refresh(this);
return false;
}
}
}
}
},
legend: {
layout:...