下面是theme裏面的內容javascript
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'
}
}
},java
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³/hecharts
word上面上標是ctrl shift + 下標是ctrl +,而後複製到須要顯示的位置測試