Long legend string needs split with new-line

My series data is identified by “key” and “name” labels. I’d like to include those both in the panel, but they often are too long and overlap into the next panel. Is it possible to insert a newline character between the fields?

what visualization are you using? Can you share a screenshot?

My visualization is a Stat on a time-series; labels are derived from source-code for java micro-services. The identifiers map to a project key which would be from the source path, e.g. ; org.apache.tomcat and a project_name identifier, which would provide a simpler descriptor, such as 'Tomcat Server`.
My wish is that I could split the lines so they don’t take up more space than the panel allows, avoiding: