添加c3.js填充而不切断点(Adding c3.js padding without cutting off points)

编程入门 行业动态 更新时间:2024-10-28 18:24:34
添加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

更多推荐

本文发布于:2023-07-22 00:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1215483.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:而不   js   Adding   points   cutting

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!