Select to view content in your preferred language

Interactive Chart Widget

2327
3
04-02-2012 05:58 PM
Yusufalbanki
Deactivated User
Hi all,

I want to develop an interactive chart widget (Dashboard widget) , but I am facing problem. So when I put the chart component like pie chart in the widget and run the viewer the widget not shown or opened.

I used the sample widget which is about opening and closing widget and it shows me that the widget is opened. But I do not know why it is not shown.

So is there any steps should I follow to use charts component in the widget. I use ArcGIS viewer 3.0 Prerelease for Flex that was posted in March 19,2012.

Note: I checked the sample chart widget that used chart browser, but my charts will be in fixed form

Thanks
Yusuf
Tags (2)
0 Kudos
3 Replies
MLowry
by
Frequent Contributor
It would be easier to help if you post the .mxml for the widget that is not showing. You have added it to the "Flex modules" list in Flash Builder right?
Are you saying the widget icon is showing up in the head controller with a line under it as if it has been opened, but no widget is showing up?
0 Kudos
Yusufalbanki
Deactivated User
Thank you for you reply.

and this is exactly what happen.

This is a sample of my test mxml , I just add pie chart component to hello world widget and same problem. Also, I add the mxml to the Flex modules.

/////////////////

<?xml version="1.0" encoding="utf-8"?>
<!--
///////////////////////////////////////////////////////////////////////////
// Copyright (c) 2010-2011 Esri. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
///////////////////////////////////////////////////////////////////////////
-->
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   xmlns:viewer="com.esri.viewer.*"
                   widgetConfigLoaded="init()">
    <fx:Script>
        <![CDATA[
            //this function called when the widget's configuration is loaded
            private function init():void
            {
                if (configXML) // checking for valid content in the configuration file
                {
                    lbl.text = configXML.content || getDefaultString("helloContent");
                }
            }
        ]]>
    </fx:Script>
    <viewer:WidgetTemplate id="helloWorld"
                           width="300" height="300">
        <viewer:layout>
            <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
        </viewer:layout>

        <s:Label id="lbl"
                 fontSize="18"
                 fontStyle="italic"
                 fontWeight="bold"/>
  <mx:PieChart id="piechart1" width="131" height="154">
   <mx:series>
    <mx:PieSeries displayName="Series 1" field=""/>
   </mx:series>
  </mx:PieChart>
  <mx:Legend dataProvider="{piechart1}"/>
 
 
 
 
    </viewer:WidgetTemplate>
</viewer:BaseWidget>

/////////////

Regards,
Yusuf
0 Kudos
Yusufalbanki
Deactivated User
Any solution for that problem
0 Kudos