antvis / antvis/G2Plot

🐛 [BUG]配置dodgePadding后柱状图显示异常

Open
#2,884 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

* **G2Plot Version**: 2.2.11
* **Platform**:
复现代码
```
import { Column } from '@antv/g2plot';

const data = [
{
name: 'London',
月份: 'Jan.',
月均降雨量: 18.9,
},

];

const stackedColumnPlot = new Column('container', {
data,
isGroup: true,
xField: '月份',
yField: '月均降雨量',
dodgePadding:3,
seriesField: 'name',
/** 设置颜色 */
//color: ['#1ca9e6', '#f88c24'],
/** 设置间距 */
// marginRatio: 0.1,
label: {
// 可手动配置 label 数据标签位置
position: 'middle', // 'top', 'middle', 'bottom'
// 可配置附加的布局方法
layout: [
// 柱形图数据标签位置自动调整
{ type: 'interval-adjust-position' },
// 数据标签防遮挡
{ type: 'interval-hide-overlap' },
// 数据标签文颜色自动调整
{ type: 'adjust-color' },
],
},
});

stackedColumnPlot.render();

```

Contributor guide

Open the contributing guide

Research direction

Start by running the provided TypeScript reproduction with G2Plot 2.2.11 and inspect the column chart when dodgePadding is set to 3. Compare the rendered result with the same chart without that setting, then verify that the bar display is corrected without breaking the label configuration.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.