Converted Legend list items to HTML dom elements