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

设置 padding 或者 size 之后设置 hide 为 transform #5602

Closed
pearmini opened this issue Sep 27, 2023 · 0 comments · Fixed by #5660
Closed

设置 padding 或者 size 之后设置 hide 为 transform #5602

pearmini opened this issue Sep 27, 2023 · 0 comments · Fixed by #5660
Milestone

Comments

@pearmini
Copy link
Member

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

const chart = new Chart({
  container: 'container',
  autoFit: true,
  paddingBottom: 10, // 设置了 bottom
});

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', { labelFormatter: '.0%' })
  .axis('x', {
    labelFormatter: (d) => d + 'aaaaa',
    transform: [{ type: 'hide' }], // 不需要设置这一行
  }); 

chart.render();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant