index.htm 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/exporting.js"></script>
  13. <script src="../../code/modules/export-data.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. chart: {
  18. type: 'column'
  19. },
  20. title: {
  21. text: 'Stacked column chart'
  22. },
  23. xAxis: {
  24. categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
  25. },
  26. yAxis: {
  27. min: 0,
  28. title: {
  29. text: 'Total fruit consumption'
  30. }
  31. },
  32. tooltip: {
  33. pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b> ({point.percentage:.0f}%)<br/>',
  34. shared: true
  35. },
  36. plotOptions: {
  37. column: {
  38. stacking: 'percent'
  39. }
  40. },
  41. series: [{
  42. name: 'John',
  43. data: [5, 3, 4, 7, 2]
  44. }, {
  45. name: 'Jane',
  46. data: [2, 2, 3, 2, 1]
  47. }, {
  48. name: 'Joe',
  49. data: [3, 4, 4, 2, 5]
  50. }]
  51. });
  52. </script>
  53. </body>
  54. </html>