柱图。微信小程序应用中。添加字体大小设置,华为meta系列手机都不生效。很奇怪,图形刚渲染出来字体正常,但是一闪而过,又恢复默认
配置项如下
option = {
tooltip: {
trigger: 'axis'
},
//legend: {
// data: ['用电量'],
// orient: 'horizontal', // 'vertical'
// x: 'center', // 'center' | 'left' | {number},
// y: 'bottom',
// textStyle: fontForLegend
//},
xAxis: [
{
type: 'category',
data: [12,15,18],
axisLabel: {
textStyle: { fontSize: '12', color: '#9EC3F5' }
},
boundaryGap: true,
axisLine: { show: false },
axisTick: { show: false },
}
],
grid: {
y: 30
},
yAxis: [
{
type: 'value',
name: '用电量',
axisLabel: {
textStyle: { fontSize: '12', color: '#9EC3F5' }
},
nameTextStyle: {
color: '#CCECFF'
},
splitLine: { show: true, lineStyle: { color: ['#CCECFF'], width: 1, type: 'solid' } },
axisLine: { show: false },
axisTick: { show: false },
}
],
color: ['#77ACF4'],
series: [
{
name: '用电量',
type: 'bar',
barWidth: 5,
data: [154,18,23]
}
]
};