grgw_old_java/heatsupply2/WebContent/webpage/ccqnsoft/statistics/weather/showPage.jsp

41 lines
1.2 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
<title>天气统计</title>
<!-- <meta name="decorator" content="default"/> -->
<%@ include file="/webpage/include/echarts2.jsp"%>
<script type="text/javascript">
$(function(){
var myChart = echarts.init(document.getElementById('myChart'));
var option = ${empty option?'{}':option};
//更改标题字体大小
option.title.textStyle = {fontSize:"12"};
//补充一个格式化,
option.tooltip.formatter = function(params, ticket, callback){
var showHtm="";
//console.log(params)
for(var i=0;i<params.length;i++){
//x轴名称
var name = params[i].name;//axisValueLabel
//折线名称
var text = params[i].seriesName;
//值
var value = params[i].value;
//色块标识
var marker = params[i].marker
showHtm += marker + name + '日' + text + ' ' + value + ' ℃<br>'
}
return showHtm;
}
myChart.setOption(option);
myChart.on('click', function (params) {
openDialogView('查看' + option.title.text, '${ctx}/statistics/weather/list','90%', '700px');
});
});
</script>
</head>
<body>
<div id="myChart" class="myChart"></div>
</body>
</html>