javascript - D3js graph not generating: no errors on console -


I'm new to svg and d3j and

  $ ('#to') . ('Change', function () {var endDate = new date (date.parse ($ ('' to ''). Val ()); var width = 1024; var height = 500; var margin = {top: 20, right: 20, top: 20, bottom: 20}; var paracetate = D. time format ("% x% H") .pars; var xAxis = d3.svg.axis () scale (x) .core ("bottom") .tix (30); var yAxis = d3.svg.axis (). Scale (y) core ("left"). Tix (30); var velvilyn = d3 svg.line ( ) .x (function (d) {return x (d.timestamp);}). Y (function (d) {return y (d.phaseOne); return y (d.phaseTwo); return y (D.phaseThree) ;}); Var svg = d3.select ("# graph") .append ("svg" ) .attr ("width", width + margin.left + m Argin.right) .attr ("height", height + margin.top + margin.bottom) .append ("g") .attr ("transform", "Translate (" + margin.left + "," + margin top. "); Var x = d3.time.scale (). Category ([0, width]); Var y = d3.scale Linear (.) Category ([height, 0]); D3.json ('& lt ;? php echo base_url ();? & Gt; upload / & lt ;? php echo $ username ;; & gt; .json' , Function (error, data) {data.forEach (function (d) {D.timestamp = parseDate (d.timestamp); D.pday_chan1 = + d.day_chan1; Ddday_chan2 = + d.day_chan2; Ddday_chan3 = + d.day_chan3;}); X.domain (d3.extent (data, function (d) {return d.date;})); Y.domain ([0, d3.max (data, function (d) {return d.day_chn1;}))); Y.domain ([0, d3 max (data, function (d) {return d.decken2;})); Y.domain ([0, d3.max (data, function (d) {return d.de_day 3;}))); SVG.Append ("Path") .attr ("d", valueline (data)); Svg.append ("g") // X axis add .attr ("square", "x axis") .attr ("transform", "translation (0," + height + ")" .class (xAxis); Svg.append ("g") // Add Y axis .attr ("class", "y axi s") .col (yAxis;;)); });  

Rather than making a line, instead of trying to generate three lines, this code does not display any errors, and I am confused when I should start debugging. Any pointers would be appreciated.


Comments