We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
axis 支持了 d3-format,tooltip 居然不支持,有点不合理。
tooltip 的 labelFormatter 和 axis 的一样,可以支持 d3-format
官方示例修改
import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', theme: 'classic', autoFit: true, paddingLeft: 100, }); chart .interval() .data([ { name: 'MODIFY', value: 138, washaway: 0.21014492753623193 }, { name: 'PRERELEASE', value: 109, washaway: 0.5596330275229358 }, { name: 'RELEASING', value: 48, washaway: 0 }, ]) .encode('x', 'name') .encode('y', 'value') .encode('color', 'name') .encode('size', 80) .axis('y', { labelFormatter: '.0%' }) .tooltip({ channel: 'y', labelFormatter: '.0%' }); chart.render();
G2 5.0.4
The text was updated successfully, but these errors were encountered:
这个 API 是 valueFormatter:
import { Chart } from '@antv/g2'; const chart = new Chart({ container: 'container', theme: 'classic', autoFit: true, paddingLeft: 100, }); chart .interval() .tooltip({ channel: 'y', valueFormatter: '.0%' }); chart.render();
Sorry, something went wrong.
Sorry,看错文档了 😂
No branches or pull requests
问题描述
axis 支持了 d3-format,tooltip 居然不支持,有点不合理。
期望结果
tooltip 的 labelFormatter 和 axis 的一样,可以支持 d3-format
如何重现
官方示例修改
额外信息
G2 5.0.4
The text was updated successfully, but these errors were encountered: