Average in footer

Average in footer

x_fx_f Posts: 4Questions: 0Answers: 0
edited May 2012 in General
Hello,

is anyway to add in footer a calculated average for some columns?
I found some % stuff, but no average and for multiple columns. I mean over complete table and not for current view.

e.g.
[code]
Name -A-- -B-- -C-- -D--
===================
KZAS 2.00 3.00 1.00 7.00
AZSD 7.00 4.00 6.00 3.00
PZGH 2.00 3.00 9.00 7.00
RZGT 5.00 3.00 2.00 5.00
===================
----- 4.00 3.25 4.50 5.50
[code]
Is some Code existing of have i try myself or provide with server

thx :)

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Is the average not just a trivial modification of my example code here: http://datatables.net/release-datatables/examples/advanced_init/footer_callback.html ? Rather than calculating a percentage on the last line of the function, just calculate an average.

    Allan
  • x_fx_f Posts: 4Questions: 0Answers: 0
    THX, right now calc it on server :) works fine
This discussion has been closed.