ok-admin/map2.html

37 lines
929 B
HTML
Raw Normal View History

2018-07-25 15:47:48 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>折线图</title>
</head>
<body>
<div id="main" style="width: 100%;height:400px;margin-top: 50px;"></div>
<script src="lib/echarts/echarts.common.min.js"></script>
<script type="text/javascript">
// 基于准备好的dom初始化echarts实例
2019-04-14 07:09:15 +00:00
var myChart = echarts.init(document.getElementById("main"));
2018-07-25 15:47:48 +00:00
// 指定图表的配置项和数据
var option = {
title: {
2019-04-14 07:09:15 +00:00
text: "折线图"
2018-07-25 15:47:48 +00:00
},
xAxis: {
2019-04-14 07:09:15 +00:00
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
2018-07-25 15:47:48 +00:00
},
yAxis: {
2019-04-14 07:09:15 +00:00
type: "value"
2018-07-25 15:47:48 +00:00
},
2018-08-03 08:09:17 +00:00
series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320],
2019-04-14 07:09:15 +00:00
type: "line"
2018-08-03 08:09:17 +00:00
}]
2018-07-25 15:47:48 +00:00
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
2019-04-14 07:09:15 +00:00
</html>