add legend to chart.