index.htm 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  12. <script src="../../code/highcharts.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  16. <script type="text/javascript">
  17. // Build the chart
  18. Highcharts.chart('container', {
  19. chart: {
  20. plotBackgroundColor: null,
  21. plotBorderWidth: null,
  22. plotShadow: false,
  23. type: 'pie'
  24. },
  25. title: {
  26. text: 'Browser market shares in January, 2018'
  27. },
  28. tooltip: {
  29. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  30. },
  31. plotOptions: {
  32. pie: {
  33. allowPointSelect: true,
  34. cursor: 'pointer',
  35. dataLabels: {
  36. enabled: false
  37. },
  38. showInLegend: true
  39. }
  40. },
  41. series: [{
  42. name: 'Brands',
  43. colorByPoint: true,
  44. data: [{
  45. name: 'Chrome',
  46. y: 61.41,
  47. sliced: true,
  48. selected: true
  49. }, {
  50. name: 'Internet Explorer',
  51. y: 11.84
  52. }, {
  53. name: 'Firefox',
  54. y: 10.85
  55. }, {
  56. name: 'Edge',
  57. y: 4.67
  58. }, {
  59. name: 'Safari',
  60. y: 4.18
  61. }, {
  62. name: 'Other',
  63. y: 7.05
  64. }]
  65. }]
  66. });
  67. </script>
  68. </body>
  69. </html>