d3.js - Changing data for selected D3 object -



d3.js - Changing data for selected D3 object -

i'd alter x value in info variable line object while i'm changing x1 , x2 attributes. how do that? see code , image below.

function updateborder(x, whichborder) { temp_border = svg.selectall(whichborder) .attr("x1", x) .attr("x2", x); }

you can modify info in d3 callbacks.

function updateborder(x, whichborder) { temp_border = svg.selectall(whichborder) .each(function (d) { d.x = x }) .attr("x1", x) .attr("x2", x); }

but mutating info in random places not idea.

d3.js

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -