antvis / antvis/G2Plot

🐛 [BUG] Heatmap密度图展示问题,寻求解决方案

Open
#3,740 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]
热力图当数值为0时或者数值中的最小值时,会出现没有颜色的情况,正常情况应该是当前设定color的第一个值

> 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
第一种情况:[{ x: 20, y: 30, value: 0 }, { x: 20, y: 30, value: 10 }]当value为0时不会显示颜色
第二种情况:[{ x: 20, y: 30, value: 450 }, { x: 20, y: 30, value: 10 }]当value为10时不会显示颜色

### 🏞 Expected result
期望展示设置color的第一个颜色,通过设置minOpacity来进行控制

### 🚑 Any additional [like screenshots]

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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the heatmap with the two data cases in the issue: a minimum value of 0 and a minimum value of 10. Trace the heatmap color handling and verify that the minimum value receives the first configured color, with minOpacity controlling its visibility; both cases should display the expected color.

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.