G2Plot
G2Plot copied to clipboard
🐛 [BUG] 柱图label显示不全
🐛 Bug description [Please make everyone to understand it]
Please provide a link by forking these links G2Plot or GitHub repo, a minimal reproduction.
- Required Link to minimal reproduction:
📷 Step to reproduce
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
虽然appendPadding 可以用,但是还是希望可以有自动调整的机会