Bootstrap

Visual Studio Code (echarts)数据可视化,柱状图与折线图混合,实现降水量,蒸发量,温度变化

初始化

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="echarts.js"></script>
</head>
<body>
    <div id="main" style="width: 600px;height:400px;"></div>
    <script type="text/javascript">
    
		//基于准备好的dom,初始化ECharts图表
		var myChart = echarts.init(document.getElementById("main"));

主代码

var option = {  //指定图表的配置项和数据
			backgroundColor: 'rgba(128, 128, 128, 0.1)',  //rgba设置透明度0.1
			tooltip: { trigger: 'axis' },
			legend: { data: ['水量', '蒸发量','温度'],
            ico
;