The title probably isn't a great description of what I'm trying to do.
I have 3 indicators, they each display the attribute of polygon that intersects a specific point. Sometimes there are no polygons that intersect. When this happens the widget uses the "No data" configuration under General in the widget configuration. This is as expected. HOWEVER! I cannot figure out how to get the text I decide to display in the same manner as if there was data.
The first two indicators pull the attribute as there is an intersecting polygon so they work as expected. The last indicator has no intersecting polygon so it uses the No data display. I cannot figure out how to get the "NONE" to format and be responsive as the "TSTM" in the other indicators are. It's visually jarring that the text is not vertically aligned the same.
Maybe I've overlooked something. Ideas are appreciated, thanks!
I've come up with a workaround for my situation. I created another layer that has the same field structure as the polygon layer I'm using for the intersection and I created a single feature and populated the corresponding field with "NONE" Then in the Arcade for the widget if there is no polygon returned from the original service (checking with Count) then it runs the intersect on the new layer thereby returning a featureset with one polygon containing the attribute "NONE".
Basically I added a layer called empty to return the NONE if there aren't intersecting polygons in the original service and checked like this:
var $risk_polys = Intersects($original_service, $point);
if (Count($risk_polys) > 0) {
return $risk_polys;
}
else {
return Intersects($empty, $point);
}
Now it lines up properly
Hope that makes sense, and I'd still be interested to hear if there's a "proper" way to do this built into the dashboard.