index.htm 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. <script type="text/javascript">
  8. $(function () {
  9. $('#container').highcharts({
  10. chart: {
  11. plotBackgroundColor: null,
  12. plotBorderWidth: 0,
  13. plotShadow: false
  14. },
  15. title: {
  16. text: 'Browser<br>shares',
  17. align: 'center',
  18. verticalAlign: 'middle',
  19. y: 50
  20. },
  21. tooltip: {
  22. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  23. },
  24. plotOptions: {
  25. pie: {
  26. dataLabels: {
  27. enabled: true,
  28. distance: -50,
  29. style: {
  30. fontWeight: 'bold',
  31. color: 'white',
  32. textShadow: '0px 1px 2px black'
  33. }
  34. },
  35. startAngle: -90,
  36. endAngle: 90,
  37. center: ['50%', '75%']
  38. }
  39. },
  40. series: [{
  41. type: 'pie',
  42. name: 'Browser share',
  43. innerSize: '50%',
  44. data: [
  45. ['Firefox', 45.0],
  46. ['IE', 26.8],
  47. ['Chrome', 12.8],
  48. ['Safari', 8.5],
  49. ['Opera', 6.2],
  50. ['Others', 0.7]
  51. ]
  52. }]
  53. });
  54. });
  55. </script>
  56. </head>
  57. <body>
  58. <script src="../../js/highcharts.js"></script>
  59. <script src="../../js/modules/exporting.js"></script>
  60. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  61. </body>
  62. </html>