ant-design / ant-design-charts

A React Chart Library
https://ant-design-charts.antgroup.com/
MIT License
1.92k stars 361 forks source link

🐛[BUG]雷达图组件Radar隐藏图例legend后会影响线条的展示 #2173

Closed sapphirezzz closed 9 months ago

sapphirezzz commented 10 months ago

🐛 bug 描述 [详细地描述 bug,让大家都能理解]

用雷达图组件时,legend的设置与否会影响线条的展示。按理是不相关的两个展示。

📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]

设置 legend 如标题等,展示正常如图一。 设置 legend 为 false,其他代码不变,此时展示成图二。即中间有4条线消失了。

请问如何即不展示图例,又能正常展示那些线条?

看了API的说明,没看到这些线对应的是哪个设置项。

image image

🏞 期望结果 [描述你原本期望看到的结果]

期望不展示图例的情况下,能正常展示那些线条。

💻 复现代码 [提供可复现的代码,仓库,或线上示例]

const radarConfig = { autoFit: false, appendPadding: [4, 0, 6, 0], data: list, xField: 'item', yField: 'score', seriesField: 'user', xAxis: { label: { style: { fill: 'white', fontSize: 13, }, }, line: null, tickLine: null, grid: { line: { style: { lineDash: null, }, }, }, }, yAxis: { label: false, line: null, tickLine: null, grid: { line: { type: 'line', style: { lineDash: null, }, }, }, }, meta: { score: { alias: '分数', min: 0, max: 100, }, }, // 开启辅助点 point: { size: 6, }, // 开启面积 area: {}, // 图例 legend: false, } as RadarConfig;

© 版本信息

🚑 其他信息 [如截图等其他信息可以贴在这里]

lxfu1 commented 9 months ago

无法复现,你提供的配置放到官网是正常的,重新安装依赖试试