市长热线演示版

index.htm 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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://cdn.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
  7. <script type="text/javascript">
  8. $(function () {
  9. $('#container').highcharts({
  10. chart: {
  11. plotBackgroundColor: null,
  12. plotBorderWidth: null,
  13. plotShadow: false
  14. },
  15. title: {
  16. text: 'Browser market shares at a specific website, 2014'
  17. },
  18. tooltip: {
  19. pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
  20. },
  21. plotOptions: {
  22. pie: {
  23. allowPointSelect: true,
  24. cursor: 'pointer',
  25. dataLabels: {
  26. enabled: true,
  27. format: '<b>{point.name}</b>: {point.percentage:.1f} %',
  28. style: {
  29. color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
  30. }
  31. }
  32. }
  33. },
  34. series: [{
  35. type: 'pie',
  36. name: 'Browser share',
  37. data: [
  38. ['Firefox', 45.0],
  39. ['IE', 26.8],
  40. {
  41. name: 'Chrome',
  42. y: 12.8,
  43. sliced: true,
  44. selected: true
  45. },
  46. ['Safari', 8.5],
  47. ['Opera', 6.2],
  48. ['Others', 0.7]
  49. ]
  50. }]
  51. });
  52. });
  53. </script>
  54. </head>
  55. <body>
  56. <script src="../../js/highcharts.js"></script>
  57. <script src="../../js/modules/exporting.js"></script>
  58. <div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
  59. </body>
  60. </html>