added legend in the chart