Not sure if you have solved this question yet, but if not I hope this helps. With the integration of arcade to the indicator widget it is possible to create a threshold.
- First, I created a variable, "var c" that references my value from the table in which I base my color.
- Next is an empty array, "var clr" that will hold the color from the if statement.
- Write your if statement and set the array variable equal to the hex color for each logic criteria.
- Finally I set the "backgroundColor" as the array variable.
var c = $datapoint.riskValue
var clr = []
if(c >= 0.00001 && c < 10){
clr = "#1d8aff"
}else if (c >= 10 && c < 30){
clr = "#fff70e"
}else if (c >= 30 && c < 100){
clr = "#ff7134"
}else if (c >= 100){
clr = "#ff0000"
}else {
clr = "#ebebeb"
}
return {
//textColor:'',
backgroundColor: clr,
topText: 'Tranmission Rate',
//topTextColor: '',
//topTextOutlineColor: '',
topTextMaxSize: 'x-small',
middleText: $datapoint["riskValue"],
middleTextColor: '',
middleTextOutlineColor: '',
middleTextMaxSize: 'large',
//bottomText: '',
//bottomTextColor: '',
//bottomTextOutlineColor: '',
//bottomTextMaxSize: 'medium',
//iconName:'',
//iconAlign:'left',
//iconColor:'',
//iconOutlineColor:'',
//noValue:false,
//attributes: {
// attribute1: '',
// attribute2: ''
// }
}
See website for great examples
https://www.esri.com/arcgis-blog/products/ops-dashboard/real-time/pushing-the-limits-of-arcade-in-da...
Cheers,
Heath