You probably need to show that the statsData has values before the datatoggle event.