d3.svg.line() error: Uncaught TypeError: Cannot read property 'line' of undefined
<p>I am using the following code to try to draw a path using d3.js
I have tried various code examples on the web about the same and have been getting the same error everywhere. </p>

<p>Following is the JS: </p>

<pre><code>&lt;script type="text/javascript"&gt;
    var svg;
    //The data for our line
 lineData = [ { "x": 1,   "y": 5},  { "x": 20,  "y": 20},
                 { "x": 40,  "y": 10}, { "x": 60,  "y": 40},
                 { "x": 80,  "y": 5},  { "x": 100, "y": 60}];

//This is the accessor function we talked about above
var lineFunction = d3.svg.line()
                         .x(function(d) { return d.x; })
                         .y(function(d) { return d.y; })
                         .interpolate("linear");

//The SVG Container
var svgContainer = d3.select("body").append("svg:svg")
                                    .attr("width", 200)
                                    .attr("height", 200);

//The line SVG Path we draw
var lineGraph = svgContainer.append("path")
                            .attr("d", lineFunction(lineData))
                            .attr("stroke", "blue")
                            .attr("stroke-width", 2)
                            .attr("fill", "none");
    &lt;/script&gt;
</code></pre>

<p>The error is: <strong>Uncaught TypeError: Cannot read property 'line' of undefined</strong></p>

<p>This comes at the following line: <code>var lineFunction = d3.svg.line()</code></p>

<p>I am not sure what 'undefined' means here. Any leads?</p>