这是一个echarts图,现在需要给未掌握后面的数字14114添加一个下划线,应该怎么做?以下是数据源data的代码,现在需要给data的每一项的name里面的a添加一个下划线,查了很多资料感觉实现不了
data: [
{
value: yiZhangwo,
title: '已掌握知识点详情',
name: `{d|已掌握:}{a|${yiZhangwo}}{b|个}{c|\n常考:${mastered.FrequentCount}个\n次常考:${mastered.SubFrequentCount}个\n不常考:${mastered.InfrequentCount}个}`,
label: {
padding: [-22, 0, 0, -100],
width: 100,
rich: {
a: {
color: '#009a82',
fontSize: 20,
lineHeight: 24,
padding: [0, 0, 6, 0],
textDecoration: 'underline',
},
b: {
color: '#009a82',
fontSize: 12,
padding: [0, 0, 6, 0],
},
c: {
color: '#999',
lineHeight: 20,
},
d: {
padding: [0, 0, 6, 0],
},
},
},
labelLine: {
length2: 100,
},
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{
offset: 0,
color: '#009861', // 0% 处的颜色
},
{
offset: 1,
color: '#1de2c3', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
},
{
value: weiZhangwo,
title: '未掌握知识点详情',
name: `{d|未掌握:}{a|${weiZhangwo}}{b|个}{c|\n常考:${unmastered.FrequentCount}个\n次常考:${unmastered.SubFrequentCount}个\n不常考:${unmastered.InfrequentCount}个}`,
label: {
padding: [-22, -100, 0, 5],
rich: {
a: {
textDecoration: 'underline',
color: '#07f',
fontSize: 20,
lineHeight: 24,
padding: [0, 0, 6, 0],
// borderType: 'solid',
// borderColor:'#07f',
// borderWidth:1,
},
b: {
color: '#07f',
fontSize: 12,
padding: [0, 0, 6, 0],
},
c: {
color: '#999',
lineHeight: 20,
},
d: {
padding: [0, 0, 6, 0],
},
},
formatter: function (params) {
const value = params.value
},
},
labelLine: {
length2: 100,
},
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{
offset: 0,
color: '#008cff', // 0% 处的颜色
},
{
offset: 1,
color: '#0cf', // 100% 处的颜色
},
],
global: false, // 缺省为 false
},
},
},
],
加个a标签试试呢