I have an object which has a set of numbers
> var size = d3.values(data[0]);
>size
output:
["0", "14.71", "50.0", "35.29"]
>typeof(size);
output:
"object"
I want to sum up the width and get an output like below:
[0, 14.71, 64.71, 100]
But the output which I got is as below:
>var width = [size[0],
size[0]+size[1],
size[0]+size[1]+size[2],
size[0]+size[1]+size[2]+size[3]];
>width
output:
["0", "014.71", "014.7150.0", "014.7150.035.29"]
Please help me fix this. Thanks in advance...