index.htm 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Highcharts Example</title>
  7. <style type="text/css">
  8. </style>
  9. </head>
  10. <body>
  11. <script src="../../code/highcharts.js"></script>
  12. <script src="../../code/modules/exporting.js"></script>
  13. <script src="../../code/modules/export-data.js"></script>
  14. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  15. <script type="text/javascript">
  16. Highcharts.chart('container', {
  17. chart: {
  18. plotBackgroundColor: null,
  19. plotBorderWidth: 0,
  20. plotShadow: false
  21. },
  22. title: {
  23. text: 'Browser<br>shares<br>2017',
  24. align: 'center',
  25. verticalAlign: 'middle',
  26. y: 40
  27. },
  28. tooltip: {
  29. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  30. },
  31. plotOptions: {
  32. pie: {
  33. dataLabels: {
  34. enabled: true,
  35. distance: -50,
  36. style: {
  37. fontWeight: 'bold',
  38. color: 'white'
  39. }
  40. },
  41. startAngle: -90,
  42. endAngle: 90,
  43. center: ['50%', '75%'],
  44. size: '110%'
  45. }
  46. },
  47. series: [{
  48. type: 'pie',
  49. name: 'Browser share',
  50. innerSize: '50%',
  51. data: [
  52. ['Chrome', 58.9],
  53. ['Firefox', 13.29],
  54. ['Internet Explorer', 13],
  55. ['Edge', 3.78],
  56. ['Safari', 3.42],
  57. {
  58. name: 'Other',
  59. y: 7.61,
  60. dataLabels: {
  61. enabled: false
  62. }
  63. }
  64. ]
  65. }]
  66. });
  67. </script>
  68. </body>
  69. </html>