fix bug with gradientColor 

Fix bug with gradientColor in legend