繁体   English   中英

d3 v4从对象_data_访问x和y值

[英]d3 v4 accessing x and y value from Object _data_

转换属性中的dx和dy返回“未定义”。

   this.nodeElements = this.nodeGroup.selectAll('circle')
  .data(this.sensors);

console.log(this.sensors[0].x); // this returns the correct x value


const nodeEnter = this.nodeElements
  .enter()
  .append('svg:g')
  .attr('transform', d => 'translate(' + d.x + ', ' + d.y + ')');
  • 如何获得定义的dx或dy? 先感谢您。

该问题实际上与离子寿命周期有关。 谢谢。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM