added legend for charts