Merge legends

Extending only HorizontalLegend to cover Legend functionality.

Orignal PR #1415.