Guest User

Untitled

a guest
Jan 21st, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.  
  3. var chart;
  4. $(document).ready(function() {
  5.     chart = new Highcharts.Chart({
  6.         chart: {
  7.             renderTo: 'gender',
  8.             plotBackgroundColor: null,
  9.             plotBorderWidth: null,
  10.             plotShadow: false
  11.         },
  12.         title: {
  13.             text: 'Points Generated by Gender'
  14.         },
  15.         tooltip: {
  16.             pointFormat: '{point.percentage}%',
  17.             percentageDecimals: 1
  18.         },
  19.         plotOptions: {
  20.             pie: {
  21.                 allowPointSelect: true,
  22.                 cursor: 'pointer',
  23.                 dataLabels: {
  24.                     enabled: true,
  25.                     color: '#000000',
  26.                     connectorColor: '#000000',
  27.                     formatter: function() {
  28.                         return '<b>'+ this.point.name +'</b>: '+ this.percentage +' %';
  29.                     }
  30.                 }
  31.             }
  32.         },
  33.         series: [{
  34.             type: 'pie',
  35.             name: 'Gender',
  36.             data: [
  37.                 ['Male', 55],
  38.                 ['Female', 45]
  39.             ]
  40.         }]
  41.     });
  42. });    ​
  43. </script>
Add Comment
Please, Sign In to add comment