fix bug with gradientColor 

Fix bug with gradientColor in legend
Merge pull request #166 from FVANCOP/legendFixBug

fix bug with gradientColor