Added the legend directive