看一下没改变样式前的样子吧
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/054c08d99d67858f0c32ae87f8c50a67.png)
想要修改里面的样式
最终效果
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/eca7a125c329c9590a219e347c6d6a9c.png)
代码如下
var option1 = {
tooltip: {
formatter: "{a} <br/>{b} : {c}%",
},
toolbox: {
feature: {
restore: {},
saveAsImage: {}
}
},
series: [{
name: 'APi调用成功率',
type: 'gauge',
splitNumber: 1,
axisLine: {
lineStyle: {
width: 20,
opacity: 0
}
},
splitLine: {
show: false
},
axisTick: {
length: 20,
splitNumber: 100,
lineStyle: {
width: 3,
color: '#555'
}
},
detail: {
formatter: '{value}%',
textStyle: {
fontSize: 15
}
},
data: [{
value: 50,
name: '成功率'
}]
}]
},
a = document.getElementById('main1'),
es1 = echarts.init(a) es1.setOption(option1)