index.htm 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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: 'Stacked bar chart'
  18. },
  19. xAxis: {
  20. categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
  21. },
  22. yAxis: {
  23. min: 0,
  24. title: {
  25. text: 'Total fruit consumption'
  26. }
  27. },
  28. legend: {
  29. reversed: true
  30. },
  31. plotOptions: {
  32. series: {
  33. stacking: 'normal'
  34. }
  35. },
  36. series: [{
  37. name: 'John',
  38. data: [5, 3, 4, 7, 2]
  39. }, {
  40. name: 'Jane',
  41. data: [2, 2, 3, 2, 1]
  42. }, {
  43. name: 'Joe',
  44. data: [3, 4, 4, 2, 5]
  45. }]
  46. });
  47. });
  48. </script>
  49. </head>
  50. <body>
  51. <script src="http://cdn.hcharts.cn/highcharts/highcharts.js"></script>
  52. <script src="http://cdn.hcharts.cn/highcharts/modules/exporting.js"></script>
  53. <div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
  54. </body>
  55. </html>