// last line doesn't work
var gaugeNiddle = d3.svg.arc()
.startAngle(gaugeCircleX(0))
.endAngle(gaugeCircleX(1))
.outerRadius(gaugeCircleY(config.radius))
.innerRadius(gaugeCircleY(0.3*config.radius));
gaugeGroup.append("path")
.attr("d", gaugeNiddle)
.style("fill", "001010")
.attr('transform','translate('+config.radius+','+config.radius+')');
// here is stop working
gaugeNiddle.transition().duration(1000).attr('innerRadius',250);
答案 0 :(得分:-1)
知道了。应该是:
var gaugeNiddle = gaugeGroup.append("path")
.attr("d", gaugeNiddle)
.style("fill", "001010")
.attr('transform','translate('+config.radius+','+config.radius+')');