问题描述
指示线上的文本标签可以设置不同的大小和颜色,通过富文本设置样式无效
相关代码
xAxis: {
show: true,
position: 'top',
data: _this.series.dateList,
axisPointer: {
show: true,
type: 'line',
padding: [10, 0],
label: {
color: '#2b3038',
fontSize: 14,
backgroundColor: '#fff',
shadowColor: '#fff',
formatter: function (params) {
return (
'{value|' + params.seriesData[0].value.toFixed(4) + '}' + '\n' + '{time|' + params.value + '}'
)
},
rich: {
value: {
fontSize: 16
},
time: {
fontSize: 12
}
}
},
lineStyle: {
color: '#CBD0D6',
type: 'dotted',
height: '243px'
}
}
}
你期待的结果是什么?实际看到的错误信息又是什么?