a function to display numbers into charts