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.

76 lines
2.0 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. plotBackgroundColor: null,
  15. plotBorderWidth: 0,
  16. plotShadow: false
  17. },
  18. title: {
  19. text: 'Browser<br>shares<br>2015',
  20. align: 'center',
  21. verticalAlign: 'middle',
  22. y: 40
  23. },
  24. tooltip: {
  25. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  26. },
  27. plotOptions: {
  28. pie: {
  29. dataLabels: {
  30. enabled: true,
  31. distance: -50,
  32. style: {
  33. fontWeight: 'bold',
  34. color: 'white',
  35. textShadow: '0px 1px 2px black'
  36. }
  37. },
  38. startAngle: -90,
  39. endAngle: 90,
  40. center: ['50%', '75%']
  41. }
  42. },
  43. series: [{
  44. type: 'pie',
  45. name: 'Browser share',
  46. innerSize: '50%',
  47. data: [
  48. ['Firefox', 10.38],
  49. ['IE', 56.33],
  50. ['Chrome', 24.03],
  51. ['Safari', 4.77],
  52. ['Opera', 0.91],
  53. {
  54. name: 'Proprietary or Undetectable',
  55. y: 0.2,
  56. dataLabels: {
  57. enabled: false
  58. }
  59. }
  60. ]
  61. }]
  62. });
  63. });
  64. </script>
  65. </head>
  66. <body>
  67. <script src="../../js/highcharts.js"></script>
  68. <script src="../../js/modules/exporting.js"></script>
  69. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  70. </body>
  71. </html>