Pie chart using httpservice

hello guys i am using a httpservice for giving dataprovider
to pie chart ..When this service return a single record ,pie chart
do not show anything instead of showing 100%...
problem occurs when my service return this..
<?rss version="2.0"?>

<data>

<SalesReport>
<status>Assigned</status>
<inquiry>22</inquiry>
</SalesReport>
</data>
otherwise it's work fine.......if it return
<?rss version="2.0"?>

<data>

<SalesReport>
<status>Assigned</status>
<inquiry>22</inquiry>
</SalesReport>
<SalesReport>
<status>New</status>
<inquiry>12</inquiry>
</SalesReport>
</data>
Here is my code .... Please help me .....
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundGradientColors="[#ffffff, #808080]"
creationComplete="init();">
<mx:Style>
<mx:Script >
<![CDATA[
import mx.binding.utils.BindingUtils;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
[Bindable]
public var reportData10A:ArrayCollection;
[Bindable]
public var reportData10A1:ArrayCollection;
[Bindable]
public var comboData10A:ArrayCollection;
public var fromMonth10A:Number;
public var techID:Number;
public var salesPerson10A:String;
[Bindable]
public var comboData10A1:ArrayCollection;
public function mytest10A():void
salesPerson10A = salesPesronCombo.selectedLabel.toString();
var salesPID:Number = mytest10A2(salesPerson10A);
fromMonth10A = monthFromCombo10A.selectedIndex + 1 ;
techID = TechnologyCombo.selectedIndex+1;
var str:String ="
http://reena-new:3021/reports/specperson_spectech?year="+yearCombo10A.selectedLabel+"&pers on="+salesPID+"&month="+fromMonth10A+"&techid="+techID;
Alert.show(str);
reportService10A.url="
http://reena-new:3021/reports/specperson_spectech?year="+yearCombo10A.selectedLabel+"&pers on="+salesPID+"&month="+fromMonth10A+"&techid="+techID;
reportService10A.send();
reportData10A = new ArrayCollection();
reportData10A =
reportService10A.lastResult.data.SalesReport;
public var i:Number;
public var salesPersonId:Number;
public function mytest10A2(str:String):Number
for(i=0;i<comboData10A.length;i++)
if(comboData10A.name==str)
salesPersonId = Number(comboData10A.id);
break;
return salesPersonId;
public function init():void
this.comboData10A = new ArrayCollection();
this.reportData10A = new ArrayCollection();
this.comboData10A1 = new ArrayCollection();
//reportService10A.url="
http://reena-new:3021/reports/specperson_spectech?year=2008&person=1&month=04&techid=1";
reportService10A.url="my.xml";
reportService10A.send();
comboService10A.send();
ComboService10A1.send();
public function getData10A(event:ResultEvent):void
reportData10A = new ArrayCollection();
reportData10A= event.result.data.SalesReport;
//Alert.show(reportData10A.length.toString());
public function getComboData10A(event:ResultEvent):void
comboData10A = new ArrayCollection();
comboData10A = event.result.data.SalesPerson;
public function getComboData10A1(event:ResultEvent):void
comboData10A1 = new ArrayCollection();
comboData10A1 = event.result.data.technology;
]]>
</mx:Script>
<mx:HTTPService id="reportService10A"
showBusyCursor="true"
result="getData10A(event);" />
<mx:HTTPService id="ComboService10A1"
showBusyCursor="true"
url="
http://reena-new:3021/reports/techlist"
result="getComboData10A1(event)" />
<mx:HTTPService id="comboService10A"
showBusyCursor="true"
result="getComboData10A(event);" url="
http://reena-new:3021/reports/personlist"/>
<mx:Canvas id="report10A" height="75%" width="70%" x="0"
y="100"
verticalScrollPolicy="off" horizontalScrollPolicy="off">
<mx:PieChart id="pie10A" x="0" y="25" width="350"
dataProvider="{reportData10A}"
showDataTips="true"
>
<mx:series>
<mx:PieSeries
field="inquiry"
labelPosition="callout"
nameField="status"
/>
</mx:series>
</mx:PieChart>
<mx:Legend dataProvider="{pie10A}" />
<!-- <mx:PieChart id="pie10A1" x="365" y="25"
width="350"
dataProvider="{reportData10A1}"
showDataTips="true"
>
<mx:series>
<mx:PieSeries
field="inquiry"
nameField="name"
labelPosition="callout"
/>
</mx:series>
</mx:PieChart>
<mx:Legend dataProvider="{pie10A1}" x="350" /> -->
</mx:Canvas>
<mx:Canvas x="0" y="0" height="90" width="100%">
<mx:HBox y="30" id="combo10A" x="0" >
<mx:Label text="Sales Person" fontSize="12"/>
<mx:ComboBox width="100" id="salesPesronCombo"
change="mytest10A()();"
dataProvider="{comboData10A}" labelField="name">
</mx:ComboBox>
<mx:Label text="Technology" fontSize="12"/>
<mx:ComboBox width="100" id="TechnologyCombo"
change="mytest10A()();"
dataProvider="{comboData10A1}" labelField="name">
</mx:ComboBox>

