Skip to content

[Bug] 富文本lineDash的配置不生效 #4595

Description

@skie1997

Version

latest

Link to Minimal Reproduction

none

Steps to Reproduce

const spec = {
  type: 'scatter',
  data: [
    {
      id: 'data1',
      values: [
        { x: 1, y: 1, size: 50 }
      ]
    }
  ],
  xField: 'x',
  yField: 'y',
  sizeField: 'size',
  // 1. 给气泡点设置虚线边框
  point: {
    style: {
      fill: 'rgba(31, 119, 180, 0.5)',
      stroke: '#ff0000',
      lineWidth: 4,
      lineDash: [10, 10] // 关键点:气泡带有虚线
    }
  },
  // 2. 开启数据标签,并使用富文本渲染文字描边
  label: {
    visible: true,
    position: 'top',
    offset: 10,
    formatMethod: () => {
      return {
        type: 'rich',
        text: [
          {
            text: '我是标签文本',
            fontSize: 30,
            fill: '#000',
            stroke: '#00ff00', // 给富文本加上绿色描边
            lineWidth: 4,
            lineDash: []       // 即使在这里显式清空虚线,也会因为底层 Bug 被画成红色气泡的 [10, 10] 虚线样式
          }
        ]
      };
    }
  }
};

Current Behavior

Image

Expected Behavior

富文本lineDash的配置生效

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions