🐛 [BUG]Funnel Chart update theme console will report:TypeError: Cannot read properties of undefined (reading 'length')
- 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]
> Please provide a link by forking these links [G2Plot](https://codesandbox.io/s/g2plot-issue-template-gzfdq?file=/index.ts) or GitHub repo, a minimal reproduction.
* _Required_ **Link to minimal reproduction**:
### 📷 Step to reproduce
import { Funnel } from '@antv/g2plot';
const data = [
{ stage: '简历筛选', number: 253 },
{ stage: '初试人数', number: 151 },
{ stage: '复试人数', number: 113 },
{ stage: '录取人数', number: 87 },
{ stage: '入职人数', number: 59 },
];
const funnelPlot = new Funnel('container', {
data: data,
xField: 'stage',
yField: 'number',
legend: false,
});
funnelPlot.update({ theme: 'default' });
funnelPlot.render();
### 🏞 Expected result
Funnel Chart update theme console will report:TypeError: Cannot read properties of undefined (reading 'length')
### 🚑 Any additional [like screenshots]

* **G2Plot Version**: 2.4.31
* **Platform**:
Contributor guide
Research direction
Start with the Funnel example in the issue and reproduce the failure using G2Plot 2.4.31, focusing on the update({ theme: 'default' }) call before render. Trace the undefined value that leads to the length error; done means updating the theme and rendering no longer logs the TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100