added error function on donut chart