Skip to content

[Bug]: 使用自定义图例,图例过多,换行之后混覆盖图表。貌似也无法分页 #3094

@tomatodev

Description

@tomatodev

Describe the bug / 问题描述

Image

color: { render: (items: { color: string; label: string; id: string }[]) => { return ( <div className="custom-legend" style={{ display: 'flex', gap: '10px', flexWrap: 'wrap', }} > {items.map((item) => { console.log( '%c [ item ]-1298', 'font-size:13px; background:pink; color:#bf2c9f;', item ); return ( <div key={${item.id}-${item.color}} className="custom-legend-item" // eslint-disable-next-line react/no-unknown-property legend-value={item.id} style={{ display: 'inline-flex', alignItems: 'center', flexWrap: 'nowrap', }} > <div className="legend-color" style={{ background: item.color, width: 8, height: 8, marginRight: 8 }} /> <div className="legend-label" style={{ paddingRight: 4 }}> {item.label} </div> <Tooltip title="prompt text"> <Icon value="help" /> </Tooltip> </div> // <span key={item.id} style={{ color: item.color }} legend-value={item.id}> // {item.label} // </span> ); })} </div> ); }, },

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

🆕 2.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions