🐛 [BUG] 折线图 xField 字段类型不同,会导致渲染结果不一致
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 591
- PR merge metrics
- No merged PRs in 30d
Description
### 🐛 Bug description [Please make everyone to understand it]
「折线图」默认最小化配置、`xField`字段对应的类型不同( string、number ),`yField`始终保持一致,会导致渲染到画布上的内容行为不一致( 最后一列内容渲染有问题 )
codesandbox: https://codesandbox.io/s/optimistic-mirzakhani-lloogr?file=/index.ts:2873-2878
### 📷 Step to reproduce
1. 点击进入上述地址
2. 修改默认选中的data1,改为data2,查看相互渲染的区别( 主要是最后一列在number时没有被渲染 )
### 🏞 Expected result
期待这些默认行为是一致的
Contributor guide
Research direction
Start with the linked CodeSandbox and reproduce the line-chart difference by switching from data1 to data2 while keeping the minimal configuration and yField unchanged. Trace how the string and number xField values are rendered, especially the missing final column. Done means both xField types produce consistent canvas output, including the last column, with the reproduction no longer showing a difference.
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
- 42/100