added legend to stack bar graph