antvis / antvis/G2Plot

🐛 [BUG] 雷达图设置了面积area: {},y值有负数时面积绘制不对

Open
#3,775 0 comments 0 reactions 0 assignees View on GitHub
Bug
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 { Radar } from '@antv/g2plot';

const data = [
{ name: '通风时间', star: 8 },
{ name: '毒物浓度', star: 0.60 },
{ name: 'lny', star: -1.28 },
];
const radarPlot = new Radar('container', {
renderer: 'svg',
data,
xField: 'name',
yField: 'star',
point: {
size: 2,
},
area: {},
});
radarPlot.render();

```
绘制效果为
![image](https://github.com/antvis/G2Plot/assets/140773547/4c09341a-3c8f-45b0-8593-5f5f72ff9319)

### 🏞 Expected result
面积正常绘制

### 🚑 Any additional [like screenshots]

* **G2Plot Version**: 2.4.25
* **Platform**: chrome

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided Radar example with renderer set to svg, area enabled, and a negative y value in G2Plot 2.4.25. Trace the radar area rendering path and verify that the area is drawn correctly across negative and positive values; add or update a focused regression test if the relevant test location is identified.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.