title: multiple lines d3
body: <p>I'm trying to do a simple plot with d3. It works fine when I plot only one line at time but I would like to make my code more generic.</p>
  
  <p>My data are in this format (note that the 2 set of data may not contain the same amount of point and the time is not perfectly synchronize between my 2 sets of measure): </p>
  
  <blockquote>
    <p>var data = [{key: "kmm03", value:[{"time":1364108443000,"mesure":"1.6299999952316284"},{"time":1364108503000,"mesure":"1.100000023841858"},{"time":1364108563000,"mesure":"1.159999966621399"}},
    {key: "kmm04", value:[{"time":1364108416000,"mesure":"2.690000057220459"},{"time":1364108476000,"mesure":"3.319999933242798"},{"time":1364108536000,"mesure":"3.140000104904175"},{"time":1364108596000,"mesure":"2.9800000190734863"}}]</p>
  </blockquote>
  
  <p>Now I try to plot it like this but I cannot get the svg lines to dispay:</p>
  
  <pre><code>    var margin = {top: 20, right: 40, bottom: 20, left: 40};
      var width = 780 - margin.left - margin.right,
      height = 250 - margin.top - margin.bottom;
  
  
      var time_scale = d3.time.scale()
          //.domain(time_extent)
          .domain([1364108443000, 1364112559000])
          .range([0, width]);
  
      var mesure_scale = d3.scale.linear()
          .domain([0,10])
          .range([height, 0]);
  
      var vis = d3.select("#box1")
      .append("svg:svg")
      .attr("width", width + margin.left + margin.right)
      .attr("height", height + margin.top + margin.bottom)
      .attr("transform", "translate(" + margin.left + "," + margin.top + ")");
  
  
  
      var time_axis = d3.svg.axis()
          .scale(time_scale)
          .orient("bottom");
      var mesure_axis = d3.svg.axis()
          .scale(mesure_scale)
          .orient("left");
  
      var set_axis_t = vis.append("svg:g")
        .attr("transform", "translate(0, " + height +")")
        .call(time_axis);
  
      var set_axis_m = vis.append("svg:g")
      .attr("transform", "translate(0, 0)")
      .call(mesure_axis);
  
  
      var line = d3.svg.line()
          .x(function(d){return time_scale(d.time);})
          .y(function(d){return mesure_scale(d.mesure);});
  
      var group = vis.selectAll('path')
         .data(data)
         .enter().append('path')
         .attr("d", line);
  </code></pre>