Regenerate statistics data on click using $ajax