Add a legend to the comment section of per-graph CSV files

Based on a discussion in #25387 (moved):

For the legend descriptions we should open a new ticket as part of the sponsor13 work?