Added legend functionality to Bar chart