Hi guys,
I have been working on a Dashboard for a little while. I have quite a few charts that all pull from different layers in my map. These layers have the same spatial files with the same feature names, BUT just with different data depending on the subject (total funding, population etc)
I was hoping to find a way to automatically change the chart colours to match a feature. For example through an if statement. If feature equals this then color it red, etc.
I think this might have to be done in the JSON behind the dashboard using AGO Assistant https://ago-assistant.esri.com/
Is anybody able to guide me in the right direction as to where in the JSON this might work and how to format it?
Thank you
Hi,
You can use arcade to do the color change using a function
var color_map = {
'funding': '#ff0000', // red
'population': '#00ff00', // green
'credit': '#0000ff' // blue
};
function findColor(field) {
return color_map[field];
}