Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【v5】padding auto 时 Y 轴 label false,图显示异常 #5337

Closed
Deathsteps opened this issue Jul 22, 2023 · 0 comments · Fixed by #5338
Closed

【v5】padding auto 时 Y 轴 label false,图显示异常 #5337

Deathsteps opened this issue Jul 22, 2023 · 0 comments · Fixed by #5338
Labels

Comments

@Deathsteps
Copy link
Contributor

问题描述

padding auto 时,Y 轴 label 关闭后,左右 padding 异常宽
image

期望结果

显示合理的 padding( i.e. 默认值?)

如何重现

官方代码修改

/**
 * A recreation of this demo: https://observablehq.com/@d3/bar-chart
 */
import { Chart } from '@antv/g2';

const chart = new Chart({
  container: 'container',
  theme: 'classic',
  autoFit: true,
  padding: 'auto',
});

chart
  .interval()
  .data({
    type: 'fetch',
    value:
      'https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv',
  })
  .encode('x', 'letter')
  .encode('y', 'frequency')
  .axis("y", {
    "label": false
  });

chart.render();

额外信息

  • G2 5.0.16 版本
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants