Make sure the value is a number and not a string for pie and doughnut charts