update legend and text formatting