index.htm 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. @import 'https://code.highcharts.com/css/highcharts.css';
  9. #container {
  10. height: 400px;
  11. max-width: 800px;
  12. margin: 0 auto;
  13. }
  14. /* Link the series colors to axis colors */
  15. .highcharts-color-0 {
  16. fill: #7cb5ec;
  17. stroke: #7cb5ec;
  18. }
  19. .highcharts-axis.highcharts-color-0 .highcharts-axis-line {
  20. stroke: #7cb5ec;
  21. }
  22. .highcharts-axis.highcharts-color-0 text {
  23. fill: #7cb5ec;
  24. }
  25. .highcharts-color-1 {
  26. fill: #90ed7d;
  27. stroke: #90ed7d;
  28. }
  29. .highcharts-axis.highcharts-color-1 .highcharts-axis-line {
  30. stroke: #90ed7d;
  31. }
  32. .highcharts-axis.highcharts-color-1 text {
  33. fill: #90ed7d;
  34. }
  35. .highcharts-yaxis .highcharts-axis-line {
  36. stroke-width: 2px;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <script src="../../code/highcharts.js"></script>
  42. <script src="../../code/modules/exporting.js"></script>
  43. <div id="container"></div>
  44. <script type="text/javascript">
  45. Highcharts.chart('container', {
  46. chart: {
  47. type: 'column',
  48. styledMode: true
  49. },
  50. title: {
  51. text: 'Styling axes and columns'
  52. },
  53. yAxis: [{
  54. className: 'highcharts-color-0',
  55. title: {
  56. text: 'Primary axis'
  57. }
  58. }, {
  59. className: 'highcharts-color-1',
  60. opposite: true,
  61. title: {
  62. text: 'Secondary axis'
  63. }
  64. }],
  65. plotOptions: {
  66. column: {
  67. borderRadius: 5
  68. }
  69. },
  70. series: [{
  71. data: [1, 3, 2, 4]
  72. }, {
  73. data: [324, 124, 547, 221],
  74. yAxis: 1
  75. }]
  76. });
  77. </script>
  78. </body>
  79. </html>