AnsweredAssumed Answered

Styling Dojo Chart in Popup

Question asked by sjacksonesriaustralia-com-au-esridist Employee on Dec 25, 2012
Latest reply on Jun 18, 2013 by geonetadmin
I have a dojox bar chart on my app, that is populated from a QueryTask everytime the extent changes.


I am making use of the Tufte theme (the only one that has a transparent background), and overriding the bar colours/outlines when i populate the chart:

    chart1.addSeries("Languages", [
     { y: pctArabic, fill: "#C23A00", stroke: null, tooltip: ctArabic + " in Arabic },
     { y: pctMalay, fill: "#6BAE11", stroke: null, tooltip: ctMalay + " in Malay" },

I have also been using this sample as a reference, and have successfuly added a popup to my map which shows some totals per suburb in a dojox piechart:


My codes is identical to the sample, bar the fields have been swapped out.

template = new esri.dijit.PopupTemplate({
          title: "Tweet Languages in {SA2_NAME}",
          mediaInfos: [
              type: "piechart",
              value: { 
                fields: [ 
                  "TotArabic", "TotMalay",
                theme: "Tufte"

My problem:

How do I force the pie segments to be specific colours, as per my bar chart example?
When I look at the API reference for Popup, mediainfos does not look like it has this level of control over the chart?

How do I override the tooltips with an alias like I did with my bar chart example?

I will also need to style the popup to have a similar dark grey background to my chart background, but I believe that won't be related to the chart, and should be achievable via styling the popup with CSS.