Add doc for setLegend