You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
3.8 KiB
HTML
1 line
3.8 KiB
HTML
<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<title>抽水蓄能电站智能化状态监测系统</title>
|
|
|
|
<style type="text/css">
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<script src="https://img.hcharts.cn/jquery/jquery-1.8.3.min.js"></script>
|
|
|
|
<script src="__IMG__/cssjs/js/highcharts.js"></script>
|
|
|
|
<script src="__IMG__/cssjs/js/exporting.js"></script>
|
|
|
|
<script src="__IMG__/cssjs/js/highcharts-zh_CN.js"></script>
|
|
|
|
|
|
|
|
<div id="container" style="height: 500px"></div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
var alldata1=[];
|
|
|
|
var alldata2=[];
|
|
|
|
$.getJSON('http://www.tp5.com/index/zchart/getjson', function (data) {
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
var ydata1=data[i].y;
|
|
|
|
var ydata2=data[i].ch4;
|
|
|
|
alldata1.push([ydata1]);
|
|
|
|
alldata2.push([ydata2]);
|
|
|
|
}
|
|
|
|
// alert(alldata1);
|
|
|
|
$('#container').highcharts({
|
|
|
|
chart: {
|
|
|
|
type: 'column'
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
text: '月平均降雨量(mm)'
|
|
|
|
},
|
|
|
|
subtitle: {
|
|
|
|
text: '数据来源: WorldClimate.com'
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
categories: [
|
|
|
|
'一月',
|
|
|
|
'二月',
|
|
|
|
'三月',
|
|
|
|
'四月',
|
|
|
|
'五月',
|
|
|
|
'六月',
|
|
|
|
'七月',
|
|
|
|
'八月',
|
|
|
|
'九月',
|
|
|
|
'十月',
|
|
|
|
'十一月',
|
|
|
|
'十二月'
|
|
|
|
],
|
|
|
|
crosshair: true
|
|
|
|
},
|
|
|
|
yAxis: {
|
|
|
|
min: 0,
|
|
|
|
title: {
|
|
|
|
text: '降雨量 (mm)'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
tooltip: {
|
|
|
|
headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
|
|
|
|
pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
|
|
|
|
'<td style="padding:0"><b>{point.y:.1f} mm</b></td></tr>',
|
|
|
|
footerFormat: '</table>',
|
|
|
|
shared: true,
|
|
|
|
useHTML: true
|
|
|
|
},
|
|
|
|
plotOptions: {
|
|
|
|
column: {
|
|
|
|
borderWidth: 0
|
|
|
|
}
|
|
|
|
},
|
|
|
|
series: [{
|
|
|
|
name: '东京',
|
|
|
|
data: alldata1
|
|
|
|
}, {
|
|
|
|
name: '纽约',
|
|
|
|
data: alldata2
|
|
|
|
}, {
|
|
|
|
name: '伦敦',
|
|
|
|
data: [48.9, 38.8, 39.3, 41.4, 47.0, 48.3, 59.0, 59.6, 52.4, 65.2, 59.3, 51.2]
|
|
|
|
}, {
|
|
|
|
name: '柏林',
|
|
|
|
data: [42.4, 33.2, 34.5, 39.7, 52.6, 75.5, 57.4, 60.4, 47.6, 39.1, 46.8, 51.1]
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|