Version
5.4.1
Link to Minimal Reproduction
Steps to Reproduce
option = {
color: ["#3398DB"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
}
},
grid: {},
xAxis: [{
type: "category",
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
nameTextStyle: {
fontSize: 30
}
}],
yAxis: [{
type: "value",
nameTextStyle: {
fontSize: 30
}
}],
series: [{
name: "直接访问",
type: "bar",
barWidth: "60%",
data: [10, 52, 200, 334, 390, 330, 220]
}]
}
Current Behavior
The configuration of yAxis.nameTextStyle.fontSize and xAxis.nameTextStyle.fontSize is not working, whether it is given a larger value or a smaller value.
Expected Behavior
yAxis.nameTextStyle.fontSize and xAxis.nameTextStyle.fontSize can work
Environment
- OS:windows 11
- Browser:chrome latest
- Framework:js
Any additional comments?
No response
1条答案
按热度按时间h7wcgrx31#
It works, your code is just missing X-axis name - like
name: 'myXaxis'
If you want to change X-axis labels, then the setting is axisLabel.fontSize
Demo Code