echarts柱状图宽度设置(react-native)


const optionCategory = {
color: ['#B5282A'],
tooltip : {
trigger: 'axis',
axisPointer : { // 坐标轴指示器,坐标轴触发有效
type : 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
top: px(20),
left: '3%',
right: '4%',
bottom: px(5),
containLabel: true,
height: px(290),
},
xAxis : [
{
type : 'category',
data : data.datax,
axisTick: {
alignWithLabel: true
},
axisLabel:{ //调整x轴的lable
textStyle:{
fontSize: 10 // 让字体变大
}
}
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'交易额',
type:'bar',
barWidth: px(26),//宽度
itemStyle: {
normal: {
fontColor: '14px',
},
},
data: data.data,
}
]
};


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM