Select to view content in your preferred language

thematic-widget-flex

8941
37
01-24-2013 08:35 AM
LloydHeberlie
Regular Contributor
This is the forum for asking questions related to the ArcGIS Viewer for Flex ThematicWidget hosted on GitHub (https://github.com/Esri/thematic-widget-flex/) and referenced on ArcGIS.com.
Tags (2)
0 Kudos
37 Replies
LloydHeberlie
Regular Contributor
In working with the widget if I have it open at the start, I have to close the widget and reopen the widget before it will create a thematic map based on one of the attributes.  If the widget is not open at the beginning of the application, I have to open it, close it, and open it again before it will recognize the attributes and display the symbology.


Here is my code.

Thanks in advance for your help.




<configuration>
    <layers>
        <layer>
            <url>http://gis-test/arcgis/rest/services/Parker/School_Aid_Flex_Registered/MapServer</url>
            <name>Thematic</name>
            <classificationLayerName>Schools</classificationLayerName>
            <classificationLayerID>0</classificationLayerID>
            <classificationMethodTypeDescs>Natural Breaks,Quantile,Equal Interval</classificationMethodTypeDescs>
            <classificationMethodTypes>esriClassifyNaturalBreaks,esriClassifyQuantile,esriClassifyEqualInterval</classificationMethodTypes>
            <classificationFieldTypeDescs>Budget Enrollment,Change in Enrollment</classificationFieldTypeDescs>
            <classificationFieldTypes>FY_2014_Budget_Enrollment,Est__Change_in_Enrollment</classificationFieldTypes>
            <classificationBreaksMin>4</classificationBreaksMin>
            <classificationBreaksMax>12</classificationBreaksMax>
            <classificationBreaksDefault>6</classificationBreaksDefault>
            <dynamicLabelingPlacement>esriServerPolygonPlacementAlwaysHorizontal</dynamicLabelingPlacement>
            <dynamicLabelingMinScale>18489298</dynamicLabelingMinScale>
            <dynamicLabelingFontColor>0x191919</dynamicLabelingFontColor>
            <dynamicLabelingFontFamily>Verdana</dynamicLabelingFontFamily>
            <dynamicLabelingFontWeight>bold</dynamicLabelingFontWeight>
            <useproxy>false</useproxy>
        </layer>
    </layers>
    <ui>
        <widget_dimensions>
            <width>300</width>
            <height>350</height>
        </widget_dimensions>
        <icons>
            <base_url>widgets/Thematic/assets/images/</base_url>
            <main_icon>i_thematic_icon.png</main_icon>
            <main_label>Main Panel</main_label>
            <settings_icon>i_options.png</settings_icon>
            <settings_label>Settings Panel</settings_label>
        </icons>
        <transparency>
            <comp_label>Transparency</comp_label>
            <defaulttransparency>0.9</defaulttransparency>
        </transparency>
        <color_ramp>
            <classificationFromColorRampDisplay>Lower values</classificationFromColorRampDisplay>
            <classificationFromColorRamp>0xCECECE</classificationFromColorRamp>
            <classificationToColorRampDisplay>Higher values</classificationToColorRampDisplay>
            <classificationToColorRamp>0x0D538A</classificationToColorRamp>
        </color_ramp>
        <classification>
            <methodsLabel>Classification</methodsLabel>
            <fieldsLabel>based on</fieldsLabel>
            <breaksLabel>Number of classes</breaksLabel>
        </classification>
        <dynamicLabels>
            <dynamicLabelsEnabledLabel>Labels</dynamicLabelsEnabledLabel>
            <dynamicLabelsOnLabel>Hide / Remove</dynamicLabelsOnLabel>
            <dynamicLabelsOffLabel>Show / Display</dynamicLabelsOffLabel>
        </dynamicLabels>
    </ui>
</configuration>


Hmm, I will take a look at this when I update for 3.5.
0 Kudos
LindseyHays
Emerging Contributor
Hi Lloyd,

I'm experiencing a issue similiar to the one described by jparke1.  My client and I created a flexviewer which uses the widget.  The widget is set to open at start.  The widget opens but the layer that is configured with it does not load in automatically.  If I go to the "More" button in the upper right hand corner and turn the Thematic layer on and off the data loads in just fine and I am able to use the widget and switch between catagories without a problem.

I recreated the issue on my client's machine (different ArcGIS Server, different set up, different REST service).  The issue is also consistent across the major browsers (I get the same thing in IE, Firefox and Chrome) so its not an IE thing.

Interestingly enough I don't see this behavior with the sample service that comes with the code.  A viewer created with the sample service http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer loads the states in automatically at start without any issues. 

I have to admit I am new to dynamic services and this is my first experience working with them.  Is there some service parameter I need to turn on to get this thing to load automatically?  Any help you could provide will be much appreciated.

Thanks,

Lindsey
0 Kudos
LloydHeberlie
Regular Contributor
Version 3.5 has been released which fixes the issues previously posted and also adds an enhancement to support multiple layers within the same widget.

Layer and transparency issue
Multi-layer support

View it live: http://esri.github.io/thematic-widget-flex/
Download: https://github.com/Esri/thematic-widget-flex/releases
0 Kudos
FranciscoCardoso
New Contributor
Hi
I'm use the thematic widget and the legend are not display the values. The widget work normally just the values in the legend appear null.
0 Kudos
LloydHeberlie
Regular Contributor
Hi
I'm use the thematic widget and the legend are not display the values. The widget work normally just the values in the legend appear null.


Hi Francisco,

Can you provide more useful information?  It was working, now it isn't?  What version of ArcGIS Server are you using?  Are you using versions 3.5 of the Viewer and widget?

Do you know how to use a tool like Charles Web Debugging proxy, Fiddler for Internet Explorer, Firebug for Firefox, or the Chrome Developer Tools?

I've attached a text file that represents the request/response similar to what you should be seeing when using the tools mentioned above.

Hope this helps,

[ATTACH=CONFIG]29287[/ATTACH]
0 Kudos
ShepardSorrell
Occasional Contributor
Hi Lloyd,
I'm having trouble with the widget not using the colors I entered for the High and Low range values.  It seems to default back to two of the five colors from the config file. (charcoal and yellow used in the background and title text).

I'm on ArcGIS Server 10.1, ArcGIS 10.1, Flex Viewer 3.5 and Thematic Widget 3.5.

I had gotten it working in 3.4 but then my coworker and I wanted to be on the same version so I upgraded my Viewer and Thematic and now I can't get it working again.

I just noticed that the color ramp entries have moved to within the <layer> tag.  I tried editing the xml so the census data would render with my colors but that didn't seem to work.

ThematicWidget_1.xml is below and can get my layer service file or the config.xml if you need it. 
Thanks,
Skip

<?xml version="1.0" ?>
<configuration>
    <layers>
        <layer>
            <url>http://agis.fca.local/arcgis/rest/services/InternalApps/CommodityScramble/MapServer</url>
            <name>ScrambleComm</name>
            <classificationLayerName>CommScramble</classificationLayerName>
            <classificationLayerID>0</classificationLayerID>
            <classificationMethodTypeDescs>Natural Breaks,Quantile,Equal Interval</classificationMethodTypeDescs>
            <classificationMethodTypes>esriClassifyNaturalBreaks,esriClassifyQuantile,esriClassifyEqualInterval</classificationMethodTypes>
            <classificationFieldTypeDescs>Cattle, Ag Export Finance,Communication, Dairy Farms, Feedlots, Farm Supply Marketing, Energy Water Waste, Hogs, Fish, Other Livestock, Other Crops, Field Crops, Poultry Eggs, Forestry, Tree Nuts, Rural HomeLoans</classificationFieldTypeDescs>
            <classificationFieldTypes>Cattle,Agricultural_Export_Finance,Communication,DairyFarm,Feedlot,FarmSupplyMarketing,Energy_and_Water_Waste,Hogs,Fish,OtherLivestock,OtherCrops,FieldCrops,PoultryEggs,Forestry,TreeNuts,Rural_Home_Loans_Landlords</classificationFieldTypes>
            <classificationBreaksMin>4</classificationBreaksMin>
            <classificationBreaksMax>12</classificationBreaksMax>
            <classificationBreaksDefault>5</classificationBreaksDefault>
            <dynamicLabelingPlacement>esriServerPolygonPlacementAlwaysHorizontal</dynamicLabelingPlacement>
            <dynamicLabelingMinScale>18489298</dynamicLabelingMinScale>
            <dynamicLabelingFontColor>0x191919</dynamicLabelingFontColor>
            <dynamicLabelingFontFamily>Verdana</dynamicLabelingFontFamily>
            <dynamicLabelingFontWeight>normal</dynamicLabelingFontWeight>
            <useproxy>false</useproxy>
        </layer>
    </layers>
    <ui>
        <widget_dimensions>
            <width>350</width>
            <height>260</height>
        </widget_dimensions>
        <icons>
            <base_url>widgets/Thematic/assets/images/</base_url>
            <main_icon>i_thematic_icon.png</main_icon>
            <main_label>Main Panel</main_label>
            <settings_icon>i_options.png</settings_icon>
            <settings_label>Settings Panel</settings_label>
        </icons>
        <transparency>
            <comp_label>Transparency</comp_label>
            <defaulttransparency>0.7</defaulttransparency>
        </transparency>
        <color_ramp>
            <classificationToColorRampDisplay>Higher values</classificationToColorRampDisplay>
            <classificationToColorRamp>0x336633</classificationToColorRamp>
            <classificationFromColorRampDisplay>Lower values</classificationFromColorRampDisplay>
            <classificationFromColorRamp>0xccff99</classificationFromColorRamp>
        </color_ramp>
        <classification>
            <methodsLabel>Classification</methodsLabel>
            <fieldsLabel>Based on</fieldsLabel>
            <breaksLabel>Number of classes</breaksLabel>
        </classification>
        <dynamicLabels>
            <dynamicLabelsEnabledLabel>Labels</dynamicLabelsEnabledLabel>
            <dynamicLabelsOnLabel>Hide</dynamicLabelsOnLabel>
            <dynamicLabelsOffLabel>Show</dynamicLabelsOffLabel>
        </dynamicLabels>
    </ui>
</configuration>
0 Kudos
ShepardSorrell
Occasional Contributor
Hi Lloyd,
Can the dynamicLabels be given more formatting such as making them currency with thousands comma's and 0 decimal places?
I haven't been able to find other tags I can use to do such formatting.
Any help you can direct me to would be much appreciated.

Skip
0 Kudos
GISDev1
Deactivated User
Hi Lloyd,
Can the dynamicLabels be given more formatting such as making them currency with thousands comma's and 0 decimal places?
I haven't been able to find other tags I can use to do such formatting.
Any help you can direct me to would be much appreciated.

Skip


This can be done pretty easily in the source code.
Are you using Flash Builder or only editing the .xml files or using the Flex Application Builder?
0 Kudos
LloydHeberlie
Regular Contributor
Hi Lloyd,
Can the dynamicLabels be given more formatting such as making them currency with thousands comma's and 0 decimal places?
I haven't been able to find other tags I can use to do such formatting.
Any help you can direct me to would be much appreciated.

Skip



Hi Skip,

I wanted to implement this when I was writing the samples and widget.  Unfortunately if the server is performing the labeling, there aren't many options other than what is listed with the labelExpression. See the REST API link below.
ArcGIS REST API - label

You can see more advanced samples below:
LabelOptions Wizard
Dynamic labeling
Dynamic labeling - advanced

Here is the Flex doc:
Flex API doc - LabelClass
Flex API doc - LabelOptions

Can you please submit a support incident for this?  This will create a internal tracking number for this issue which will be reviewed by the server team.  The more customers that request this functionality will raise its priority to implement.  Can you also create a suggestion on the ideas site?

Thank you,
0 Kudos
ShepardSorrell
Occasional Contributor
This can be done pretty easily in the source code.
Are you using Flash Builder or only editing the .xml files or using the Flex Application Builder?


Thanks for the quick response. 
I'm currently just editing in either the Application Builder or directly in the xml for the widget.
0 Kudos