this is the answer ................
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
backgroundGradientColors="[#ffffff, #808080]"
creationComplete="init();">
<mx:Script>
<![CDATA[
import mx.binding.utils.BindingUtils;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
import mx.collections.ArrayCollection;
[Bindable]
public var xmlResult:XML;
public function init():void
Alert.show("we are here");
myService.url="my.xml";
myService.send();
public function onResult(event:ResultEvent):void
xmlResult = new XML
xmlResult = XML(event.result);
Alert.show(xmlResult);
]]>
</mx:Script>
<mx:HTTPService id="myService" url="my.xml"
result="onResult(event)"
resultFormat="e4x"/>
<mx:PieChart id="pie10A" x="0" y="25" width="350"
dataProvider="{xmlResult.child('SalesReport')}"
showDataTips="true"
>
<mx:series>
<mx:PieSeries
field="inquiry"
labelPosition="callout"
nameField="status"
/>
</mx:series>
</mx:PieChart>
<mx:Legend dataProvider="{pie10A}" />
</mx:Application>
Thanks

Similar Messages

  • Pie chart using Class cl_igs_chart ??

    Hi All,
    I am looking for Sample code, how to draw Pie chart using standard class: cl_igs_chart.
    I found a Standard SAP prog: GRAPHICS_IGS_CHART_TEST for drawing Bar chart, looking for pie chart now?
    Please help me!!
    Thanks in advance.

    Hi,
    if you want to create charts in the background using the IGS is the right choice!
    Let's have a look at cl_igs_chart:
    creating a pie chart can be done easily by changing the demo report graphics_igs_chart_test; just change the line
    igs_chart->type = cl_igs_chart=>co_type_bars.
    by replacing co_type_bars with co_type_pie (check the attributes of cl_igs_chart to see a list of chart types).
    However, as cl_igs_chart does not provide further customizing settings I recommend that you download the SAP Chart Designer (as mentioned above) and use the class cl_igs_chart_engine instead. Demo report is graphics_igs_ce_test.
    Regards, Kai

  • Pie chart using BSP

    Hi,
         Is it possible to display a pie chart using BSP.The piechart want to viewable in internet (URL)
    Can anyone help me with step by step procedure.

    Dear Ramya,
    There is an option to display the Pie chart in BSP.  For that please do the following steps,
    In layout:
    <htmlb:chart
            id                   = "myChart1"
            data                 = "<%=data%>"
            width                = "300"
            height               = "300"
            titleCategories      = "Company"
            titleValues          = "Turnover"
            title                = "Washers by Companies!"
            chartType            = "PIE_3D"
            legendPosition       = "EAST"
            colorOrder           = "STRAIGHT"
          />
    You can specify the other charttype in the propoerty chartType . 
    In OnInitialization:
    some data to be displayed give your datas to be displayed
    DATA: line TYPE igs_data.
      line-groupid = 'SAP AG'.
      line-x = '1st Quarter'.
      line-y = 50.
      line-color = 48.
      line-extension = 'href="http://www.sap.com" alt="SAP AG"'.
      append line to data.
      line-x = '2nd Quarter'.
      line-y = 35.
      line-color = 0.
      append line to data.
      line-x = '3rd Quarter'.
      line-y = 43.
      append line to data.
      line-groupid = 'Microsoft'.
      line-x = '1st Quarter'.
      line-y = 46.
      line-extension = 'href="http://www.microsoft.com" alt="Microsoft"'.
      append line to data.
      line-x = '2nd Quarter'.
      line-y = 26.
      line-color = 64.
      append line to data.
      line-x = '3rd Quarter'.
      line-y = 38.
      line-color = 0.
      append line to data.
    In Page Attributes:
    data     TYPE     IGS_DATA_TAB
    Now check in IE you can get ur pie chart.
    Appreciate if tis Helpful.
    Regards,
    Anita Vizhi Arasi B

  • Drill down in pie chart using Business Graphics?

    Hi,
    I have create a pie chart using business graphics UI element. is it possible to drill down when we click on a part of pie chart?
    Please let me know how can we achieve this. Thank you.
    Regards,
    Bharat.

    I got the solution. we can identify this by using the event id property.
    Regards,
    Bharat.

  • Drill down pie chart using SVG

    Having read several posts in this forum regarding SVG, pie charts and drilling down, I get the impression that it is possible, using the "link" column in the chart query, to drill down to another page.
    My requirement is similar in that given a pie chart, the user can click on one of the sections of the pie and see more detail in another pie chart. The difference is that the page should not change (ie: other graphics and content ought not change when the pie chart is clicked).
    Has anyone worked out a solution for something like this?
    Is it, for example, possible to, on clicking the pie chart, have a conditional display set for a previously hidden chart and hide the original chart?
    Your replies are appreciated.

    I just re-read this and realize you want it on the same page. Same logic applies. Create a hidden item, a second chart region taking in the parameter from the first, and set it to show only when the hidden item is not null.
    Let me know what you think:
    http://htmldb.oracle.com/pls/otn/f?p=20332:1
    Code for the first chart is:
    select 'f?p='||:APP_ID||':1:::::P1_DRILLDOWN:'||cu.customer_id,
           cu.cust_first_name || ' ' || cu.cust_last_name,
           count(ord.order_id)
      from demo_orders ord,
           demo_customers cu
    where cu.customer_id = ord.customer_id
    group by 'f?p='||:APP_ID||':1:::::P1_DRILLDOWN:'||cu.customer_id,
    cu.cust_first_name || ' ' || cu.cust_last_name2nd Chart:
    select null,
           product_name,
           count(ite.product_id)
      from demo_orders ord,
           demo_order_items ite,
           demo_product_info pro
    where ord.order_id = ite.order_id and
           ite.product_id = pro.product_id and
           ord.customer_id = :P1_DRILLDOWN
    group by product_nameModify as necessary.

  • How to create pie charts in BIP 11g using .XSL?

    Hi,
    Requirement is to create a multi sheet excel output. Because of this. I am going the XSL way and not RTF.
    Now, I need to create pie charts using XSL as part of the output.
    * Is it possible to create pie charts in .XSL? If so, any pointers?
    * I tried some SVG coding by referencing the below link but not result:
    <http://www.svgopen.org/2003/papers/CreatingSVGPieChartsThroughWebService/index.html#S2.1>
    * I also created the required chart in RTF and tried to use the underlying XSL-FO code. Not sure if I have used it in the right way. Has anyone tried doing that?
    If you have any info, please share.
    Thanks,
    Divya

    One more point : I came across a link which talks about Bar charts using XSLT :
    http://www.roguewave.com/Portals/0/products/imsl-numerical-libraries/java-library/docs/5.0.1/chartpg/xml_xslt.html
    so, I am hoping, there is a way to do pie charts as well?
    Thanks,
    Divya

  • PIE Chart image si not displaying

    i develop a pie chart using .net 1.1, crystal report.
    when i run my application in my local meachine, the data is coming
    but chart is not dispalying.
    i am getting cross red mark in place chart and crystal report navigation button images are also not dispalying.
    Thanks in advance.

    Hi
    Thanks for y'r response.
    Data is correct,  i am taking name as on change field value, and salary on show value.
    i am not getting images of navigation buttons also.
    i am doing my first application in piechart.
    so i don't know how to check sort options?

  • Pie Chart Colors

    So I have created a pie chart using the Pie Graph Tool in AI, the data is accurate once it is made, but I cannot change the colors.  After entering in the numbers into the cell I select the check mark.  It makes the pie graph.  Doesn't let me select the separate slices alone so I expanded the entire graph, then direct select to change colors.  It lets me select the separate slice, but when I go to change the color it either doesn't work it changes from one shade of grey to another.  I need actual color.   
    Any suggestions? Have tried making several different graphs but still the same issue.  Using Creative Cloud

    You should be able to direct select single parts of a "live" graph.
    This has lead to corrupt files in some cases though. So you might want to test this thoroughly.
    If the color panel doesn't show color sliders, try and select CMYK from the panel menu. If that doesn't show, apply a color swatch first and then change its values.

  • Pie Chart Slice Label Percentage + Label

    Hi,
    i'm newbie of Publisher 11. I've a problem. I've created a DataSet and a report containing a pie chart using wizard of Publisher as written at following link:
    http://allaboutobiee.blogspot.it/2012/04/working-with-bi-publisher-11g-part3.html
    My chart shows near each slice the percentage value, but it should show the percentage value + corresponding legend text. I've changed all chart properties on left side of window, but it doesn't work. I read that i must set the value LD_PERCENT_TEXT. But where????? How can i modify XML? I must export the report in OBIEE to have more functionalities? Can you explain me what to do step by step because it's the first time i use Publisher 11
    Thanks
    Giancarlo

    do paste this in the alt text of the chart ,
    Right click the picture , select format picture and go to alt text tab.
    paste this in between the graph element and not at the end or beginning.
    <SliceLabel visible="true">
    <ViewFormat decimalDigit="1" decimalSeparator="." decimalDigitUsed="true" decimalSeparatorUsed="true"/>
    </SliceLabel>

  • Pie Chart highlighting (immitating 3D Pie chart with ellipse shape)

    I have to create a pie chart using jdk 1.0. Since I have to make it looks like 3d, I used fillArc() to draw ellipse shape pie chart. I am having trouble highlighting the pie where the mouse is over. Using atan() to get degree of x and y mouse possition and compare to pie's degree works only for a circle but not for ellipse shape.
    Can someone tell me how I can verify xy mouse position with each ellipse pie piece?
    Also, I have to draw a label for each picese and the lavel has to point to each pie. I need to get the mid point, x and y possition, of perimiter of each pie.
    Can someone help me please?
    Thanks in advance,
    lala

    hi friends, i have developed the same appication like u but it is not 3D.so if u have 3D pie program them please send me code of programming at my mail id:
    [email protected]
    now as ur question,u can get the xy coordinate of mouse using mouseactionlistener.this u can use in ur applet coding.

  • Pie chart  display error

    Hi
    I created pie chart using CFCHART tag. In the chart display,
    data values overlap on one another in the display. How to rectify
    this error.
    Kindly help me in this regard.
    Advance thanks

    I am using  ColdFusion Report Builder 9 to generate a PDF, so there is no code to provide, but here is an example of my data:
    fruit
    count
    apples
    112
    oranges
    304
    bananas
    0
    pears
    0
    grapes
    16
    strawberries
    80
    plums
    48
    pineapples
    32
    blueberries
    16
    raspberries
    32
    apricots
    256
    tangerines
    705
    cherries
    1
    peaches
    0
    With 'label column: fruit' and 'value column: count', when I select 'data label: pattern', for my pie chart, the labels overlap.

  • Creating a custom pie chart

    Hey,
    If I have a table worksheet created with the following headings:
    TotalVisitor Male Female
    -------5------------3-------2 (Ignore the ---)
    How would I go about creating a pie chart using only the Male and Female columns? I don't want to use the total column. Also, is there any way to display both the count and percentage of Males and Females on the graph, so for example the male slice of the pie would be labeled something like 3 - 60%, or etc?
    Any suggestions?

    hi user445907--
    your link column in your chart query seems to us the correct syntax, so i'd imagine the issue is with your data/query or the item name in question...
    check the query and data: make sure your query returns valid values to be passed of to P21_DD_SALESORG. if so, you should see your links correctly formed as you hover your mouse over the individual slices. if your links look good then check your item names.
    item names: if your links above look okay, then might you be setting the value of the incorrect item? please confirm that. after clicking a pie slice to get to page 21, check to see that P21_DD_SALESORG is correctly set by clicking the Session link in the developer toolbar.
    basically, i'm suggesting that because your link column in your query looks okay, you'd want to see at what point the NULL value is being passed/set. try tracing things from the chart query over to page 21 (and try going backwards if you have to). if you can't find the disconnect, please feel free to set up an example on an instance, where i can take a look.
    thanks,
    raj

  • Creating a Pie Chart?

    How can I...
    1. Display the number of vowels, consonants, other characters,
    2. Display the percent of vowels, consonants, other characters,
    3. Display a pie chart using the above information,
    4. All of this must be done in an applet.
    5. Here is the program that does #1 and #2.
    import java.text.DecimalFormat;
    public class TextAnalyser
         //String inputString =new inputString();
         String inputString = new String();
         int totalCharacters = inputString.length();
         int numVowels = 0;
         int numConsonants = 0;
         int numOtherChars = 0;
         double getPercentVowel;
         double getPercentConsonants;
         double getPercentOtherChars;
         DecimalFormat threeDigits =new DecimalFormat("0.###");
         public void main(String args[])
              for(int i = 0; i < totalCharacters; i++)
                   char ch = inputString.charAt(i);
                   if ((ch == 'a') || (ch == 'A') || (ch == 'e') || (ch == 'E') || (ch == 'i') || (ch == 'I')
                   || (ch == 'o') || (ch == 'O') || (ch == 'u') || (ch == 'U'))
                        numVowels++;
                   else if (Character.isLetter(ch))
                        numConsonants++;
                   else
                        numOtherChars++;
         public int getNumberVowels()
              return numVowels;
         public double getPercentVowel()
              double percentV = numVowels/totalCharacters;
              percentV= Double.parseDouble(threeDigits.format(percentV));
              return percentV;
         public int getConsonants()
              return numConsonants;
         public double getPercentConsonants()
              double percentC = numConsonants/totalCharacters;
              percentC= Double.parseDouble(threeDigits.format(percentC));
              return percentC;
         public int getNumberOthers()
              return numOtherChars;
         public double getPercentOtherChars()
              double percentO = numOtherChars/totalCharacters;
              percentO= Double.parseDouble(threeDigits.format(percentO));
              return percentO;
    }

    It has no public static void main( String args[] ) method.
    How do you plan on executing this program anyway?

  • 3D Pie Chart

    Hi all,
    Just wondering if anyone can point my sniffer in the right direction. I am looking for some way be it an applet or some other method to produce a 3D pie chart using Java. I have seen some impressive examples by doing a search on google but the blood suckers want around 150euro for a licence, no way am i paying that, ill do it myself

    JFreeChart is very good:
    http://www.jfree.org/jfreechart/
    Take a look at the org.jfree.chart.demo.PieChart3DDemo1 / PieChart3DDemo2 / PieChart3DDemo3 and PieChart3DDemo4 classes ( you can see an example on the samples page: http://www.jfree.org/jfreechart/samples.html )

  • ActiveX pie chart range limit

    I have a problem with creating a pie chart using ActiveX that seems to be related to the range. When I give it a source of 8 cells (source 1) the pie chart works fine (Right Pie). If I give it 9 cells (source 2) the pie chart data has 9 series instead of the 1 it should have (Wrong Pie). If I go into Excel I can correct it manually. I have been using this sub VI for a while with no problems but always with fewer than 8 cells. 
    I am using Excel 2007 version 12.
    Attachments:
    M-51539-001 Create Pie Chart.vi ‏108 KB
    Right Pie.JPG ‏124 KB
    Wrong Pie.JPG ‏114 KB

    Attached is part of the sub-vi where I am having the problem. I tell Excel which cells to use for the pie chart. If I use "Source 1" (8 cells) the pie chart is created successfully. If I use "Source 2" (14 cells) the pie chart only uses the first cell. I can go to the Excel file and select all 14 cells manually and the pie chart displays correctly. I also tried 9 cells with no luck, it seems that 8 cells are the limit. I am trying to find what is causing the limitation. I have also attached the sub-vi. 
    Attachments:
    Pie chart block diagram.JPG ‏61 KB
    M-51539-001 Create Pie Chart.vi ‏108 KB

Maybe you are looking for