3D pie chart - Sides are incomplete

Hi,
I've pie chart in a report.
I could modify 3D look changing properties e.g. depthAngle, depthRadius, pieDepth, pieTilt. But sides of 3D pie are not coming complete in preview.
Can anyone please help on this issue.
Kind Regards.

Can anyone please help? In 3D view, pie walls are not coming. I'm using BIpublisher 10.1.3.4.
Please create a pie chart with below xsl and use sample xml data given here. Check the preview.
chart:
<Graph pieDepth="100" pieTilt="80" seriesEffect="SE_AUTO_GRADIENT" graphType="PIE">
<LegendArea visible="true" automaticPlacement="AP_NEVER" position="LAP_BOTTOM" />
<SliceLabel visible="true"><ViewFormat decimalDigit="1" decimalSeparator="." decimalDigitUsed="true" decimalSeparatorUsed="true"/></SliceLabel>
<LocalGridData colCount="1" rowCount="{count(xdoxslt:group(current-group(), 'SOLD_TO'))}">
<RowLabels><xsl:for-each-group select="current-group()" group-by="SOLD_TO" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:sort select="current-group()/SOLD_TO" /><Label><xsl:value-of select="current-group()/SOLD_TO" /></Label></xsl:for-each-group></RowLabels>
<DataValues><xsl:for-each-group select="current-group()" group-by="SOLD_TO" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:sort select="current-group()/SOLD_TO" />
<RowData><Cell><xsl:value-of select="sum(current-group()/SALES_FTP)" /></Cell></RowData></xsl:for-each-group></DataValues></LocalGridData></Graph>
sample data:
<?xml version="1.0" encoding="UTF-16" ?>
<ROWSET>
<ROW>
<SOLD_TO>CHARLIER LUXEMBOURG</SOLD_TO>
<SALES_FTP>60367.03</SALES_FTP>
</ROW>
<ROW>
<SOLD_TO>CHARLIER RECOGNE</SOLD_TO>
<SALES_FTP>132889.49</SALES_FTP>
</ROW>
<ROW>
<SOLD_TO>CHARLIER FRANCE</SOLD_TO>
<SALES_FTP>193256.52</SALES_FTP>
</ROW>
</ROWSET>

