🐛 [BUG] 柱图label显示不全
- 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
```ts
import { Column } from '@antv/g2plot';
const data = [
{
ID: 3,
x: "吉林",
y: 9.44,
},
{
ID: 3,
x: "北京",
y: 9.9,
},
{
ID: 3,
x: "江苏",
y: 8.16,
},
{
ID: 3,
x: "广东",
y: 7.53,
},
{
ID: 3,
x: "上海",
y: 6.67,
},
];
const columnPlot = new Column('container', {
data,
xAxis: {
line: {
style: {
strokeWidth: 1,
lineWidth: 1,
stroke: "#FFFFFF",
opacity: 1,
},
},
grid: null,
tickLine: null,
title: false,
visible: true,
label: {
style: {
fontSize: 16,
fontWeight: "normal",
fontFamily: "Microsoft YaHei",
},
autoHide: true,
formatter: null,
},
tickInterval: null,
},
yAxis: {
line: {
style: {
strokeWidth: 1,
lineWidth: 1,
stroke: "#FFFFFF",
opacity: 1,
},
},
grid: {
visible: true,
line: {
style: {
strokeWidth: 2,
lineDash: [4, 4],
lineWidth: 0.5,
stroke: "#9a9a9a",
opacity: 0.8,
},
},
},
tickLine: null,
title: false,
visible: true,
label: {
style: {
fontSize: 16,
fontWeight: "normal",
fontFamily: "Microsoft YaHei",
},
autoHide: true,
formatter: null,
},
},
label: {
position: "top",
style: {
fill: "#000",
fontSize: 16,
fontWeight: "normal",
opacity: 1,
},
},
legend: false,
minColumnWidth: 9,
maxColumnWidth: 9,
columnStyle: {
radius: 0,
fill: "rgba(0,255,130,1)",
fillOpacity: 0.6,
stroke: "rgba(0,255,130,1)",
lineWidth: 2,
},
renderer: "canvas",
xField: "x",
yField: "y",
supportCSSTransform: true,
});
columnPlot.render();
```
### 🏞 Expected result
能够正常显示
### 🚑 Any additional [like screenshots]

* **G2Plot Version**: latest
* **Platform**: windows
Contributor guide
Research direction
Start with the Column chart reproduction in the issue, focusing on the xAxis label configuration and the label settings used with the provided data. Compare the rendered labels with the expected result and trace the label layout behavior. Done means all category labels display correctly in this example without unintended truncation.
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