I am trying to use d3.js to draw line chart.
Javascript
function lineChart(){
...
}
function update(){
...
var lineChart = lineChart()
.x(d3.scale.linear().domain([2011, 2014]))
.y(d3.scale.linear().domain([0, 1000000]));
...
}
But the console says that Uncaught TypeError: lineChart is not a function
.
How to fix this?