I have a JS API 4x web application that uses a Feature Layer that is populated client-side by data coming from a web socket. I am trying to use the ColorExpression to vary the color on the symbol.
Solved! Go to Solution.
Your Arcade expression appears to be missing a default value in the Decode function. Add another param, like the number 3, or null so the expression can properly evaluate.
var code = Decode(color, '#990000', 0, '#006600', 1, '#000000', 2, null);
Your Arcade expression appears to be missing a default value in the Decode function. Add another param, like the number 3, or null so the expression can properly evaluate.
var code = Decode(color, '#990000', 0, '#006600', 1, '#000000', 2, null);