title: Changing data for selected D3 object
body: <p>I'd like to change the x value in the data variable for my line object while I'm changing the x1 and x2 attributes. How do I do that? See code and image below.</p>
  
  <pre><code>function updateBorder(x, whichBorder) {
      temp_border = svg.selectAll(whichBorder)
      .attr("x1", x)
      .attr("x2", x);
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/qHpR1.png" alt="enter image description here"></p>