wuba / wuba/react-native-echarts
tooltip报错: Cannot read property 'getBoundingRect' of undefined
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 967
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
tooltip配置如下:
tooltip: {
trigger: 'axis',
formatter: '{c}',
showContent: false,
axisPointer: {
lineStyle: {
color: '#000',
type: 'dotted',
},
},
},
数据改变更新图表:
chartRef.current?.resize({
width: w,
height: chartHeight + option.grid.bottom,
});
option.series = [
getLineSerie(data, config),
];
option.xAxis.data = xAxisData;
chartRef.current?.setOption(option);
报错:
(NOBRIDGE) ERROR TypeError: Cannot read property 'getBoundingRect' of undefined
TooltipRichContent.js 的getSize
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with TooltipRichContent.js and its getSize method, then review the reported resize and setOption update sequence. Reproduce the tooltip configuration and data update, and confirm that updating the chart no longer produces the undefined getBoundingRect error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- data-visualization, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100