行吧,搞好了,我还是看漏了,如果要改的话是得自己写标签的。
sbf(value) {
let arr = 'ABCDE'.split("").reverse().join('')
return arr.charAt(value)
},
const stand = echarts.init(this.$refs.echartContainer);
stand.setOption({
title: {
text: that.aname
},
tooltip: {
trigger: "item",
//主要是 formatter这个函数是更改提示框里面的数据的
formatter: function(params) {
let List = [];
let Item = '';
let name = that.name
let value = params.value;
for (let i = 0; i < value.length; i++) {
let a = value[i] - 1;
List.push('<p style="width:80px;display: flex; justify-content: space-between;">' +
'<span>' + name[i] + ':</span><span>' + that.sbf(a) + '</span></p>')
}
Item = List.join('')
return '<div class="tooltip">' + Item + '</div>'
}
},
radar: {
name: {
textStyle: {
color: '#fff',
backgroundColor: '#999',
borderRadius: 3,
padding: [3, 5]
}
},
radius: 90, //大小
// startAngle: 45,//旋转角度
splitNumber: 5,
center: ['50%', '50%'],
indicator: [{
name: '破坏力',
max: 5,
axisLabel: {
show: true
},
},
{
name: '速度',
max: 5
},
{
name: '射程',
max: 5
},
{
name: '持久度',
max: 5
},
{
name: '精密动作',
max: 5
},
{
name: '可成长性',
max: 5
},
]
},
series: [{
name: 'stand',
type: 'radar',
data: [{
// name:that.aname,
value: that.avalue
}]
}]
});
弱鸡程序员年底还在加班