Added chart.generateLegend()

The template was expanded to include a legend element.