我一生都无法弄清楚为什么我的观点没有得到体现。我唯一能想到的是我的体重以某种方式下降,但是如果是这样的话,由于数字看起来正确,我不确定如何。帮助!
这里的plunker .. http://plnkr.co/edit/U48zrI
var x = d3.scale.linear()
.range([0, width]);
var y = d3.scale.linear()
.range([height, 0]);
svg.append('points').selectAll('circle')
.data(plotPoints)
.enter()
.append('circle')
.attr('cx', function (d) {console.log(d.score); return x(d.score);})
.attr('cy', function (d) {console.log(y(0.002)); return y(0.002);})
.attr('r', 3)
.attr('class','red');
没有SVG元素,将点更改为g:
svg.append('g').selectAll('circle')
.data(plotPoints)
.enter()
.append('circle')
.attr('cx', function (d) {console.log(d.score); return x(d.score);})
.attr('cy', function (d) {console.log(y(0.002)); return y(0.002);})
.attr('r', 3)
.attr('class','red');
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句