I have a csv file in the following format
type,1,2,3,4,5,6,7,8,.... // Upto 48
type1,54.69801915,84.4717406,81.87766667,66.48516667,...
type2,51.57399106,84.23170179,82.13950136,67.37540461,...
......
I wanna draw a line chart using this csv data with d3. Once I nest them using below code
d3.nest().key(function(d) {
return d.type;
}).entries(data);
My json looks as follow
{ key: "type1", values: […] }
and inside values it is just a single element array and the value of that is { 1: 54.69801915, 2: 84.4717406, 3: 81.87766667, … }
But my expectation is that that would be a array something similar to
{ { 1: 54.69801915}, {2: 84.4717406}, {3: 81.87766667}, … }
Can someone tell me what I am doing wrong here? Or how should I get my expected format?