add number formatting on legend, code formatting