Add legend to the table