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
修改scale下的tickCount属性,tickCount =3或者tickCount =4,图形上都只有2个网格线。tickCount=5时,展示4个网格线
The text was updated successfully, but these errors were encountered:
tickCount 只是一个提示,并不是最终的生成的 ticks 的数量。因为需要保证 tick 的可读性(尽量是 1,2,5,10 的倍数),所以会调整 tick 的数量。如何希望 ticks 的数量和 tickCount 一致,可以自定义 tickMethod 方法。(如下)
chart.scale("score", { min: 0, // max: 80, nice: true, // 网格隐藏 tickCount: 5, tickMethod: ({min, max, tickCount}) => { const step = (max - min) / tickCount; return new Array(tickCount).fill(0).map((_, i) => min + i * step); } });
Sorry, something went wrong.
No branches or pull requests
Reproduction link
Steps to reproduce
修改scale下的tickCount属性,tickCount =3或者tickCount =4,图形上都只有2个网格线。tickCount=5时,展示4个网格线
The text was updated successfully, but these errors were encountered: