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

5.X版本x轴旋转不使用默认自动旋转90度,如何设置自定义旋转角度 #6403

Open
InewBird opened this issue Aug 19, 2024 · 2 comments

Comments

@InewBird
Copy link

问题描述

5.X版本x轴旋转不使用默认自动旋转90度,如何设置自定义旋转角度,

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@fengzhiyuanworks
Copy link

`import { Chart } from '@antv/g2';

const data = [
{ letter: 'A', frequency: 0.08167 },
{ letter: 'B-a12121212s', frequency: 0.01492 },
{ letter: 'C-', frequency: 0.02782 },
];
const chart = new Chart({
container: 'container',
autoFit: true,
});

chart.interval().data(data).encode('x', 'letter').encode('y', 'frequency').axis('x',{
transform:[],
labelAutoRotate:{
optionalAngles:[45],
recoverWhenFailed:false
}
});

chart.render();
`

1 similar comment
@fengzhiyuanworks
Copy link

`import { Chart } from '@antv/g2';

const data = [
{ letter: 'A', frequency: 0.08167 },
{ letter: 'B-a12121212s', frequency: 0.01492 },
{ letter: 'C-', frequency: 0.02782 },
];
const chart = new Chart({
container: 'container',
autoFit: true,
});

chart.interval().data(data).encode('x', 'letter').encode('y', 'frequency').axis('x',{
transform:[],
labelAutoRotate:{
optionalAngles:[45],
recoverWhenFailed:false
}
});

chart.render();
`

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

No branches or pull requests

2 participants