There is an issue of white space in legends to the right of the labels. I've found elsewhere on a forum that turning wrapping off is the best solution, but the post only involved doing that by hand. Does anyone know if that can be done by working in Python with the CIM? I've been investigating a legend object I made and it seems impossible. There's a way to set an absolute width, but obviously I need the width to be determined by the length of the labels.
I just ended up finding the length of the longest expected legend item text and multiplying it by a number based on the font size and setting the labelWidth to that. But it's a little jenky and I'd still like to know if there's another way.