![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/3a9053dc57100180615aff371b5a52ae.png)
<div id="myChart" style="width:200px;height:200px"></div>
// 基于准备好的dom,初始化echarts实例
let myChart = this.$echarts.init(document.getElementById('myChart'))
// 绘制图表
myChart.setOption({
title: {
text: '' },//标题
tooltip: {
//提示窗样式
trigger: 'axis',
backgroundColor: 'rgba(38,38,38,0.7)',
borderColor: '#252525',
textStyle:{
color: '#fff',
},
},
legend: {
//下标
bottom: 0, //图标显示位置
color:['#fff','#03AFDA','#FFEA72', '#2BE379'],
borderRadius: 5,
itemWidth: 20, //图例图形的宽
itemHeight: 5, //图例图形的高
data: [
{
name:'水位(m)',
icon:'rect',
itemStyle:{
//图形的样式
color:'#fff',
},
textStyle: