0
点赞
收藏
分享

微信扫一扫

Echarts坐标名称及位置设置

关键代码如下:

xAxis: {
type: 'category',
name: 'Month',
nameLocation: 'end', //X轴标题位置(选项有:end,start,center)
nameTextStyle:{ //X轴标题
color:'yellow', //字体颜色
fontSize:14, //字体大小
padding:5 //padding用来调整位置
},
axisLabel: {
show: true,
textStyle: { color: 'white' } //X轴刻度字体颜色
},
data: []
},

yAxis: {
type: 'value',
name: 'Amount(¥)',
nameTextStyle:{ //Y轴标题
color:'orange', //Y轴标题字体颜色
fontSize:14,
padding:5
},
position: 'left',
axisLine: {
lineStyle: {
color: colors[0]
}
},
axisLabel: {
formatter: '{value} ',
textStyle: { color: 'white' } //Y轴刻度字体颜色
},
},

如图所示:

Echarts坐标名称及位置设置_Echarts

举报

相关推荐

0 条评论