var sampleData = range(0, 40).map(function(i) {
return {
Number: i,
Square: Math.pow(i, 2),
Cube: Math.pow(i, 3)
}
});
$('#table').Meliorator('table', {
data: sampleData,
tableClass: 'originalTable'
});
Number | Square | Cube |
---|---|---|
0 | 0 | 0 |
1 | 1 | 1 |
2 | 4 | 8 |
3 | 9 | 27 |
4 | 16 | 64 |
5 | 25 | 125 |
6 | 36 | 216 |
7 | 49 | 343 |
8 | 64 | 512 |
9 | 81 | 729 |
10 | 100 | 1000 |
var parsedDataSet = $.makeArray(
$('.originalTable').Meliorator('parse-table')[0]
);
Number | Square | Cube |
---|---|---|
0 | 0 | 0 |
1 | 1 | 1 |
2 | 4 | 8 |
3 | 9 | 27 |
4 | 16 | 64 |
5 | 25 | 125 |
6 | 36 | 216 |
7 | 49 | 343 |
8 | 64 | 512 |
9 | 81 | 729 |
10 | 100 | 1000 |
$('#analytics').Meliorator('analytics-panel', {
data: parsedDataSet
});