Advertisement
Bedhoel

Untitled

Jul 27th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <body>
  2.     <div class="container">
  3.         <div class="row">
  4.             <div class="col-md-6">
  5.                 <div id="pie_chart" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  6.             </div>
  7.             <div class="col-md-6">
  8.                
  9.             </div>
  10.         </div>
  11.     </div>
  12. </body>
  13.  
  14. <script type="text/javascript">
  15. pie_chart();
  16. function pie_chart(){
  17.     Highcharts.chart('pie_chart', {
  18.     chart: {
  19.         plotBackgroundColor: null,
  20.         plotBorderWidth: null,
  21.         plotShadow: false,
  22.         type: 'pie'
  23.     },
  24.     title: {
  25.         text: 'Browser market shares in January, 2018'
  26.     },
  27.     tooltip: {
  28.         pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  29.     },
  30.     plotOptions: {
  31.         pie: {
  32.             allowPointSelect: true,
  33.             cursor: 'pointer',
  34.             dataLabels: {
  35.                 enabled: true,
  36.                 format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  37.                 style: {
  38.                     color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  39.                 }
  40.             }
  41.         }
  42.     },
  43.     series: [{
  44.         name: 'Brands',
  45.         colorByPoint: true,
  46.         data: [{
  47.             name: 'Chrome',
  48.             y: 61.41,
  49.             sliced: true,
  50.             selected: true
  51.         }, {
  52.             name: 'Internet Explorer',
  53.             y: 11.84
  54.         }, {
  55.             name: 'Firefox',
  56.             y: 10.85
  57.         }, {
  58.             name: 'Edge',
  59.             y: 4.67
  60.         }, {
  61.             name: 'Safari',
  62.             y: 4.18
  63.         }, {
  64.             name: 'Sogou Explorer',
  65.             y: 1.64
  66.         }, {
  67.             name: 'Opera',
  68.             y: 1.6
  69.         }, {
  70.             name: 'QQ',
  71.             y: 1.2
  72.         }, {
  73.             name: 'Other',
  74.             y: 2.61
  75.         }]
  76.     }]
  77.     });
  78. }  
  79.  
  80. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement