Select to view content in your preferred language

Bar Chart in Pop up

2724
3
09-12-2011 04:18 AM
FaizanTayyab
Deactivated User
Hi

I have a popup config file as below, to show a bar chart within a popup.

<fields>
        <field name="BLOCK_NAME"/>
        <field name="CO__1"/>                    
        <field name="CO__2"/> 
        <field name="CO__3"/>                    
        <field name="CO__4"/> 
        <field name="CO__5"/>                    
        <field name="CO__6"/> 
        <field name="CO__7"/>                    
        <field name="CO__8"/>
        <field name="CO__9"/> 
        <field name="CO__10"/>                    
        <field name="CO__11"/> 
        <field name="CO__12"/> 
        <field name="CO__13"/>                    
        <field name="CO__14" /> 
        <field name="CO__15" /> 
        <!-- <field name="LINK" alias="Document" visible="false"/> -->
    </fields>
    <medias>
        <media type="piechart" title="Block Partners" chartfields="CO__1,CO__2,CO__3,CO__4,CO__5,CO__6,CO__7,CO__8,CO__9,CO__10,CO__11,CO__12,CO__13,CO__14,CO__15"/>
    </medias>  


However it displays nothing. Anyone having similar issues.

One reason for this behavior could be that, the values within the chartfields are of strings data types and are of format:

string (%number)
for example company1(%50)

In SFV 1.3 i had to do some string processing in the chart widget to generate the chart however i am not sure how to do the same in SFV 2.4 without using the Chart widget and having the chart within the Popup.

Any ideas???
Tags (2)
0 Kudos
3 Replies
MehulChoksey
Esri Contributor
Could you use http debugging tool such as firebug/fiddler/http fox to see if what is the request made and what does the response  contain?

Mehul
0 Kudos
FaizanTayyab
Deactivated User
Could you use http debugging tool such as firebug/fiddler/http fox to see if what is the request made and what does the response  contain?

Mehul


I will try to use firebug and let you know the outcome,

However when i tried an integer type field, the chart works fine.

However as mentioned, the data inside the field i require is of type string and has the format

as
companyName(%20).

Is there anyway to allow the popup to use the numeric portion for the pie chart slice and the companyName as label. As the popup is builtin in the API, i wasnt sure how to make this work.
0 Kudos
FaizanTayyab
Deactivated User
I had to include three files from the API itself to make this work. The main file is PopUpMediaBrowser which has the method to get Chart data. I placed the string processing code in this method and got the chart to work.

Again, the charts require the field data type to be esriIntegerType or a string which can be converted into a number.

Next target is increase the size of the media window, currently it cuts off the chart.
0 Kudos