How best to format and position legend in line chart when legend text is long? I always struggle when showing line chart with long legend title like this:



Is there any best practice to a chart with long legend title?

I try to show several alternatives below, but of course, it's not comprehensive.

(a) Stretch y-axis limit



(b) Put legend outside chart's body



(c) Shorten legend title



Update

I'm a researcher in computer science field. But, general discussions beyond research domains are also welcome.
When it's not too big, I recommend shrinking the legend font size and whitespace and reducing the complexity of the labels.  If it's very big, however, I recommend instead moving to a systematic coloring scheme and explaining the coloring scheme in the caption rather than a legend.