c4f980ddf7329bccf54d9163c5eaf61432beb836.svn-base 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. <style type="text/css">
  8. ${demo.css}
  9. </style>
  10. <script type="text/javascript">
  11. $(function () {
  12. $('#container').highcharts({
  13. chart: {
  14. type: 'bar'
  15. },
  16. title: {
  17. text: 'Historic World Population by Region'
  18. },
  19. subtitle: {
  20. text: 'Source: <a href="https://en.wikipedia.org/wiki/World_population">Wikipedia.org</a>'
  21. },
  22. xAxis: {
  23. categories: ['Africa', 'America', 'Asia', 'Europe', 'Oceania'],
  24. title: {
  25. text: null
  26. }
  27. },
  28. yAxis: {
  29. min: 0,
  30. title: {
  31. text: 'Population (millions)',
  32. align: 'high'
  33. },
  34. labels: {
  35. overflow: 'justify'
  36. }
  37. },
  38. tooltip: {
  39. valueSuffix: ' millions'
  40. },
  41. plotOptions: {
  42. bar: {
  43. dataLabels: {
  44. enabled: true
  45. }
  46. }
  47. },
  48. legend: {
  49. layout: 'vertical',
  50. align: 'right',
  51. verticalAlign: 'top',
  52. x: -40,
  53. y: 80,
  54. floating: true,
  55. borderWidth: 1,
  56. backgroundColor: ((Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'),
  57. shadow: true
  58. },
  59. credits: {
  60. enabled: false
  61. },
  62. series: [{
  63. name: 'Year 1800',
  64. data: [107, 31, 635, 203, 2]
  65. }, {
  66. name: 'Year 1900',
  67. data: [133, 156, 947, 408, 6]
  68. }, {
  69. name: 'Year 2012',
  70. data: [1052, 954, 4250, 740, 38]
  71. }]
  72. });
  73. });
  74. </script>
  75. </head>
  76. <body>
  77. <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  78. <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
  79. <div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
  80. </body>
  81. </html>