Guest User

Untitled

a guest
Jun 20th, 2013
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 1.78 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html><head>
  3.     <title>PieChart</title>
  4.     <meta charset= "utf-8" />
  5. <script src="http://sertec-dev.sig.univ-nantes.prive/js/jquery-1.9.1.js></script>
  6. <script src="http://sertec-dev.sig.univ-nantes.prive/js/highcharts.js"></script>
  7. <script src="http://sertec-dev.sig.univ-nantes.prive/js/modules/exporting.js"></script>
  8.  
  9.  
  10. <script>
  11. $(document).ready(function(){
  12. $(function () {
  13.     $('#container').highcharts({
  14.         chart: {
  15.             plotBackgroundColor: null,
  16.             plotBorderWidth: null,
  17.             plotShadow: false
  18.         },
  19.         title: {
  20.             text: 'Browser market shares at a specific website, 2010'
  21.         },
  22.         tooltip: {
  23.             pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  24.         },
  25.         plotOptions: {
  26.             pie: {
  27.                 allowPointSelect: true,
  28.                 cursor: 'pointer',
  29.                 dataLabels: {
  30.                     enabled: true,
  31.                     color: '#000000',
  32.                     connectorColor: '#000000',
  33.                     format: '<b>{point.name}</b>: {point.percentage:.1f} %'
  34.                 }
  35.             }
  36.         },
  37.         series: [{
  38.             type: 'pie',
  39.             name: 'Browser share',
  40.             data: [
  41.                 ['Firefox',   45.0],
  42.                 ['IE',       26.8],
  43.                 {
  44.                     name: 'Chrome',
  45.                     y: 12.8,
  46.                     sliced: true,
  47.                     selected: true
  48.                 },
  49.                 ['Safari',    8.5],
  50.                 ['Opera',     6.2],
  51.                 ['Others',   0.7]
  52.             ]
  53.         }]
  54.     });
  55. });
  56. });
  57.    
  58. </script>
  59.  
  60. </head><body>
  61. <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto"></div> 
  62.  
  63. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment