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.

58 lines
1.4 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. 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="../../js/highcharts.js"></script>
  52. <script src="../../js/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>