添加c3.js填充而不切断点(Adding c3.js padding without cutting off points)
我从图表中删除了填充,但因此出现了另一个问题 - 我的文本被截断。
我明白,不可能显示第一个点和文本(由于Y轴线),我想从第一个点删除文本,第一个点出现在OY线上方 - 它有可能如何?
另一个问题 - 如何解决切割最后一点的问题?
先谢谢你。
I'd removed padding from my chart, but therefore got another problem - my text is cut off.
I understand, that it is not possible to show first point and text ( due to Y line axis), I would like to remove text from first point and first point appear above OY line - how it's possible?
Another question - how to solve problem with cutting last point?
Thank you in advance.
最满意答案
如果填充没有做你想要的,你可以尝试这一点的CSS:
.c3-texts .c3-text:first-child { text-anchor: start; } .c3-texts .c3-text:last-child { text-anchor: end; }这应该将第一个和最后一个标签保留在图表的范围内
If padding isn't doing what you want, you could try this bit of css:
.c3-texts .c3-text:first-child { text-anchor: start; } .c3-texts .c3-text:last-child { text-anchor: end; }This should keep the first and last labels within the confines of the chart
更多推荐
发布评论