title: D3 - change formatting if a column in the data exists
body: <p>I have a json going to D3:</p>
  
  <pre><code>{"time": "foo1", "values1": "bar1", "values2": "val1"}
  {"time": "foo2", "values1": "bar2", "values2": "NULL"}
  {"time": "foo3", "values1": "bar3", "values2": "val2"}
  {"time": "foo4", "values1": "bar4", "values2": "NULL"}
  </code></pre>
  
  <p>It produces a line-graph of <code>values1</code> against <code>time</code>, with circular points on it, generated, by this:</p>
  
  <pre><code>var circles = svg.selectAll("circle")
                  .data(data);
              circles.exit().remove();
              circles.enter().append("circle")
                 .attr("r", 2)
                 .merge(circles)
                 .attr("cx", function(d) { return x(d.time); })
                 .attr("cy", function(d) { return y(d.values1); });
  </code></pre>
  
  <p>There is then a bit of CSS to define the colour of the circles. This all works fine.</p>
  
  <p>Is it possible to have a circle rendered in a different colour if <code>values2</code> from the same time stamp is not NULL?
  For example, from line one of the data, a point would sit at <code>(foo1,bar1)</code>, and be black, because <code>values2</code> is not null, whereas, from the line below, the point would be rendered at <code>(foo2,bar2)</code>, and be red, because <code>values2</code> is null.</p>
  
  <p>Perhaps two separate sets of circles would be appropriate, this seems the most obvious solution, but I'm still not sure how to implement the condition.</p>