Legend width is now determined dynamically based on the size of the text.