Select to view content in your preferred language

How to display chart through arcade expression?

273
0
10-26-2022 11:14 AM
by Anonymous User
Not applicable

Hello,

I'm unable to create a working chart through an arcade expression.

I followed this example --> https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-2-introducing-arcade-pop-up-con...

Here's my code:

var moth_counts = FeatureSetByRelationshipName($feature,"Moth_Counts")
var dates = FeatureSetByRelationshipName($feature,"Date")

return {
    type: 'media',
    title : 'test',
    description : 'test',
    attributes : {"dates": dates, "moth_counts": moth_counts},
    mediaInfos: [{
        type : 'linechart',
        value : {
            fields: ["dates", "moth_counts"],
        }
    }]

}

Any help is appreciated.

Tags (2)
0 Kudos
0 Replies