[FIX] Eliminate unwanted items from legend

* add check 'hasOwnProperties' for colorMaps in 'for...in' loops -> this removes inherited properties in Arrays which come from String.prototype and Object.prototype