Skip to content Skip to sidebar Skip to footer

Making A Variable From A Csv File

I have worked out whats happening but not how to fix it, or even if its the best way of doing this (Unlikely). I have made a graph that reads from a csv file, this part works real

Solution 1:

I'm having a little trouble understanding what you're asking; if you want varNum to refer to the number of rectangles you're drawing, this code will work:

var varNum = data.length;
...
  .attr("width", function(d){return d.data * (graphWidth / varNum)});

Post a Comment for "Making A Variable From A Csv File"