Skip to content

legend.textStyle. lineHeight 无效 #15165

@niuweili

Description

@niuweili

Version

5.1.2

Reproduction link

https://echarts.apache.org/zh/option.html#legend.textStyle.lineHeight

Steps to reproduce

在最新的官方文档示例中:https://echarts.apache.org/zh/option.html#legend.textStyle.lineHeight
设置“legend.textStyle.lineHeight = 80”不会生效,但是如果设置了 “legend.textStyle.backgroundColor = 'rgba(251, 114, 114, 1)'",lineHeight属性就会生效

不生效的配置:

  legend: {
    textStyle: {
      lineHeight: 80
    }
  },

生效的配置:

  legend: {
    textStyle: {
      lineHeight: 80,
      backgroundColor: "rgba(251, 114, 114, 1)"
    }
  },

在旧版本api中设置则没有出现这个问题

What is expected?

单独设置legend.textStyle.lineHeight生效

What is actually happening?

单独设置legend.textStyle.lineHeight不生效,必须要设置一个legend.textStyle.backgroundColor背景色


加油!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions