I have 3 separate array's that i want to convert to one 2-dimensional array so i can use it for D3.js
Example of the arrays that i have:
var data1 = [ 0.10, 0.09, 0.08, 0.07, 0.06, ... ]; // series 1
var data2 = [ 0.10, 0.09, 0.08, 0.07, 0.06, ... ]; // series 2
var data3 = [ 0.10, 0.09, 0.08, 0.07, 0.06, ... ]; // series 3
What i want:
var data = [
[ 0.10, 0.09, 0.08, 0.07, 0.06, ... ], // series 1
[ 0.10, 0.09, 0.08, 0.07, 0.06, ... ], // series 2
[ 0.10, 0.09, 0.08, 0.07, 0.06, ... ] // series 3
];
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…