Hello,
I am having trouble adjusting a modulus that I have created
for ($i=1; $i<=11; $i++){
$field = 'zone'.($i).'_id';
$this->zoneColors[$i] = $row[$field] % 11 ;
When I build my switch
function showShapeColor($color){
strtolower($color);
switch($color){
case 1:
return "#ff0000";
break;
case 2:
return "#0000ff";
break;
case 3:
return "#00ff00";
break;
case 4:
return "#FF6600";
break;
case 5:
return "#CC00CC";
break;
case 6:
return "#996600";
break;
case 7:
return "#FFCC00";
break;
case 8:
return "#5a6d24";
break;
case 9:
return "#CC9999";
break;
case 10:
return "#CDDF60";
break;
case 11:
return "#44e2f1";
break;
case 12:
return "#4feff1";
break;
default:
return "#ffffff";
break;
}
}
Occasionally I will have overlapping values ie
int(5) may be attached to more than one record thus giving 2 rows the same color. I need to build a way to check for this so that if that happens one of the 5's will be #f5f5f5 and the other will be the regular color. Kind of lost on how.
Thanks