Fixed bug that didn't format the number while displaying the legend