🐛 [BUG] legend 的显示的数据条数不正确
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
https://g2plot.antv.antgroup.com/zh/examples/pie/donut/#statistics
在 该示例中,将某一数据的type文本加长
const data = [
{ type: '分类分类分类分类', value: 27 },
{ type: '分类二', value: 25 },
{ type: '分类三', value: 18 },
{ type: '分类四', value: 15 },
{ type: '分类五', value: 10 },
{ type: '其他', value: 5 },
];
然后添加这个属性让其显示在顶部
legend:{
position:"top"
},
拖动浏览器窗口大小,观察legend 表现,当宽度小到一定的值的时候,data 长度为本来为6,但是页面会显示为7,并且第一条数据渲染不出来。
Contributor guide
Research direction
Start with the donut statistics example at the linked G2Plot URL and reproduce the issue using the provided data and top-positioned legend. Resize the browser until the legend shows seven entries and the first entry is missing; done means the six data items remain correctly represented at narrow widths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100