Select to view content in your preferred language

Interactive Chart From Data Expression

899
9
04-18-2024 05:59 AM
Labels (1)
AlinaTarmu_SCGIS
Occasional Contributor

I created two data expressions from a map image layer and a feature layer in two different dashboards. Each generating a feature set that includes the ObjectID field and all other relevant fields, however, the resulting charts don't seem to be able to filter the dashboard data. Both charts replicate two other ones that are built directly on the respective layers. The reason why I need a data expression is because the charts need a new calculated field (the schemas initially included that field, now they cannot be altered to include it).

The Actions tab of the charts displays "No elements supporting actions yet".

I created a selector feeding on the data expression, just to check, and, sure enough, the actions are available for the selector. A potential clue is the fact that the Object ID field of the data expression feature set does not appear in the list of fields to choose from when setting up filters connecting other dashboard elements. The Object ID is set correctly as "esriFieldTypeOID" in the Arcade script dictionary of the data expression.

Has anyone managed to make data expression charts interactive with elements built directly on feature sets?

0 Kudos
9 Replies
jcarlson
MVP Esteemed Contributor

We have interactive dashboards that are entirely data expressions. Try just defining the ObjectID as an integer? ObjectID fields and integers can still work together in a filter. Or you might try using the GlobalID as an esriFieldTypeGUID, which is what we usually do.

Which charts show the "no elements" message? Both? How are the charts themselves configured? Are they grouped values?

- Josh Carlson
Kendall County GIS
AlinaTarmu_SCGIS
Occasional Contributor

Only the data expression chart showed the "no elements" message. Yes, both charts are grouping values in the calculated/virtual field. Today I tried adding a data expression chart again on a replicated dashboard for testing and I got the map actions to work. The bars are now clickable, but the other dashboards elements are not filtered (no filter action).

Thanks so much for the tip with the object ID, will try that. 

I am trying now to set all the dashboard elements on the data expression, so there is no room for "miscommunication". 

0 Kudos
AlinaTarmu_SCGIS
Occasional Contributor

I changed the Object ID type to string and it still didn't show up in the numeric field options or made any other difference.

0 Kudos
AlinaTarmu_SCGIS
Occasional Contributor

When you say "interactive dashboards that are entirely data expressions", do you refer to all elements driven by one data expression? What I need is for one chart, created through a data expression, to filter the other elements, that are created directly on the feature set that is wrangled by the data expression.

Thank you for the tips so far.

0 Kudos
jcarlson
MVP Esteemed Contributor

Some are multi-widget with a single expression, others are using multiple expressions, but derived from a single source. The trick is to make sure that your data expression includes a GlobalID or ObjectID that you can use to filter other things, even if they don't use the same expression.

- Josh Carlson
Kendall County GIS
AlinaTarmu_SCGIS
Occasional Contributor

Well, I did include a global ID/object ID from the start. Not only that the chart doesn't "see" the other elements, but two selectors make the chart display "cannot access data". I can't find what they have in common, all field names and types are correct, they all filter grouped string values.

0 Kudos
AlinaTarmu_SCGIS
Occasional Contributor

So you do not have any dashboard element driven directly by a feature set interacting with those built on data expressions.

0 Kudos
jcarlson
MVP Esteemed Contributor

Perhaps I wasn't as clear as I could have been. We have lots of dashboard elements that are directly interacting with data expression sources.

- Josh Carlson
Kendall County GIS
AlinaTarmu_SCGIS
Occasional Contributor

Thanks for the clarification. Meanwhile I located the source of this weird behavior outside of the script itself.

0 Kudos