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
现在 boundaryGap 这个选项配合 scale: true 使用时,让我有些纠结(只对于Y轴)。
boundaryGap
scale: true
在原始数据的最值相差悬殊时,如果填小了,例如 [0.1, 0.1] 最大值的 0.1 差额依然会很大,最小值的 0.1 差额就很小。如果大部分数据都偏小的话,这样会让整条线偏低,几乎紧贴X轴了。当然,也可以把最小值的比率加高,但是实在太悬殊的话,就算是 0.9 也效果也不好。
[0.1, 0.1]
所以我建议这个比率改乘以最值之差,(max - min) * boundaryGap[i] 而不是最值本身。这样比率一样的话,上下能留出相同高度的空白,保持线条居中。而且,如果原始数据最小值是不是负数,那么Y轴最小值也应该是0。
(max - min) * boundaryGap[i]
虽然我可以用 min 和 max 来自定义,但是发现切换到堆叠时状态时或拖曳重算时,Y轴没变动,会线条会超出格子背景。
min
max
或者 boundaryGap 能够接受一个函数,在Y轴需要变动时调用,参数是两个最值(原始/堆叠/拖曳后的数据),让用户自己来算合适的,接受返回的 [min, max]。
[min, max]
The text was updated successfully, but these errors were encountered:
这就是真实应用的思考反馈,很好的建议,下个版本升级。
Sorry, something went wrong.
support #523
667a9de
No branches or pull requests
现在
boundaryGap
这个选项配合scale: true
使用时,让我有些纠结(只对于Y轴)。在原始数据的最值相差悬殊时,如果填小了,例如
[0.1, 0.1]
最大值的 0.1 差额依然会很大,最小值的 0.1 差额就很小。如果大部分数据都偏小的话,这样会让整条线偏低,几乎紧贴X轴了。当然,也可以把最小值的比率加高,但是实在太悬殊的话,就算是 0.9 也效果也不好。所以我建议这个比率改乘以最值之差,
(max - min) * boundaryGap[i]
而不是最值本身。这样比率一样的话,上下能留出相同高度的空白,保持线条居中。而且,如果原始数据最小值是不是负数,那么Y轴最小值也应该是0。虽然我可以用
min
和max
来自定义,但是发现切换到堆叠时状态时或拖曳重算时,Y轴没变动,会线条会超出格子背景。或者
boundaryGap
能够接受一个函数,在Y轴需要变动时调用,参数是两个最值(原始/堆叠/拖曳后的数据),让用户自己来算合适的,接受返回的[min, max]
。The text was updated successfully, but these errors were encountered: