Generate legend, include in HTML.