| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- <!doctype html>
- <html lang="en">
- <head>
-
- <script type="text/javascript" src="../ThirdParty/js/jquery-1.8.3.min.js"></script>
-
- <script type="text/javascript" src="../ThirdParty/js/highcharts.js"></script>
-
- <script type="text/javascript" src="../ThirdParty/js/modules/exporting.js"></script>
-
- <script>
- $(function() {
- $('#container').highcharts({
- chart: {
- zoomType: 'xy'
- },
- title: {
- text: '月平均温度和降雨量'
- },
- subtitle: {
- text: document.ontouchstart === undefined ?
- '框选放大' :
- '手势放大'
- },
- xAxis: [{
- categories: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月']
- }],
- yAxis: [{ // Primary yAxis
- labels: {
- format: '{value}°C',
- style: {
- color: '#89A54E'
- }
- },
- title: {
- text: '温度',
- style: {
- color: '#89A54E'
- }
- }
- }, { // Secondary yAxis
- title: {
- text: '降雨量',
- style: {
- color: '#4572A7'
- }
- },
- labels: {
- format: '{value} mm',
- style: {
- color: '#4572A7'
- }
- },
- opposite: true
- }],
- tooltip: {
- shared: true
- },
- legend: {
- layout: 'vertical',
- align: 'left',
- x: 120,
- verticalAlign: 'top',
- y: 100,
- floating: true,
- backgroundColor: '#FFFFFF'
- },
- series: [{
- name: '降雨量',
- type: 'column',
- yAxis: 1,
- data: [49.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
- tooltip: {
- valueSuffix: ' mm'
- }
-
- }, {
- name: '温度',
- type: 'spline',
- data: [7.0, 6.9, 9.5, 14.5, 18.2, 21.5, 25.2, 26.5, 23.3, 18.3, 13.9, 9.6],
- tooltip: {
- valueSuffix: '°C'
- }
- }]
- });
- });
- </script>
-
- </head>
- <body>
- <div id="container" style="min-width: 700px; height: 400px">
- </div>
- </body>
- </html>
|