[英]Not able to generate arc in d3,js for some values,
I am using d3.js to generate a circle kind of graph. 我正在使用d3.js生成圆形图。 My graph has three layers background,midground and foreground.
我的图有三层背景,中层和前景。 I have a function called call for foreground and midground layer.
我有一个称为前景和中间层调用的函数。
I am able to generate the arc for values till .96 but if it goes beyond that .97, .98, .99 and 1.0 arc are getting collapsed. 我可以生成直到.96的值的弧,但如果超出该范围,则.97,.98,.99和1.0弧会崩溃。
midground.transition()
.duration(750)
.call(arcTween, 0. * τ);
foreground.transition()
.duration(750)
.call(arcTween, 0. * τ);
I am new to d3.js and svg kindly help with this. 我是d3.js和svg的新手,请对此提供帮助。 I have provided the jsfiddle link as well.
我也提供了jsfiddle链接。 http://jsfiddle.net/Lxnymj28/1/
http://jsfiddle.net/Lxnymj28/1/
This setting is messing up the arc
calculation: 此设置使
arc
计算变得混乱:
.cornerRadius(outerRadius - innerRadius)
If you remove the cornerRadius, everything draws fine . 如果删除cornerRadius, 一切都会正常进行 。
EDITS 编辑
Did some research, this was a bug in the library , fixed back in October, 2015. You are using way out of date software. 做了一些研究,这是该库中的错误,该错误于2015年10月修复。您正在使用过时的软件。
If you use the latest version of d3.js version 3, everything works fine. 如果您使用最新版本的d3.js版本3,则一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.