wuba / wuba/react-native-echarts

tooltip报错: Cannot read property 'getBoundingRect' of undefined

Open
#236 0 comments 0 reactions 0 assignees View on GitHub

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

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.