echarts y轴刻度加单位

it2023-03-14  91

echarts y轴刻度加单位

今天学习到的新知识,如何在echarts图表中给刻度加单位。

方法有很多,我用的是formatter来加单位的:

yAxis: { min: 0, max: 60, type: 'value', axisLabel:{ formatter:'{value} 亿', } }

另一种方法是,在Y轴顶部,使用title来说明y轴的含义数据的就行:

option = { title: { text: "单位为:亿", }, … },

还有一种是

yAxis: { name: "金额",(添加这里) type: "value", }
最新回复(0)