I am using the Meteor Tabular package which implements DataTables. I am trying to create a table from a Mongo collection. The collection has one document of the form
{
input: Array[365],
output: Array[365],
date: Array[365]
}
I define the table in Meteor with the following code
TabularTables.MyTable = new Tabular.Table({
name: "MyTable",
collection: MyTable,
columns: [
{data: "input", title: "Input", searchable: false},
{data: "output", title: "Output", searchable: false},
{data: "date", title: "Date", searchable: false}
],
order: [[1, "desc"]],
pageLength: 10
});
The problem is that when this is drawn, all 365 elements of each variable end up in a single cell, so I have one massive row. I want each element to be created in a separate row, i.e.
Input Output Date
input[0] output[0] date[0]
input[1] output[1] date[1]
whereas it is currently
Input Output Date
input[0...364] output[0...364] date[0...364]