I added a table widget and connected it with a table in a dashboard. I want to format select cell values. I'm think I could manage this with Arcade, similar to what's below. Is there a way to handle this table formatting in a dashboard?
var bld = Concatenate('<strong>'+$feature.LT2_Difference+'</strong>')
# Format where values are less than or equal to -1
var val = When($feature.LT2_Difference <= -1, bld, $feature.LT2_Difference);
return{
LT2_Difference: {
displayText : val,
textColor: '',
backgroundColor: '#e0e0e0',
textAlign: 'left',
iconName: '',
iconAlign: '',
iconColor: '',
iconOutlineColor: ''
}
}
Solved! Go to Solution.
You can find the Advanced Formatting for tables under the Values tab. Each column will have its own section of the return statement.
Thank you, I misspoke and realize I was trying in Experience Builder, not a Dashboard. I got a minimum working example with your response, in a Dashboard.
var bgcolor = When($datapoint.diffVal <= -1, '#CC0000', '')
var tcolor = When($datapoint.diffVal <= -1, '#111', '')
return
return {
cells: {
LT2_Difference: {
displayText : $datapoint.diffVal,
textColor: tcolor,
backgroundColor: bgcolor,
textAlign: 'right',
iconName: '',
iconAlign: '',
iconColor: '',
iconOutlineColor: ''
},
}
}
You can find the Advanced Formatting for tables under the Values tab. Each column will have its own section of the return statement.
Thank you, I misspoke and realize I was trying in Experience Builder, not a Dashboard. I got a minimum working example with your response, in a Dashboard.
var bgcolor = When($datapoint.diffVal <= -1, '#CC0000', '')
var tcolor = When($datapoint.diffVal <= -1, '#111', '')
return
return {
cells: {
LT2_Difference: {
displayText : $datapoint.diffVal,
textColor: tcolor,
backgroundColor: bgcolor,
textAlign: 'right',
iconName: '',
iconAlign: '',
iconColor: '',
iconOutlineColor: ''
},
}
}
Is there a plan to allow for value formatting options (e.g. Setting Digit grouping, Maximum decimal places, etc.) directly to the ArcGIS Dashboard table widget to avoid the need to use Arcade within Advanced Formatting?