I am fairly new to javascrit and d3. I have a problem when trying to read data from a csv file using d3.csv method.
d3.csv("csv").then(function(x) {
x.forEach(function(d){
d.Deviations= +d.Deviations;
d.EmotionCount= +d.EmotionCount;
d.NumberWord= +d.NumberWord;
d.SucRate= +d.SucRate;
d.Time2ans= +d.Time2ans;
data.push(d)
});
});
where data is an array with initially 1 element. Then I use this data to create a radar chart. The thing is that data.length returns 1 instead of the appropriate number of elements (118) and I can't display the other rows since I loop through data to create the visualization. What should I do to get the length == 118. Thank you