Can you help me with the if else syntax for an online symbology expression in ArcGIS Online?
My code is
if ($feature.kayam<= 0 < 10 ){
return "rgb(103, 0, 31)";
} else if ($feature.kayam<= 10 < 20 ){
return "rgb(182, 32, 47)";
}else if ($feature.kayam<= 20 < 30 ){
return "rgb(221, 111, 89)";
} else if ($feature.kayam<= 30 < 40 ){
return "rgb(247, 183, 153)"
} else if ($feature.kayam<= 40 < 50 ){
return "rgb(250, 231, 221)";
} else if ($feature.kayam<= 50 < 60 ){
return "rgb(226, 237, 243)";
} else if ($feature.kayam<= 60 < 70 ){
return "rgb(167, 208, 228)";
} else if ($feature.kayam<= 70 < 80 ){
return "rgb(85, 158, 201)";
} else if ($feature.kayam<= 80 < 90 ){
return "rgb(37, 107, 175)";
} else if ($feature.kayam<= 90 < 100 ){
return "rgb(5, 48, 97)"}
Only the first value returns without continuing to the second or third color.
$variable <= min < max
is valid? My guess would be$variable >= min && $variable < max
. That is, if the variable needs to be between those two values.