I have a feature layer with multiple fields (using unique-value renderer) of 4 different colours. I have applied clustering to it.
My first question is how is the colour of a cluster decided? Does it depend on the colour of the point that is occurring the most in that cluster?
And secondly, is there a way to give precedence to a particular field so that if the cluster has that particular field, it would take its colour.
I might not have articulated my question well, please excuse me for that.
> My first question is how is the colour of a cluster decided?
Be sure to expand the "Read more" area to read the details:
> is there a way to give precedence to a particular field so that if the cluster has that particular field, it would take its colour.
There isn't a great way to do this yet. We're evaluating providing an API for styling cluster features in a future release (not yet decided).
However, you can achieve this using Arcade and by changing the style of the base layer. You would need to specify an Arcade expression on the layer's renderer then set up two class breaks: one to symbolize clusters that have no features of the desired type and another that has at lease one. Here's an example:
In this app I color the clusters yellow if it contains at least one "ice quake". I can also provide the number of ice quakes in the popup. Hope that helps.