index.htm 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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/highcharts-3d.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <script src="../../code/modules/export-data.js"></script>
  15. <div id="container" style="height: 400px"></div>
  16. <script type="text/javascript">
  17. Highcharts.chart('container', {
  18. chart: {
  19. type: 'pie',
  20. options3d: {
  21. enabled: true,
  22. alpha: 45,
  23. beta: 0
  24. }
  25. },
  26. title: {
  27. text: 'Browser market shares at a specific website, 2014'
  28. },
  29. tooltip: {
  30. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  31. },
  32. plotOptions: {
  33. pie: {
  34. allowPointSelect: true,
  35. cursor: 'pointer',
  36. depth: 35,
  37. dataLabels: {
  38. enabled: true,
  39. format: '{point.name}'
  40. }
  41. }
  42. },
  43. series: [{
  44. type: 'pie',
  45. name: 'Browser share',
  46. data: [
  47. ['Firefox', 45.0],
  48. ['IE', 26.8],
  49. {
  50. name: 'Chrome',
  51. y: 12.8,
  52. sliced: true,
  53. selected: true
  54. },
  55. ['Safari', 8.5],
  56. ['Opera', 6.2],
  57. ['Others', 0.7]
  58. ]
  59. }]
  60. });
  61. </script>
  62. </body>
  63. </html>