antvis / antvis/G2Plot

🐛 [BUG] 分组箱线图的异常点没有分组

Open
#3,397 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

```js
import { Box } from '@antv/g2plot';

const data = [
{ Species: 'I. setosa', type: 'SepalLength', value: 5.1, _bin: [4.3, 4.8, 5, 5.2, 5.8], outliers: [1, 10] },
{ Species: 'I. setosa', type: 'SepalWidth', value: 3.5, _bin: [2.3, 3.2, 3.4, 3.7, 4.4], outliers: [1, 10] },
{ Species: 'I. setosa', type: 'PetalLength', value: 1.4, _bin: [1, 1.4, 1.5, 1.6, 1.9], outliers: [1, 10] },
{ Species: 'I. setosa', type: 'PetalWidth', value: 0.2, _bin: [0.1, 0.2, 0.2, 0.3, 0.6], outliers: [1, 10] },
{ Species: 'I. versicolor', type: 'SepalLength', value: 7, _bin: [4.9, 5.6, 5.9, 6.3, 7], outliers: [1, 10] },
{ Species: 'I. versicolor', type: 'SepalWidth', value: 3.2, _bin: [2, 2.5, 2.8, 3, 3.4], outliers: [1, 10] },
{ Species: 'I. versicolor', type: 'PetalLength', value: 4.7, _bin: [3, 4, 4.35, 4.6, 5.1], outliers: [1, 10] },
{ Species: 'I. versicolor', type: 'PetalWidth', value: 1.4, _bin: [1, 1.2, 1.3, 1.5, 1.8], outliers: [1, 10] },
{ Species: 'I. virginica', type: 'SepalLength', value: 6.3, _bin: [4.9, 6.2, 6.5, 6.9, 7.9], outliers: [1, 10] },
{ Species: 'I. virginica', type: 'SepalWidth', value: 3.3, _bin: [2.2, 2.8, 3, 3.2, 3.8], outliers: [1, 10] },
{ Species: 'I. virginica', type: 'PetalLength', value: 6, _bin: [4.5, 5.1, 5.55, 5.9, 6.9], outliers: [1, 10] },
{ Species: 'I. virginica', type: 'PetalWidth', value: 2.5, _bin: [1.4, 1.8, 2, 2.3, 2.5], outliers: [1, 10] },
];

const groupBoxPlot = new Box('container', {
data,
xField: 'type',
yField: '_bin',
groupField: 'Species',
outliersField: 'outliers'
});

groupBoxPlot.render();

```
![image](https://user-images.githubusercontent.com/49330279/201252911-f3f8ccd9-db3f-4a23-9536-d80e0fa82335.png)

### 🏞 Expected result

异常点分组

### 🚑 Any additional [like screenshots]

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

Contributor guide

Open the contributing guide

Research direction

Start with the Box plot entry point and run the supplied TypeScript reproduction using groupField and outliersField. Trace how grouped box plots render outliers, then verify that the outlier marks are separated by Species rather than combined; the grouped chart should match the expected result.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.