I comment I'm trying to use DataTables making a WebServices to another server, which returns an array in Javascript with the following values :
[
["2017-05-25 23:10:00","0","100","17.2"],
["2017-05-25 23:20:00","0","100","17.2"],
["2017-05-25 23:30:00","0","100","17.2"],
["2017-05-25 23:40:00","0","100","17.1"],
["2017-05-25 23:50:00","0","100","17.1"],
["2017-05-26 00:00:00","0","100","17"]
]
Code:
<script src="js/jquery.js"></script>
<script
src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js">
</script>
<script
src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js">
</script>
<script
src="https://cdn.datatables.net/select/1.2.2/js/dataTables.select.min.js">
</script>
<head>
<title>tablas</title>
<script>
$('#example').DataTable( {
"processing": true,
"serverSide": true,
"ajax": {
"url": "servidor remoto",
"type": "POST",
},
});
</script>
</head>
<body>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>dato1</th>
<th>dato2</th>
<th>dato3</th>
<th>dato4</th>
</tr>
</thead>
</table>
</body>
You would need to format those values with jQuery and present them in the table.