Handle non-image legends, and allow legends to be collapsed.