Select to view content in your preferred language

Get the field "value" from mediaInfos to work in popup ArcGIS API JS

10-23-2020 09:12 AM
New Contributor III


I am trying to use the LineChartMediaInfo element in order to plot a simple array of points in the popup content. 

However, I dont really know how to make it work. Can the fields of the values contain arrays? 

Here is part of my code with a test array "array1" containing 4 numbers. 

            var pointGraphic = new Graphic({
                geometry: point,
                symbol: simpleMarkerSymbol,
                popupTemplate: popupTemplate,
                attributes: {
                    array1: [1234],
                    longitude: metadata["longitude"],
                    latitude: metadata["latitude"]

            var popupTemplate = {
                title: metadata["officialName"],
                content: [
                    // Pass in the fields to display
                    type: "media",
                    mediaInfos: [{
                        title: "<b>Prédiction</b>",
                        type: "line-chart",
                        value: {
                            fields: ["array1"],
                            normalizeField: null
                    } ]

I cant figure out from the doc (LineChartMediaInfo | ArcGIS API for JavaScript 4.17 )why it give me something like that:

Thanks a lot for your help!


0 Kudos
0 Replies