Add legend option

Add a legend option that replicates the selected functionality