You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.7 KiB
50 lines
1.7 KiB
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>长春市教育局挂图作战系统</title>
|
|
<script type="text/javascript" src="/static/lib/echarts.min.js"></script>
|
|
<script src="/static/lib/jquery.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="div_bar" class="chart-container" style="width:900px; height:500px;"></div>
|
|
<div id="div_pie" class="chart-container" style="width:900px; height:500px;"></div>
|
|
<div id="div_rec" class="chart-container" style="width:900px; height:500px;"></div>
|
|
<script>
|
|
var chart_div_pie = echarts.init(document.getElementById('div_pie'), 'white', {renderer: 'canvas'});
|
|
var chart_div_bar = echarts.init(document.getElementById('div_bar'), 'white', {renderer: 'canvas'});
|
|
|
|
$(document).ready(function () {
|
|
//绑定柱图
|
|
$.ajax({
|
|
//请求方式
|
|
type: "GET",
|
|
//请求的媒体类型
|
|
contentType: "application/json;charset=UTF-8",
|
|
//请求地址
|
|
url: "/report/xmdwqk",
|
|
//请求成功
|
|
success: function (result) {
|
|
console.log(result);
|
|
chart_div_bar.setOption(result);
|
|
}
|
|
});
|
|
//绑定饼图
|
|
$.ajax({
|
|
//请求方式
|
|
type: "GET",
|
|
//请求的媒体类型
|
|
contentType: "application/json;charset=UTF-8",
|
|
//请求地址
|
|
url: "/report/xmlxfb",
|
|
//请求成功
|
|
success: function (result) {
|
|
console.log(result);
|
|
chart_div_pie.setOption(result);
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|