             magnitude: +d.magnitude
         ),
         ((error, data) ->
-            lc.drawData svg, data
+            lc.drawData data
         )
     )


    selector = '.lightcurve'
    lc = new LightCurve(selector)
    svg = lc.getSvg()
    csvUrl = $(selector).data 'csvSource'
    d3.csv(
        csvUrl,

                d3.scale.linear().range([0, @height]).nice()
            ]

        drawData: (data) ->
            [xScale, yScale] = @getScales()
            xScale.domain d3.extent data, (d) -> d.jd
            yScale.domain d3.extent data, (d) -> d.magnitude
            xAxis = d3.svg.axis().scale(xScale).orient('bottom').ticks(10)
            yAxis = d3.svg.axis().scale(yScale).orient('left').ticks(10)
            @svg.append('g')
                .attr
                    class: 'x axis'
                    transform: "translate(0,#{@height})"
                .call(xAxis.tickSize(-@height, 0, 0))
            @svg.append('g')
                .attr
                    class: 'y axis'
                .call(yAxis.tickSize(-@width, 0, 0))
            @svg.selectAll('circle')
                .data(data)
                .enter()
                .append('circle')
