added legend to pie graph