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/editor.html?code=fZC9TsMwEMf3PsVJCHmJ1DShiAYx8CEmkJBA6oA6OLHlWAQ7chxohPIKrAzMrJ3YeRs-3oKzk7aiSF3uzuff3_c_69JKreAIngYAmS60SeCW7MTx5ODshMwC7FqtCyvLxCN4NFIIjhihc1kRRwC48kpLZd1FxyHZlByxKqdMPxLfbDG2TiKMZEj6en6MahzriQ1xRi0X2jT9HABGLXUWLzUJgNzU3KUpZ_6U1y6dG-nSNbU-1arbY-nzgqa8WLsEyLkUuU1gNA6XHMBwCCnN7oTRtWKn3ccQg3N6wm3SRf94s2WHB1qgzb98xY3k_wSK3jvB1-v75_Pb9-Lj52WxWrx_LKVm1cJ6KpnNsb0f7m5-0SgMYBwFEIVYxPEehomvMERROFsbGrSHvw&_source=echarts-doc-preview&enc=deflate

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 = {
  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 = {
  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