Javascript Array

Javascript Array

altorontoaltoronto Posts: 1Questions: 1Answers: 0
edited June 2016 in Free community support

Hi all, have a problem with rendering array in datable and here is my problem. Have 6 arrays (dates, values1, values2, values3, values4, values5), then I push them into master array (newArray),

e.g. values1(array1 example): [0.2,0.3,0.4,0.2,0.7,0.15]

newArray.push(array0, array1, array2, array3, array4, array5);

then I loaded master array in datatable,

```
var table2 = $('#trtable').DataTable( {
data: newArray,
"sDom": '<"top">rt<"bottom"p><"clear">'
});

Datatable looks like:

Dates | Value1 | Value2 | Value3 | Value4 | Value5

0.2 0.3 0.4 0.2 0.7 0.15
29/05/2010 11/05/2010 17/05/2010 19/05/2010 05/05/2010 18/05/2010
21 28 35 24 41 32
38 78 95 64 99 43
9 11 13 17 14 13.5
121 133 155 162 183 211

Problem: All of the values are in rows instead of columns.

Thank you in a advance!

This discussion has been closed.