index.htm 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. </style>
  9. </head>
  10. <body>
  11. <script src="../../code/highcharts.js"></script>
  12. <script src="../../code/modules/series-label.js"></script>
  13. <script src="../../code/modules/exporting.js"></script>
  14. <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
  15. <script type="text/javascript">
  16. Highcharts.chart('container', {
  17. title: {
  18. text: 'Combination chart'
  19. },
  20. xAxis: {
  21. categories: ['Apples', 'Oranges', 'Pears', 'Bananas', 'Plums']
  22. },
  23. labels: {
  24. items: [{
  25. html: 'Total fruit consumption',
  26. style: {
  27. left: '50px',
  28. top: '18px',
  29. color: (Highcharts.theme && Highcharts.theme.textColor) || 'black'
  30. }
  31. }]
  32. },
  33. series: [{
  34. type: 'column',
  35. name: 'Jane',
  36. data: [3, 2, 1, 3, 4]
  37. }, {
  38. type: 'column',
  39. name: 'John',
  40. data: [2, 3, 5, 7, 6]
  41. }, {
  42. type: 'column',
  43. name: 'Joe',
  44. data: [4, 3, 3, 9, 0]
  45. }, {
  46. type: 'spline',
  47. name: 'Average',
  48. data: [3, 2.67, 3, 6.33, 3.33],
  49. marker: {
  50. lineWidth: 2,
  51. lineColor: Highcharts.getOptions().colors[3],
  52. fillColor: 'white'
  53. }
  54. }, {
  55. type: 'pie',
  56. name: 'Total consumption',
  57. data: [{
  58. name: 'Jane',
  59. y: 13,
  60. color: Highcharts.getOptions().colors[0] // Jane's color
  61. }, {
  62. name: 'John',
  63. y: 23,
  64. color: Highcharts.getOptions().colors[1] // John's color
  65. }, {
  66. name: 'Joe',
  67. y: 19,
  68. color: Highcharts.getOptions().colors[2] // Joe's color
  69. }],
  70. center: [100, 80],
  71. size: 100,
  72. showInLegend: false,
  73. dataLabels: {
  74. enabled: false
  75. }
  76. }]
  77. });
  78. </script>
  79. </body>
  80. </html>