You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
1.7 KiB

9 years ago
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <title>Highcharts Example</title>
  6. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
  7. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. chart: {
  14. type: 'pie',
  15. options3d: {
  16. enabled: true,
  17. alpha: 45,
  18. beta: 0
  19. }
  20. },
  21. title: {
  22. text: 'Browser market shares at a specific website, 2014'
  23. },
  24. tooltip: {
  25. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  26. },
  27. plotOptions: {
  28. pie: {
  29. allowPointSelect: true,
  30. cursor: 'pointer',
  31. depth: 35,
  32. dataLabels: {
  33. enabled: true,
  34. format: '{point.name}'
  35. }
  36. }
  37. },
  38. series: [{
  39. type: 'pie',
  40. name: 'Browser share',
  41. data: [
  42. ['Firefox', 45.0],
  43. ['IE', 26.8],
  44. {
  45. name: 'Chrome',
  46. y: 12.8,
  47. sliced: true,
  48. selected: true
  49. },
  50. ['Safari', 8.5],
  51. ['Opera', 6.2],
  52. ['Others', 0.7]
  53. ]
  54. }]
  55. });
  56. });
  57. </script>
  58. </head>
  59. <body>
  60. <script src="../../js/highcharts.js"></script>
  61. <script src="../../js/highcharts-3d.js"></script>
  62. <script src="../../js/modules/exporting.js"></script>
  63. <div id="container" style="height: 400px"></div>
  64. </body>
  65. </html>