Created
November 7, 2014 18:08
-
-
Save alissonbovenzo/91f4ea6fa839a675e80c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj.series = _.map(replacement.series,function(origem){ | |
return _.extend(origem,{color: networkColors[origem.name.toLowerCase()]}); | |
}) | |
// obj.series = (function(){ | |
// var returnArray = []; | |
// var colors = ['#a92aa8','#5eabcf','#47539b','#c88010','#dd431b','#f23d79','#a92aa8']; | |
// angular.forEach(replacement.series,function(origin,kOrigin){ | |
// var temporalObject = {name:origin.name,color: '', data : []}; | |
// angular.forEach(origin.data,function(dataItem){ | |
// temporalObject.data.push(dataItem); | |
// }) | |
// /** @todo refactor */ | |
// switch(origin.name.toLowerCase()){ | |
// case 'youtube': | |
// temporalObject.color = '#a92aa8'; | |
// break; | |
// case 'foursquare': | |
// temporalObject.color = '#f23d79'; | |
// break; | |
// case 'google': | |
// temporalObject.color = '#dd431b'; | |
// break; | |
// case 'instagram': | |
// temporalObject.color = '#c88010'; | |
// break; | |
// case 'twitter': | |
// temporalObject.color = '#5eabcf'; | |
// break; | |
// case 'facebook':_ | |
// temporalObject.color = '#47539b'; | |
// break; | |
// case 'reclameaqui': | |
// temporalObject.color = '#8DCD36'; | |
// break; | |
// default: | |
// temporalObject.color = '#000'; | |
// } | |
// returnArray.push(temporalObject); | |
// }) | |
// return returnArray; | |
// }()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Otima, mas coloque o array networkColors também faz favor