index.htm 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Highcharts Example</title>
  7. <style type="text/css">
  8. #container {
  9. height: 400px;
  10. min-width: 310px;
  11. max-width: 800px;
  12. margin: 0 auto;
  13. }
  14. </style>
  15. </head>
  16. <body>
  17. <script src="../../code/highcharts.js"></script>
  18. <script src="../../code/highcharts-3d.js"></script>
  19. <script src="../../code/modules/exporting.js"></script>
  20. <script src="../../code/modules/export-data.js"></script>
  21. <div id="container" style="height: 400px"></div>
  22. <script type="text/javascript">
  23. Highcharts.chart('container', {
  24. chart: {
  25. type: 'column',
  26. options3d: {
  27. enabled: true,
  28. alpha: 15,
  29. beta: 15,
  30. viewDistance: 25,
  31. depth: 40
  32. }
  33. },
  34. title: {
  35. text: 'Total fruit consumption, grouped by gender'
  36. },
  37. xAxis: {
  38. categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas'],
  39. labels: {
  40. skew3d: true,
  41. style: {
  42. fontSize: '16px'
  43. }
  44. }
  45. },
  46. yAxis: {
  47. allowDecimals: false,
  48. min: 0,
  49. title: {
  50. text: 'Number of fruits',
  51. skew3d: true
  52. }
  53. },
  54. tooltip: {
  55. headerFormat: '<b>{point.key}</b><br>',
  56. pointFormat: '<span style="color:{series.color}">\u25CF</span> {series.name}: {point.y} / {point.stackTotal}'
  57. },
  58. plotOptions: {
  59. column: {
  60. stacking: 'normal',
  61. depth: 40
  62. }
  63. },
  64. series: [{
  65. name: 'John',
  66. data: [5, 3, 4, 7, 2],
  67. stack: 'male'
  68. }, {
  69. name: 'Joe',
  70. data: [3, 4, 4, 2, 5],
  71. stack: 'male'
  72. }, {
  73. name: 'Jane',
  74. data: [2, 5, 6, 2, 1],
  75. stack: 'female'
  76. }, {
  77. name: 'Janet',
  78. data: [3, 0, 4, 4, 3],
  79. stack: 'female'
  80. }]
  81. });
  82. </script>
  83. </body>
  84. </html>