title: Refresh one chart according to the action in another chart in d3.js V4
body: <p>I have two d3 charts in separate divs on a single page. After clicking on bar, the line chart should update accordingly for e.g. the click action on specific bar, should add an appropriate line to a line chart in another div. I am able to create a click action on bar. How can I use this action from bar chart to update a line chart accordingly. Here is my <a href="https://plnkr.co/edit/VSi2obfAHEqA7gIrWPad" rel="nofollow noreferrer">plunker</a> code. </p>
  
  <pre><code>bar_svg.selectAll("#bar_chart")
  .data(TOP_TEN_CHANNELS)
  .enter().append("rect")
  .on("click", function (d){
  console.log("inside_bar_fucntion "+ d.channel);
  })
  </code></pre>