本文介绍了如何防止在Chartjs中剪切比例标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在时遇到问题,其中以下列方式切除了比例标签:
I am having a problem with chartjs where the scale labels are being "cut off" in the following way:
[1]
是否可以设置边距?我没有在chartjs文档中看到任何有关此的内容,这些内容似乎包含在chartjs canvas元素内(意味着:未被另一个div覆盖)。
Is there a margin that can be set? I don't see anything in the chartjs documentation about this, and these seem to be contained within the chartjs canvas element (meaning: not covered by another div).
推荐答案
在值
之前添加带空格的比例标签选项。允许2个或更多空格。
Add scale label option with whitespace before value
. 2 or more whitespaces is allowed.
scaleLabel: "<%= ' ' + value%>"
这篇关于如何防止在Chartjs中剪切比例标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!