Hi all,
I'm trying to change cluster color on unique-value renderer,
I was trying to figure it out but with no success.
here is what i have try to do:
var featureReduction = some custom feature reduction that works very good.
after that i added this for change cluster color based on feature status
const clusterRenderer = new EsriSimpleRenderer({
symbol: {
type: 'simple-marker',
style: 'circle',
size: 10,
color: [255, 255, 255, 0.8],
outline: {
color: [155, 89, 182, 1],
size: 10,
width: 2
}
},
visualVariables: [
{
type: "color",
valueExpression:
`// $feature gives you access to feature attributes.
var status = Decode($feature.Status,
"Inactive", 0, "Malfunction", 1
);
return status;`,
stops: [
{ value: 0, color: "white" },
{ value: 1, color: "red" }
]
}]
});
layer.FeaureReduction.rederer = clusterRenderer
after adding this the cluster dose not working at all....
please advice