Skip to content

Instantly share code, notes, and snippets.

@samarthagarwal
Last active February 5, 2018 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samarthagarwal/b032f2d4379aacb7bdb3d59b873675c9 to your computer and use it in GitHub Desktop.
Save samarthagarwal/b032f2d4379aacb7bdb3d59b873675c9 to your computer and use it in GitHub Desktop.
Code for Pie Chart in HighCharts
Highcharts.chart('container', {
chart: {
type: 'pie'
},
title: {
text: 'Browser market shares January, 2017 to Decmber, 2017'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
series: [{
name: 'Brands',
colorByPoint: true,
data: [{
name: 'Chrome',
y: 56.33
}, {
name: 'Edge',
y: 24.03,
sliced: true,
selected: true
}, {
name: 'Firefox',
y: 10.38
}, {
name: 'Safari',
y: 4.77
}, {
name: 'Opera',
y: 0.91
}, {
name: 'Other',
y: 0.2
}]
}]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment