下面是theme里面的内容
gauge : {
startAngle: 225,
endAngle : -45,
axisLine: { // 坐标轴线
show: true, // 默认显示,属性show控制显示与否
lineStyle: { // 属性lineStyle控制线条样式
color: [[0.2, '#2ec7c9'],[0.8, '#5ab1ef'],[1, '#d87a80']],
width: 10
}
},
axisTick: { // 坐标轴小标记
splitNumber: 10, // 每份split细分多少段
length :15, // 属性length控制线长
lineStyle: { // 属性lineStyle控制线条样式
color: 'auto'
}
},
axisLabel: { // 坐标轴文本标签,详见axis.axisLabel
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: 'auto'
}
},
splitLine: { // 分隔线
length :22, // 属性length控制线长
lineStyle: { // 属性lineStyle(详见lineStyle)控制线条样式
color: 'auto'
}
},
pointer : {
width : 5,
color : 'auto'
},
title : {
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: '#333'
}
},
detail : {
textStyle: { // 其余属性默认使用全局文本样式,详见TEXTSTYLE
color: 'auto'
}
}
},
var option6 = {
tooltip : {
formatter: "{a} <br/>{c} {b}"
},
series : [
{
name: '瞬时流量',
type: 'gauge',
z: 3,
min: 0,
max: 220,
radius: '85%',
data:[{value: 40, name: '瞬时流量(Sm³/h)'}]
},
{
name: '进口压力',
type: 'gauge',
center: ['20%', '55%'], // 默认全局居中
radius: '75%',
min:0,
max:7,
endAngle:45,
data:[{value: 1.5, name: '进口压力(P)'}]
},
{
name: '出口压力',
type: 'gauge',
center: ['80%', '55%'], // 默认全局居中
radius: '75%',
min: 0,
max: 20,
startAngle: 135,
endAngle: -45,
pointer: {
width:5
},
data:[{value: 10, name: '出口压力(P)'}]
},
]
};
var myChart = echarts.init(document.getElementById('gaugechart2'),pietheme);
myChart.setOption(option6);
经过测试formatter并 不支持<sup>3</sup>这种样子的上标,需要键盘输入时就输入上标Sm³/h
word上面上标是ctrl shift + 下标是ctrl +,然后复制到需要显示的位置