Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html><head>
- <title>PieChart</title>
- <meta charset= "utf-8" />
- <script src="http://sertec-dev.sig.univ-nantes.prive/js/jquery-1.9.1.js></script>
- <script src="http://sertec-dev.sig.univ-nantes.prive/js/highcharts.js"></script>
- <script src="http://sertec-dev.sig.univ-nantes.prive/js/modules/exporting.js"></script>
- <script>
- $(document).ready(function(){
- $(function () {
- $('#container').highcharts({
- chart: {
- plotBackgroundColor: null,
- plotBorderWidth: null,
- plotShadow: false
- },
- title: {
- text: 'Browser market shares at a specific website, 2010'
- },
- tooltip: {
- pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
- },
- plotOptions: {
- pie: {
- allowPointSelect: true,
- cursor: 'pointer',
- dataLabels: {
- enabled: true,
- color: '#000000',
- connectorColor: '#000000',
- format: '<b>{point.name}</b>: {point.percentage:.1f} %'
- }
- }
- },
- series: [{
- type: 'pie',
- name: 'Browser share',
- data: [
- ['Firefox', 45.0],
- ['IE', 26.8],
- {
- name: 'Chrome',
- y: 12.8,
- sliced: true,
- selected: true
- },
- ['Safari', 8.5],
- ['Opera', 6.2],
- ['Others', 0.7]
- ]
- }]
- });
- });
- });
- </script>
- </head><body>
- <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment