![在这里插入图片描述](https://img-blog.csdnimg.cn/20210612182315391.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dob19iZWNvbWVfZ29kcw==,size_16,color_FFFFFF,t_70)
<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'