We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
预期应该是不超过X轴
请问这是正常吗,或是使用错误?
示例代码:
/** * 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, }); 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%' }) .scale("y", { domainMin: 0.1 }); chart.render();
The text was updated successfully, but these errors were encountered:
柱形图其实 y 是有两个,一个是底部,一个是顶部,只是默认底部为 0 而已。如果期望设置底部为 0.1 开始,那可以这样写。
.encode('y', [0.1, 'frequency']) .scale('y', { domainMin: 0.1 })
Sorry, something went wrong.
这个是合理的,因为条的下边界的数据是 0。除了上诉方法之外,还可以:
const chart = new Chart({ clip: true // 隐藏超出绘制区域的地方 })
或者
interval().scale('y', { domainMin: 0.1 clamp: true });
No branches or pull requests
预期应该是不超过X轴
请问这是正常吗,或是使用错误?
示例代码:
The text was updated successfully, but these errors were encountered: