Skip to content

Instantly share code, notes, and snippets.

@karkranikhil
Created August 6, 2015 17:45
Show Gist options
  • Select an option

  • Save karkranikhil/c59293145820c1f08f31 to your computer and use it in GitHub Desktop.

Select an option

Save karkranikhil/c59293145820c1f08f31 to your computer and use it in GitHub Desktop.
<div id="container" style="min-width:310px;height:250px;max-width:600px;margin:0 auto;border:1px solid black;"></div>
$(function () {
Highcharts.setOptions({
colors: ['#0000ff','#00ff00','#ff0000']
});
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: 0,
plotShadow: false
},
title: {
text: 'Browser',
align: 'center',
y:10,
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
dataLabels: {
enabled: false,
distance: -10,
style: {
fontWeight: 'bold',
color: 'white',
textShadow: '0px 1px 2px black'
}
},
startAngle: 0,
endAngle: 360,
center: ['50%', '50%']
}
},
series: [{
type: 'pie',
name: 'Product',
innerSize: '70%',
data: [
['IM&T', 50],
['Credit', 25],
['Balance', 25],
{
name: 'Proprietary or Undetectable',
y: 0.2,
dataLabels: {
enabled: false
}
}
]
}]
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment