Sum Coloumn using footercallback doesn't work
Sum Coloumn using footercallback doesn't work
Hi,
I'm tryng to use footercallback for sum the secound coloumn of my table (exposure) this value is a string but contain a double value.
The table is componed with just two fields the first: country the second; exposure, so I just need to sum the exposure in a total field to show in footer.
The table is filled dinamically like this:
The script is the following
var t = $('#aggrexp').DataTable();
<% for (int u = 0; u < country_geo.length; u++) {%>
<% DecimalFormat dfn = new DecimalFormat("#.##");
Double temp = Double.parseDouble(exp_geo[u]);
String exp = dfn.format(temp);%>
<%if (country_geo[u] == null) {
country_geo[u] = "";
}%>
t.row.add(['<%=country_geo[u]%>', '<%=exp%>']).draw();
<% }%>
I see correctly the data, I see the field Total in footer but the sum is empty.
Please find below the link of JsBin: http://jsbin.com/cetemevuvo/edit?html,js,output
Could you please help me?
Thank you.