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