index.htm 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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: null,
  20. plotShadow: false,
  21. type: 'pie'
  22. },
  23. title: {
  24. text: 'Browser market shares in January, 2018'
  25. },
  26. tooltip: {
  27. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  28. },
  29. plotOptions: {
  30. pie: {
  31. allowPointSelect: true,
  32. cursor: 'pointer',
  33. dataLabels: {
  34. enabled: true,
  35. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  36. style: {
  37. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  38. }
  39. }
  40. }
  41. },
  42. series: [{
  43. name: 'Brands',
  44. colorByPoint: true,
  45. data: [{
  46. name: 'Chrome',
  47. y: 61.41,
  48. sliced: true,
  49. selected: true
  50. }, {
  51. name: 'Internet Explorer',
  52. y: 11.84
  53. }, {
  54. name: 'Firefox',
  55. y: 10.85
  56. }, {
  57. name: 'Edge',
  58. y: 4.67
  59. }, {
  60. name: 'Safari',
  61. y: 4.18
  62. }, {
  63. name: 'Sogou Explorer',
  64. y: 1.64
  65. }, {
  66. name: 'Opera',
  67. y: 1.6
  68. }, {
  69. name: 'QQ',
  70. y: 1.2
  71. }, {
  72. name: 'Other',
  73. y: 2.61
  74. }]
  75. }]
  76. });
  77. </script>
  78. </body>
  79. </html>