6 Replies Latest reply on Nov 14, 2008 6:38 AM by Newsgroup_User

    gopiFis

    Fis Forums
      <mx:Canvas>
      <xpc:PieChart id="chart" paletteName="Halo" leftGutter="100" rightGutter="100"
      height="400" width="600" showDataTips="true" dataProvider="{medalsAC}"
      borderSkin="xp.charting.borders.Colonial" >
      <xpc:series>
      <xpc:PieSeries id="ps" chartType="pie3D" valueField="Gold" labelFunction="displayGold" alphaSelected="1" alphaNormal=".8">
      <xpc:calloutStroke>
      <mx:Stroke weight="0" color="0x888888" alpha="1.0"/>
      </xpc:calloutStroke>
      </xpc:PieSeries>
      </xpc:series>
      </xpc:PieChart>
      <mx:Label top="25" width="100%" text="Olympics 2004 Medals Tally" textAlign="center" fontWeight="bold" fontSize="20"/>
      <mx:TextArea left="25" top="320" id="dataLabel" height="50" width="100" text="{ps.selectedItem.label}"/>
      </mx:Canvas>

      This <xpc:...> tag doesnot work in adobe flex 3 help me
        • 1. Re: gopiFis
          SujitG Level 2
          Hi,

          Please check if you have the name space declared for xpc.

          Hope this helps.
          • 2. Re: gopiFis
            Fis Forums Level 1
            I have downloaded full code this program to run on my flex but i couldnot run it it gives error as
            Type was not found or not a compile constant:Pie Chart
            Type was not found or not a compile constant:Pie Series
            Here is the code i have attached
            • 3. Re: gopiFis
              BluDragon777
              Is "xmlns:xpc="xp.charting.*"" supposed to be "xmlns:xpc="xpc.charting.*""?
              • 4. Re: gopiFis
                Fis Forums Level 1
                Even i get the same error if i invoke those code xmlns:xp.charting.*; to xmlns:xpc.charting.*;

                • 5. Re: gopiFis
                  jeroencornelissen.be
                  I'm having a similar problem. My charts aren't recognized in Flex Builder Professional ... Flex SDK 3.0.2
                  I've copied following code from the component explorer, it gives an error on line 37 : Type was nog found...PieChart


                  <?xml version="1.0"?>
                  <!-- Simple example to demonstrate the PieChart control. -->
                  <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
                  <mx:Script>
                  <![CDATA[
                  import mx.collections.ArrayCollection;

                  [Bindable]
                  private var medalsAC:ArrayCollection = new ArrayCollection( [
                  { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                  { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                  { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 } ]);

                  private function displayGold(data:Object, field:String, index:Number, percentValue:Number):String {
                  var temp:String= (" " + percentValue).substr(0,6);
                  return data.Country + ": " + '\n' + "Total Gold: " + data.Gold + '\n' + temp + "%";
                  }
                  ]]>
                  </mx:Script>

                  <!-- Define custom colors for use as pie wedge fills. -->
                  <mx:SolidColor id="sc1" color="blue" alpha=".6"/>
                  <mx:SolidColor id="sc2" color="red" alpha=".6"/>
                  <mx:SolidColor id="sc3" color="0x663300" alpha=".6"/>

                  <!-- This Stroke is used for the callout lines. -->
                  <mx:Stroke id="callouts" weight="2" color="0x999999" alpha=".8" caps="square"/>

                  <!-- This Stroke is used to separate the wedges in the pie. -->
                  <mx:Stroke id="radial" weight="1" color="0xFFFFCC" alpha=".3"/>

                  <!-- This Stroke is used for the outer border of the pie. -->
                  <mx:Stroke id="pieborder" color="0x000000" weight="2" alpha=".5"/>


                  <mx:Panel title="Olympics 2004 Medals Tally Panel" height="100%" width="100%">
                  <mx:PieChart id="chart"
                  height="100%"
                  width="100%"
                  paddingRight="5"
                  paddingLeft="5"
                  showDataTips="true"
                  dataProvider="{medalsAC}"
                  >
                  <!--
                  -->
                  <mx:series>
                  <mx:PieSeries
                  nameField="Country"
                  labelPosition="callout"
                  field="Gold"
                  labelFunction="displayGold"
                  calloutStroke="{callouts}"
                  radialStroke="{radial}"
                  stroke="{pieborder}"
                  fills="{[sc1, sc2, sc3]}"
                  >
                  <!-- Clear the drop shadow filters from the chart. -->
                  <mx:filters>
                  <mx:Array/>
                  </mx:filters>
                  </mx:PieSeries>
                  </mx:series>
                  </mx:PieChart>
                  <mx:Legend dataProvider="{chart}"/>
                  </mx:Panel>
                  </mx:Application>
                  • 6. Re: gopiFis
                    Level 7

                    "jeroencornelissen.be" <webforumsuser@macromedia.com> wrote in message
                    news:gfji1h$648$1@forums.macromedia.com...
                    > I'm having a similar problem. My charts aren't recognized in Flex Builder
                    > Professional ... Flex SDK 3.0.2
                    > I've copied following code from the component explorer, it gives an error
                    > on
                    > line 37 : Type was nog found...PieChart

                    http://blogs.adobe.com/flexdoc/2008/04/extracting_data_visualization.html