Skip to content

[Bug] The axisLabel.height property does not take effect when no background color is set #21504

@xxxx-p

Description

@xxxx-p

Version

6.0.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWsDGwA2wBOAXLANoBEAxAMyUCcAHACIBCpAugDRqxjA6QhFU6dGDwQA5uICmhWKQCGADwgBnUp2GwlqgArAI0MDMFdNYAJ4gpRUioAW8gCbAA7qVOwAvl08bY4sUdBXy5FAEFlFSJiIWELKxsMeSNxfHN1D0dk-WjSAFkYdTkAFQBXKSLSAHUpR0riu1LKgDExSoBlZI7S6DYfDi5zCNVo2JFLazkAN3lscvd0TwH0FRkIKSiSMdhoeQBbSdJAF7dAUuNAfujAO9SMswmbACN5PGvhB7wqiEcwOxsANgAGACkz3QWTAORIAEY_uxYABWABMMPhf2hsGoABYYbRUdRUfDkax-ihPEA&_source=echarts-doc-preview

Steps to Reproduce

  1. Create a regular bar chart
  2. Set the height of the axis label without setting the background color

Current Behavior

option: option = {
color: ["#3398DB"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
}
},
grid: {},
xAxis: [{
type: "category",
data: ["Mo", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
axisLabel: {
height: 150
}
}],
yAxis: [{
type: "value"
}],
series: [{
name: "直接访问",
type: "bar",
barWidth: "60%",
data: [10, 52, 200, 334, 390, 330, 220]
}]
}

Image

Expected Behavior

option: option = {
color: ["#3398DB"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow"
}
},
grid: {},
xAxis: [{
type: "category",
data: ["Mo", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
axisLabel: {
height: 150,
backgroundColor: 'red'
}
}],
yAxis: [{
type: "value"
}],
series: [{
name: "直接访问",
type: "bar",
barWidth: "60%",
data: [10, 52, 200, 334, 390, 330, 220]
}]
}

Image

Environment

- OS: mac os
- Browser: chrome

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions