add legend for chart; adjust the style of chart