Last active
February 5, 2018 09:41
-
-
Save samarthagarwal/b032f2d4379aacb7bdb3d59b873675c9 to your computer and use it in GitHub Desktop.
Code for Pie Chart in HighCharts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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