Adds legend feature