Added the option to toggle the legends in dendrogram