afrocodes

Dojo Stacked Columns Chart for Web Map Pop Up

Discussion created by afrocodes on Jul 1, 2014
Anyone know how to use the the StackedColumns chart in dojo for ArcGIS JavaScript API? I need to add a stacked chart to my popup window.

I can only find the documentation below regarding using charts:
https://developers.arcgis.com/javascript/jshelp/intro_popuptemplate.html
http://dojotoolkit.org/documentation/tutorials/1.6/charting/

But it doesn't tell you how to add the different fields needed for the stacked columns (or stacked charts in general).

Any ideas? Here is a snippet of the code I tried, but can't get the stacked chart to display:
var popupTemplate = new PopupTemplate({ title: "City: " + "{CITY}", description: "View PDF ",

 mediaInfos: [{
    type: "StackedColumns",
    value: {
    fields: ["Series A", ("Geo70", "Geo03", "Geo10"), "Series B", ("Par70", "Par03", "Par10")],
    theme:"Julie"
    }

    }],

    showAttachments: false
  });


Then my featureLayer code is listed next with a link to the service and all the outfields listed above, and the addLayer function.

A chart displays if I change my type to "piechart" or one of the other charts that has simple requirements.

Outcomes