antvis / antvis/G2Plot

🤔 [QUESTION] The tooltip option of the Progress component is invalid

Open
#2,933 0 comments 0 reactions 0 assignees View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Question description [Please make everyone to understand it]

### 💻 Link to minimal reproduction

Please provide a link by forking these links [g2plot](https://codesandbox.io/s/g2plot-reproduction-template-gyej1) or GitHub repo. What is a minimal reproduction, and why is it required?

### 🏞 Expected result

### 🚑 Any additional [like screenshots]

* **G2Plot Version**: 2.3.37
* **Platform**:

env:
```
"@antv/g2plot": "^2.3.37",
```

code:
```
const progress = new Progress(document.getElementById('test'), {
height: 100,
width: 300,
autoFit: false,
percent: 0.536,
barWidthRatio: 0.3,
color: ['#F4664A', '#E8EDF3'],
progressStyle: {
cursor: 'pointer'
},
tooltip: {
formatter: (datum: Datum) => {
return { name: datum.x, value: datum.y + '%' };
},
}
});

progress.render();
```

question: is it because I am using the wrong way?

Contributor guide

Open the contributing guide

Research direction

Start with the supplied Progress component reproduction using @antv/g2plot 2.3.37 and inspect how its tooltip option is handled. Determine whether the formatter is supported for Progress and whether the reported behavior is expected; done means a confirmed explanation or a clearly reproducible fix scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.