坐标轴配置
xAxis: {
disabled:true,
disableGrid:true,
},
yAxis: {
gridType:'dash',
dashLength:8,
gridColor:'#CCCCCC',
splitNumber:5,
min:10,
max:180,
format:(val)=>{return val.toFixed(0)+'元'}
}
格式化Y轴刻度方法如下:format:(val)=>{return val.toFixed(0)+'元'}
完整配置
new uCharts({
$this:_self,
canvasId: canvasId,
type: 'line',
fontSize:11,
legend:true,
dataLabel:true,
dataPointShape:true,
background:'#FFFFFF',
pixelRatio:_self.pixelRatio,
categories: chartData.categories,
series: chartData.series,
animation: true,
xAxis: {
disabled:true,
disableGrid:true,
},
yAxis: {
gridType:'dash',
gridColor:'#CCCCCC',
dashLength:8,
splitNumber:5,
min:10,
max:180,
format:(val)=>{return val.toFixed(0)+'元'}
},
width: _self.cWidth*_self.pixelRatio,
height: _self.cHeight*_self.pixelRatio,
extra: {
lineStyle: 'straight'
}
});