Similar Messages

  • Pie Chart side view in FR

    Hi,
    We are using Hyperion Financial Reports11.1.1.3, can you please how to do the Pie chart in side view mode, default it showing top view.
    Thanks

    Thankyou for your reply...
    We are tried the different ways options of Horizontal (None,Relative,left,Center,right) and Vertical(None,Relative,Top,Middle,bottom) but the pie chart showing only one view(top).
    Can you please any solution.
    Thanks

  • Pie Chart / Query : Top 3 and Remainder

    Hi
    I am trying to develop a template, which shows various exception information to the end user. There are approximately 20 exception scenarios which are analysed each night and data stored in the cube. This information is then related back to the end user via a simple web template.
    I can show that data in a table nicely.
    I have created an additional query with a "Top 3" condition applied, which results in the 3 exceptions that contribute the mos to the total being displayed. This query can then be used as the source for a pie chart, so the user can see graphically which are the most important exceptions to address.
    I have now been asked to include a "remainder" item in that pie chart, or not have the pie chart add up to 100%. What the user wants to see, is what the top 3 exceptions were, and what all the other exceptions added up to, essentially the difference between 100% and the sum of the contribution (%) of the top 3.
    I can write a query which displays the top 3, and include in that a result row which shows the sum of the percentages. So, for example, it will display the 3 and the total will be 87%, meaning the remaining errors contributed 13%, but how would I get this as an additional row in the query?
    Alternately, is it possible to have a pie chart that doesn't add up to 100%. A pie chart that is incomplete in essence?
    Any advice would be appreciated.
    Cheers,
    Andrew

    Hi Andrew,
    To show the value as a percentage and not have the total be 100%, you need to calculate the value in the query. Create a key figure to calculate the percentage and use a condition to only show the top 3. Conditions wont effect the totals or percentages so the total percentage won't add up to 100.
    I don't think it's possible to show a 'other' value with the remainder.
    Kind regards,
    Alex

  • Pie Chart Callouts Remain After Updating DataProvider

    I have a Pie Chart with an Array Collection as the
    dataProvider. When I update the dataProvider, however, the Pie
    Chart callouts are not always displayed correctly. I basically have
    a form where a user can enter percentages of catregories, and the
    percentages are displayed in a pie chart right next to the form.
    When I update a value from zero to some positive number, the
    category is displayed in the pie chart correctly. But, when I
    update that value back to zero, the callout labels get funkified.
    For instance, sometimes one label is displayed twice, or if there
    is only one category filling the pie chart (100%), the previous
    callout labels are still displayed. I debugged and found that the
    underlying ArrayCollection values are correct, but it seems the
    series is not reflecting the values in the Collection. Any ideas
    how I can fix this?
    Thanks.

    Sure! Here you go. Simply edit any of the "value" values to
    be zero, and you will see what I'm talking about. Do it multiple
    times and it gets worse and worse. I'm using SDK 3.2.
    I'm starting to think this is a bug.

  • Pie charts

    I have a pie chart works great! Its like this: 4 Brands of
    Vodka, each has been sold into x number of Accounts for my Vodka
    there are a total of 17 Accounts that have gotten sold. In my Pie
    Chart there are 4 slices (I have 4 Vodka Brands), Now I know that
    the Total number of accounts is 63. How can I take the total number
    of accounts (63) and subtract the number of accounts (17) and
    display that number (46) as another Slice called "competition". Is
    this possible?
    Thanks
    George

    Hi,
    We would need more information.
    Which Project version are you using? Is it connected to Project Server or in standalone mode?
    How did you create your existing pie chart report? Which technology?
    Please provide us more details and we'll be pleased to help you.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Getting the default pie chart colors

    Hello,
    I have a pie and a bar chart that display the same
    information... Pie charts colors are filled automatically, and I
    would like to use those colors for my bar chart as well... is there
    any way to get those colors?
    Tnanks.

    I ran into this issue myself and figured it out here:
    Can I access Flex's default Chart colors? Or can I access a Series' current color?

  • Pie Chart -- legend texts are cut (with "...")

    Hello Experts,
    when I*m using pie charts with displaying the legend, longer texts are cut (e.g.: "220/35V  60W yellow...")
    What can I do to show the complete text?
    Thanx a lot
    KR,
    Raimund

    Good Day Nics,
    the cuts are due to the size of the pie chart. you can resize your pie chart for the legends to show properly.
    Kindly tell me if im missing something.
    Regards,
    John Vincent

  • Pie chart drop shadows not printing properly.. cuts off right hand side of pie chart...???

    Every time I go to print a pie chart that has a drop shadow applied to it, it cuts off the right hand side of the chart along with the shadow itself.  It looks HORRIBLE!!!  I went through and created a bunch of reports using that method, and now ALL of them have this problem.  It makes ZERO sense to me, and it appears that nobody else is experiencing this.  Does anybody have any ideas?

    It may be a good idea to read :
    http://support.apple.com/kb/TA23140
    Yvan KOENIG (VALLAURIS, France) mardi 19 juillet 2011 19:10:01
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Automatic Fill colors for Report Builder pie charts and graphs are too repetitive and hard to differentiate

    I have pie charts or other graphs that show multiple results (7-20).  I set the "fill" colors to Automatic so that the results are dynamic (I don't want to specify a color for each result because I will then be limited that those results--I
    prefer it to be dynamic).
    I noticed that once you get above 4 or 5 results, no matter which palette is used, the "automatic" colors are so closely similar that it is hard to differentiate which color pertains to which result (group).  For example, you could have a
    reports that breaks the results into age groups like 1-18, 19-21, 22-25, 26-30, 31-41, 41-50, 51-65, 66-80, and 81+.  By the time you review the results, there's likely to be 3 pairs of colors (or more) that are so closely similar that you can't
    tell them apart (2 shades of yellow, 3 shades of blue, 2 shades of orange, or green, or teal, or purple or whatever).
    Is there a way to use Automatic for the color scheme (I don't care which color pertains to which category) but also specify to not use colors that seem to bleed together (so that someone viewing the report can actually tell the difference)?  Using SSRS
    2008 Report Builder, if it makes a difference.

    Hi JNehman,
    Reporting Services provides a list of predefined, built-in palettes that you can use to define a color set for series on your chart. All built-in palettes contain between 10 and 16 color values. You cannot extend the built-in palette to include more colors,
    so if you need more than 16 colors, you must define a custom palette.
    A custom palette let you add your own colors in the order you want them to appear on the chart. A custom palette is especially helpful if the number of series in your chart is unknown at design time. For more information, see
    Define Colors on a Chart Using a Palette (Report Builder and SSRS).
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Pie Charts causing Design mode to give warning and not preview the app

    I am using the final release. I have pie charts in my app. I
    also have column charts. Both are fed data the same way. Both work
    as expected when i build the app, and there are zero errors in the
    app. however, i was experiencing an issue in flexbuilder where in
    design mode, a vague warning was issued and the preview could not
    be displayed (blank except for very gernal 'outlines' of the layout
    and controls)
    I narrowed the problem down to the pie charts. Is anybody
    experiencing this problem? The application worked as expected, and
    previewed as expected in Design mode when previewd/built in Beta
    3.

    Hi masavran,
    For this issue, it's related to the render environment (browser/application). On Reporting Services side, we don't have any properties to change the resolution for chart to make it smoothly. We suggest you post this thread on Visual Studio forum
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=visualstudiogeneral&filter=alltypes&sort=lastpostdesc
    Or the forum of corresponding browser.
    Best Regards,
    Simon Hou

  • Problems with pie chart formatting - APEX v2

    Hi - I have created a region with an SVG Pie Chart and set the CSS to display the three segments as red, yellow and green using one of the examples from a previous forum posting. That all works fine, but I still have two issues with the chart:-
    - the legend is displaying too big and is overlapping the right hand region border which looks messy. Is there anyway to force the size of the legend as there is lots of blank space to the right of the labels/values?. If not, is there any way to get the legend to display at the bottom of the area rather than to the side of the chart?
    - the pie chart is 3D but the colours are only displaying on the side, not the top. Is there something I need to set to get this to work OK? Current CSS included below.
    Thanks Caroline
    text{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;}
    tspan{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;}
    text.title{font-weight:bold;font-size:14;fill:#000000;}
    text.moredatafound{font-size:12;}
    rect.legend{fill:#EEEEEE;stroke:#000000;stroke-width:1;}
    text.legend{font-size:10;}
    #background{fill:#FFFFFF;stroke:none;}
    rect.chartholderbackground{fill:#ffffff;stroke:#000000;stroke-width:1;}
    #timestamp{text-anchor:start;font-size:9;}
    text.tic{stroke:none;fill:#000000;font-size:12}
    line.tic{stroke:#000000;stroke-width:1px;fill:none;}
    #dial{stroke:#336699;stroke-width:2px;fill:#336699;fill-opacity:.5;}
    #dial.alert{fill:#FF0000;fill-opacity:.5;}
    #dialbackground{stroke:#000000;stroke-width:none;fill:none;filter:url(#MyFilter);}
    #dialcenter{stroke:none;fill:#111111;filter:url(#MyFilter);}
    #dialbackground-border{stroke:#DDDDDD;stroke-width:2px;fill:none;filter:url(#MyFilter);}#low{stroke-width:3;stroke:#336699;}
    #high{stroke-width:3;stroke:#FF0000;}
    #XAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;}
    text{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;}
    tspan{font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;fill:#000000;}
    text.title{font-weight:bold;font-size:14;fill:#000000;}
    text.moredatafound{font-size:12;}
    rect.legend{fill:#EEEEEE;stroke:#000000;stroke-width:1;}
    text.legend{font-size:10;}
    #background{filter:url(#MyFilter);fill:#555555;stroke:none;}
    rect.chartholderbackground{fill:#ffffff;stroke:#000000;stroke-width:1;}
    #timestamp{text-anchor:start;font-size:9;}
    text.tic{stroke:none;fill:#000000;font-size:12}
    line.tic{stroke:#000000;stroke-width:1px;fill:none;}
    #dial{stroke:#336699;stroke-width:2px;fill:#336699;fill-opacity:.5;}
    #dial.alert{fill:#FF0000;fill-opacity:.5;}
    #dialbackground{stroke:#000000;stroke-width:none;fill:none;filter:url(#MyFilter);}
    #dialcenter{stroke:none;fill:#111111;filter:url(#MyFilter);}
    #dialbackground-border{stroke:#DDDDDD;stroke-width:2px;fill:none;filter:url(#MyFilter);}#low{stroke-width:3;stroke:#336699;}
    #high{stroke-width:3;stroke:#FF0000;}
    #XAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;}
    #YAxisTitle{letter-spacing:2;kerning:auto;font-size:14;fill:#000000;text-anchor:middle;writing-mode:tb;}
    .XAxisValue{font-size:8;fill:#000000;}
    .YAxisValue{font-size:8;fill:#000000;text-anchor:end;}
    .AxisLabel{font-size:8;fill:#000000;}
    .nodatafound{stroke:#000000;stroke-width:1;font-size:12;}
    .AxisLine{stroke:#000000;stroke-width:2;fill:#FFFFFF;}
    .GridLine{stroke:#000000;stroke-width:0.3;stroke-dasharray:2,4;fill:none;}
    g.dataholder rect{stroke:#000000;stroke-width:0.5;}
    .legenditem rect{stroke:#000000;stroke-width:0.5;}
    #data1 ,rect.data1 ,path.data1{fill:#FF0000;}
    #data2 ,rect.data2 ,path.data2{fill:#FFFF00;}
    #data3 ,rect.data3 ,path.data3{fill:#00FF00;}

    hi Kishore,
    For this we have to change the .pcxml file for the pie chart .This is the path
    \OracleBI\web\app\res\s_oracle10\popbin\pie.pcxml
    http://obiee101.blogspot.com/2008/08/obiee-cusstomising-your-pcxml.html
    http://debaatobiee.wordpress.com/2009/09/26/customising-graph-obiee-a-charismatic-gradient-effect/
    I am not sure whether it will work or not but try it out
    thanks,
    saichand.v

  • Pie Chart with Legend

    Hey Experts,
    I have a small issue but cannot seem to find the solution. I have a pie chart with legends which I want to show side by side (horizontally). First pie chart and then legends. My requirement is that when the window is resized, the pie chart should also resize. I am able to show the chart and legends horizontally but when the legends list is long, the pie chart is always aligned in the center vertically. I tried setting all properties such as verticalAlign = "top", verticalCenter = "false", tried putting pie chart and legends in a separate VBox but nothing seems to work. Below is the code snippet.
    I believe others would have faced this problem. Can someone help?
    <mx:HBox width="100%" height="100%" verticalAlign="top" verticalCenter="false">
         <mx:VBox width="100%" verticalAlign="top" verticalCenter="false">
              <mx:PieChart id="pieChart" width="100%" height="100%" showDataTips="true" minWidth="200" minHeight="200" verticalCenter="false"/>
         </mx:VBox>
         <mx:VBox width="100%" verticalAlign="top" verticalCenter="false">
              <mx:Legend width="100%" height="100%" dataProvider="{pieChart}"/>
         </mx:VBox>
    </mx:HBox>

    Hi Dajji,
    Here is the code which resolves the problem...
    Note: In the code below I have removed the percentage width and height for PieChart.....that resolves the problem.....but the thing here is as you resize
    your browser window the piechart width and height will not change accordingly...? Do you need PieChart to change its dimensions as your browser window
    resizes...???
    However if you specify width="100%" and height="100%" for PieChart you never gonna acheive the PieChart to be vertically alined to top.....why because
    as you specified width="100%" and height="100%" for PieChart it occupies the total dimensions of the VBox but the actual visible portion dimensions are
    less... because within the VBox you also have the legends so Flex will assign the sizes proportionately....for PieChart and Legends..
    Hope you got my point...So you should remove the width="100%" and height="100%" for PieChart then you can acheive what you needed...
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the PieChart control. -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="100%" width="100%">
        <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 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { Country: "USA", Gold: 35, Silver:39, Bronze: 29 },
                { Country: "China", Gold: 32, Silver:17, Bronze: 14 },
                { Country: "Russia", Gold: 27, Silver:27, Bronze: 38 },
                { 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>
        <mx:Panel title="Olympics 2004 Medals Tally Panel" height="100%" width="100%" layout="horizontal" verticalAlign="top">
               <mx:VBox verticalAlign="top" height="100%" width="100%">
                 <mx:PieChart id="chart"
                     showDataTips="true"
                     dataProvider="{medalsAC}">         
                     <mx:series>
                         <mx:PieSeries
                             nameField="Country"
                             field="Gold"
                             labelFunction="displayGold">
                         </mx:PieSeries>
                     </mx:series>
                 </mx:PieChart> 
               </mx:VBox>                 
             <mx:Legend dataProvider="{chart}"/>
        </mx:Panel>
    </mx:Application>
    Thanks,
    Bhasker Chari

  • Dynamically Labeling a pie chart (arc2d_pie)

    Can Somebody guide me how to Dynamically labling a pie chart inside or outside of it.Atpresent I am using rectangle color-code for labling at the top and left side of arch2d but its very confusing as the pie segments grows in number .I am submitting my source code for the pie chart for your reference.You are requested to please guide me with some concrete example as soon as possible .Thanks in advanceimport java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.util.Random;
    import java.sql.*;
    import java.math.BigDecimal;
    public class pie2d extends JPanel{
         Connection con;
         Statement stmt;
         Vector vc,conVector;
         int arraincrement,sum,pieMinusAngle,IntegerToInt;
         double sumAngle,allAngleSum;
         public void pie(Graphics g){
              try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String connection_string="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=D:\\bhanu\\bhanu.mdb;DriverID=22";
    con=DriverManager.getConnection(connection_string);
    stmt=con.createStatement();
    catch(Exception er){
         System.out.println("could not connect to database"+er);
    vc=new Vector();
    conVector=new Vector();
    try{
         ResultSet res=stmt.executeQuery("select contractor,count(contractor)as totalcon from daily group by contractor");
    System.out.println("Result set executed");
    while(res.next()){
         String tovector=res.getString("totalcon");
         String contractor=res.getString("contractor");
         conVector.add(contractor);
         int stringToInt=Integer.parseInt(tovector);
         vc.add(stringToInt);
    catch(Exception e){
         System.out.println("Result set error"+e);
              Graphics2D g2d=(Graphics2D)g;
              Random generator = new Random();
              g2d.setFont(new Font("Arial",Font.BOLD,15));
         int vectorsize=vc.size();
         for(int i=0;i<vectorsize;i++){
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
         int IntegerToInt=objToInt.intValue();
    sum=sum+IntegerToInt;
         int pieAngle=360;
         for(int i=0;i<vectorsize;i++){
         System.out.println("sum is now :"+sum);     
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
          IntegerToInt=objToInt.intValue();
         double DivideAngle=(double)((360/sum)*IntegerToInt);
         allAngleSum=allAngleSum+DivideAngle;
         if(allAngleSum<360){
         double sumCalculate=(360-allAngleSum)/vectorsize;
         for(int i=0;i<vectorsize;i++){
         System.out.println("sum is now :"+sum);     
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
          IntegerToInt=objToInt.intValue();
         double DivideAngle=(double)((360/sum)*IntegerToInt)+sumCalculate;
         Object contractorObj=conVector.elementAt(i);
         String contractor=(String)contractorObj;
         int Rnewcolor=generator.nextInt(255);
         int Gnewcolor=generator.nextInt(255);
         int Bnewcolor=generator.nextInt(255);     
         g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
         g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
         sumAngle=sumAngle+DivideAngle;
         String intToString=Integer.toString(IntegerToInt);
         if(i<7){
         g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
         g2d.drawString(intToString,i*73,100);
         g2d.drawString(contractor,i*73,120);//top horizontal
         else{
              g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
         g2d.drawString(intToString,55,i*42);
              g2d.drawString(contractor,75,i*42);
         if(allAngleSum>360){
         double sumCalculate=(allAngleSum-360)/vectorsize;
         for(int i=0;i<vectorsize;i++){
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
          IntegerToInt=objToInt.intValue();
         double DivideAngle=(double)((360/sum)*IntegerToInt)-sumCalculate;
         Object contractorObj=conVector.elementAt(i);
         String contractor=(String)contractorObj;
         int Rnewcolor=generator.nextInt(255);
         int Gnewcolor=generator.nextInt(255);
         int Bnewcolor=generator.nextInt(255);     
         g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
         g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
         sumAngle=sumAngle+DivideAngle;
         String intToString=Integer.toString(IntegerToInt);
         if(i<7){
         g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
         g2d.drawString(intToString,i*73,100);
         g2d.drawString(contractor,i*73,120);//top horizontal
         else{
              g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
         g2d.drawString(intToString,55,i*42);
              g2d.drawString(contractor,75,i*42);
         sum=0;
         sumAngle=0;
         allAngleSum=0;
         try{
              stmt.close();
              con.close();
         catch(Exception e){
              System.out.println("Could not close connections"+e);
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              pie(g);
    }

    Can Somebody guide me how to Dynamically labling a pie chart inside or outside of it.Atpresent I am using rectangle color-code for labling at the top and left side of arch2d but its very confusing as the pie segments grows in number .I am submitting my source code for the pie chart for your reference.You are requested to please guide me with some concrete example as soon as possible .Thanks in advanceimport java.io.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.util.Random;
    import java.sql.*;
    import java.math.BigDecimal;
    public class pie2d extends JPanel{
         Connection con;
         Statement stmt;
         Vector vc,conVector;
         int arraincrement,sum,pieMinusAngle,IntegerToInt;
         double sumAngle,allAngleSum;
         public void pie(Graphics g){
              try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String connection_string="jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};Dbq=D:\\bhanu\\bhanu.mdb;DriverID=22";
    con=DriverManager.getConnection(connection_string);
    stmt=con.createStatement();
    catch(Exception er){
         System.out.println("could not connect to database"+er);
    vc=new Vector();
    conVector=new Vector();
    try{
         ResultSet res=stmt.executeQuery("select contractor,count(contractor)as totalcon from daily group by contractor");
    System.out.println("Result set executed");
    while(res.next()){
         String tovector=res.getString("totalcon");
         String contractor=res.getString("contractor");
         conVector.add(contractor);
         int stringToInt=Integer.parseInt(tovector);
         vc.add(stringToInt);
    catch(Exception e){
         System.out.println("Result set error"+e);
              Graphics2D g2d=(Graphics2D)g;
              Random generator = new Random();
              g2d.setFont(new Font("Arial",Font.BOLD,15));
         int vectorsize=vc.size();
         for(int i=0;i<vectorsize;i++){
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
         int IntegerToInt=objToInt.intValue();
    sum=sum+IntegerToInt;
         int pieAngle=360;
         for(int i=0;i<vectorsize;i++){
         System.out.println("sum is now :"+sum);     
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
          IntegerToInt=objToInt.intValue();
         double DivideAngle=(double)((360/sum)*IntegerToInt);
         allAngleSum=allAngleSum+DivideAngle;
         if(allAngleSum<360){
         double sumCalculate=(360-allAngleSum)/vectorsize;
         for(int i=0;i<vectorsize;i++){
         System.out.println("sum is now :"+sum);     
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
          IntegerToInt=objToInt.intValue();
         double DivideAngle=(double)((360/sum)*IntegerToInt)+sumCalculate;
         Object contractorObj=conVector.elementAt(i);
         String contractor=(String)contractorObj;
         int Rnewcolor=generator.nextInt(255);
         int Gnewcolor=generator.nextInt(255);
         int Bnewcolor=generator.nextInt(255);     
         g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
         g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
         sumAngle=sumAngle+DivideAngle;
         String intToString=Integer.toString(IntegerToInt);
         if(i<7){
         g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
         g2d.drawString(intToString,i*73,100);
         g2d.drawString(contractor,i*73,120);//top horizontal
         else{
              g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
         g2d.drawString(intToString,55,i*42);
              g2d.drawString(contractor,75,i*42);
         if(allAngleSum>360){
         double sumCalculate=(allAngleSum-360)/vectorsize;
         for(int i=0;i<vectorsize;i++){
         Object getInt=vc.elementAt(i);
         Integer objToInt=(Integer)getInt;
          IntegerToInt=objToInt.intValue();
         double DivideAngle=(double)((360/sum)*IntegerToInt)-sumCalculate;
         Object contractorObj=conVector.elementAt(i);
         String contractor=(String)contractorObj;
         int Rnewcolor=generator.nextInt(255);
         int Gnewcolor=generator.nextInt(255);
         int Bnewcolor=generator.nextInt(255);     
         g2d.setPaint(new Color(Rnewcolor,Gnewcolor,Bnewcolor));
         g2d.fill(new Arc2D.Double( 240, 200, 400, 400, sumAngle,DivideAngle, Arc2D.PIE ) );
         sumAngle=sumAngle+DivideAngle;
         String intToString=Integer.toString(IntegerToInt);
         if(i<7){
         g2d.fill(new Rectangle2D.Double(i*70,50,30,30));
         g2d.drawString(intToString,i*73,100);
         g2d.drawString(contractor,i*73,120);//top horizontal
         else{
              g2d.fill(new Rectangle2D.Double(20,i*40,30,30));
         g2d.drawString(intToString,55,i*42);
              g2d.drawString(contractor,75,i*42);
         sum=0;
         sumAngle=0;
         allAngleSum=0;
         try{
              stmt.close();
              con.close();
         catch(Exception e){
              System.out.println("Could not close connections"+e);
         public void paintComponent(Graphics g){
              super.paintComponent(g);
              pie(g);
    }

  • ITS and Pie Charts

    We need to display charts (bar and pie) in a Web report/application running on SAP 4.6 and ITS (no WebAS, no BSP, no Portal). We need those charts to be real-time (not saved as a static image). The charts are user-specific. How would you do it?
    I have few ideas:
    1. Build bar charts with HTML tables or image blocks. No pie charts are possible.
    2. Generate PDFs using Sapscript/Smartforms and call PDF from the Web page. Questions: Can you have charts in this solution? Can you generate those PDFs on the fly?
    3. Use Adobe SVG for client side charts (SVG viewer is required)
    4. Use ActiveX or Java Applets
    Thank you for advice.

    Kai,
    It's a great suggestion to use IGS. But I am still not sure how this would work. Yes, I can use classes in the ABAP dialog program to call IGS. But how do I pass the images to ITS?
    I see few possible scenarios. Am I close?
    1. Responding to a call from ABAP, IGS is generating a GIF image and saves it in a location accessible from the Web (e.g. ITS WGate or IGS server). IGS is returning a reference for the image name/location to the ABAP dialog program. The reference is passed to ITS HTML template.
    2. Responding to a call from ABAP, IGS is returning a bitstream of the image back to the calling program. There should be a way to save it as GIF in ABAP and post the GIF image to WGate as a MIME object. Also, if I can save it a GIF in SAP, I can alternatively build a smartform that would use that newly generated GIF and convert the document into a PDF an then display the PDF with a text and charts on the Web.
    3. You call IGS directly from ITS, not the ABAP. You pass parameters to IGS telling what chart do you need and what data to use. IGS returns a GIF image back to ITS.
    Can please provide some clarity here.
    Thank you,
    Andre Polakoff

  • Creating a donught shaped pie chart with javascript elements

    Good morning chaps,
    We recently built our new company website which we're happy enough with. However one element we tried to capture was an interactive donught shaped pie chart, using javascript to click on each seperate section.
    The end result can be viewed at;
    http://insight247.co.uk/index.php?page=aboutus
    You'll notice imemdiately that the part that's a little off is the text which sits in each section. IS there an easier way to combine the graphic, text and javascript to achieve the effect we're looking for?
    Many thanks to all responses.

    Stephen,
    There are a few strange parts: the irregular text, the irregular shapes of the underlying ring parts (which do not have consistent widths at the gaps), and the outer glow (or whatever) which correponds to a full ring on the inside but partially to separate objects on the outside.
    IS there an easier way
    Maybe not easier, but more accurate; the specific appearance is somewhat demanding.
    To get the right shape of both ring parts and letters and different choices concerning the outer glow, you may (Smart Guides are your friends):
    1) Create a fill/nostroke rectangle with the same height as the ring parts and an arbitrary length, then Object>Transform>Move a copy by the length, then Ctrl/Cmd+D to repeat 4 times;
    2) Select all six rectangles and in the Brushes palette flyout tick New Brush, select Art Brush with default settings;
    3) Create a 1pt stroke/nofill circle corresponding to the middle of the ring parts where the text bits are supposed to be, apply the Art brush to it, Object>Expand Appearance, and move the circle to the top in the Layers palette, above the Group;
    4) Direct Select each of the 6 ring parts and apply the desired colour (you may rotate later, see below);
    5) Select the stroked circle and with the Scissors Tool click where the ring parts meet (Smart Guides say intersect except at the sides where they say anchor) so you have 6 circle parts to match the ring parts, then select the 4 circle parts that are not at top and bottom and Object>Path>Add Anchor Points so you have a centre point for each of them (you had one already at top and bottom);
    6) Select one of the circle parts and with the Path Type Tool click on the centre point, then type the text bit and in the Character palette adjust the Baseline Shift once and for all (you may need to tick Show Options in the flyout);
    7) Repeat 6) for the other circle parts (except the Baseline Shift);
    8) Select the ring parts group and Effect>Stylize>Outer Glow, adjust the colour (black) and settings to make it look as desired;
    9) With the Direct Selection Tool click where two ring parts meet (avoid the Path Type) to select an end segment and Ctrl/Cmd+C+F+X+F to create a straight stroke/nofill path at the very top of the stacking order, then change the Stroke Weight to the desired width of the gap between ring parts and change the Colour to white;
    10) Repeat 9) on the opposite side of the circle, select both 9) and 10) and rotate copies twice by 60 degrees, group all;
    11) Rotate everything by 30 degrees to amtch the angles of the image.
    Now you have the final appearance with white gaps. If you want to have gaps in the same colour as the background, you may:
    12) Select everything and in the Appearance palette flyout tick Make Opacity Mask, with Clip unticked and Invert Mask ticked.
    If you want to hide the outer glow at the gaps at the outside (as in the image) or at the inside or both, you may extend the lines in 9) and 10) at either or both ends.

Maybe you are looking for