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

Similar Messages

  • Creating a SVG Pie Chart With Different Portion Linking To Different URL

    Is it possible to create a SVG pie chart in which different portion will point to different URL. on HTML DB version 1.5.1.00.12
    For example i've tried something like this:
    on page 20 i have a svg pie chart
    select
    'f?p=&APP_ID.:21:#APP_SESSION#::::P21_DD_SALESORG:'||region,region,code from demo_region;
    i have a query in page 21 like this:
    select country from demo_country where region= :P21_DD_SALESORG;
    so when i click on a particular region on the pie chart on page 20 the value of item
    P21_DD_SALESORG on 21 should be set.
    but the value of P21_DD_SALESORG is always getting passed as NULL from the pie chart.
    I've tried it on HTML DB version 1.5.1.00.12
    Look for an early reply
    Thanks & Regards,
    Rupak
    Message was edited by:
    user445907

    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

  • Pie chart wedge itemRollOver

    I need help with creating a custom pie chart class that will allow a function call on pie wedge rollOver.
    Right now I can get a function call on rollover using itemRollOver using;
    import mx.charts.events.ChartItemEvent;
    -in the <mx:PieChart>;
    itemRollOver="pieChart_itemRoll(event);"
    -which calls this function
    private function pieChart_itemRoll(evt:ChartItemEvent):void {
                    var psi:PieSeriesItem = evt.hitData.chartItem as PieSeriesItem;
                    trace(psi.item.target);
    Please advise on how can I put this into a custom PieChart .as that extends PieChart?
    Currently itemRollOver in my custom class throws an undefined property error.
    Thanks.

    OK, now I get it. So you would need to place your two PieCharts in a s:Group or mx:Canvas. On top of the pie charts, lay another s:Group on which you will do some drawing on its graphics:Graphics object.
    In your case, you need to use dataToLocal() (will give you pixel coordinates in your chart) then localToGlobal()  (convert to Application coordinates) then globalToLocal() (convert to the Top Group or Canvas coordinates you want to draw in) :
    Using the dataToLocal() method
    The dataToLocal() method converts a set of values to x  and y coordinates on the screen. The values you give the method are in  the "data space" of the chart; this method converts these values to  coordinates. The data space is the collection of all possible combinations of data values that a chart can represent.
    The number and meaning of arguments passed to the dataToLocal() method depend on the chart type. For CartesianChart controls, such as the BarChart and ColumnChart controls, the first value is used to map along the x axis, and the second value is used to map along the y axis.
    For PolarChart controls, such as the PieChart control, the first value maps to the angle around the center of the  chart, and the second value maps to the distance from the center of the  chart along the radius.
    The coordinates returned are based on 0,0  being the upper-left corner of the chart. For a ColumnChart control, for  example, the height of the column is inversely related to the x  coordinate that is returned.
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#localToGlobal%28%29
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayOb ject.html#globalToLocal%28%29

  • Create Pie Chart and Vertical bar chart using report builder 3.0 with sharepoint custom list

    Hi All,
    I have a client requirement to create reports which should show the graphical representation of SharePoint Custom List data. The reports are Month wise and YTD. Also i have to create dashboard.
    For creating reports, i have heard about Report Builder and SSRS. I have SQL server 2008r2 and installed report builder 3.0 but i am not aware of creating reports(KPI, Pie Chart, Vertical bar, etc.,) with sharepoint customlist.
    Can some one please help me on this.
    MercuryMan

    Here is some information about using the SharePoint List Data source with SSRS/Report Builder/BIDS:
    http://www.infotoad.com/blog/post/2012/10/11/using-a-sharepoint-list-connection-type-as-a-data-source-for-reporting-services.aspx
    http://technet.microsoft.com/en-us/library/ee633650.aspx
    http://www.codeproject.com/Articles/24469/SQL-Reporting-Services-data-from-SharePoint-lists
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How to create a pie chart with jsp/servlet?

    I want to create a servlet which can be used like below:
    <img src="pieservlet?param1=<%=x%>&param2=<%=y%>&..." width="100" height="100" >
    can you give me some guide?

    Hai ,
    I have implemented a trial working pie chart , dynamically created from jsp using ServletOutputStream , BufferedImage & JPEGImageEncoder (found in com.sun.image.codec.jpeg.* package & bundled along with jdk ) .
    <%
    ServletOutputStream sout = response.getOutputStream();
    response.setContentType("image/jpeg");
    BufferedImage img = new BufferedImage(400,400,BufferedImage.TYPE_INT_RGB);
    Graphics2D gr = img.createGraphics();
    /* Actually this will be got as values of request.getParameter */
    Vector values = new Vector();
    values.addElement(new String("45") );
    values.addElement(new String("125") );
    values.addElement(new String("75") );
    values.addElement(new String("25") );
    values.addElement(new String("90") );
    // my demo class      
    temp.pieChart fr = new temp.pieChart(400,400,values);
    /* This pieChart is class extends JFrame , in paint method of it all Drawing of pie chart using graphics2D fillArc done */
    fr.paint(gr);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sout);
    encoder.encode(img);
    sout.flush();
    %>
    Hope this helps to build your own custom pie chart .
    Let me know if details needed on pieChart class
    rakesh
         

  • Pie chart created in edge animate changes to a square animation when imported into dps

    I Have created an animated pie chart in edge animate and all works fine.
    I then import into indesign and again all looks fine (even though at this stage it is a flat image) but when i export for dps and preview folio etc the animation turns from a circle to a square.
    Anyone have any pointers or experinced the same problem etc?
    Cheers

    The top image is a screen shot from edge and what it should be like, and the bottom image is of when you preview it in dps
    Also when i view this in browser via edge animate and then preview it seems fine and as you can see on the bottom image when i import the oam into indesign again it is fine but then when I come to preview my 'folio it turns the animation from a circle into a square.
    Also if its any help, the animation works perfectly if exported by epubs and viewed through ibooks.
    Thanks,

  • Creating pie chart diagram in java  and converting into BMP file

    hi all ,
    my req. is to create draw a pie chart diagram and store
    the picture in BMP. it is Possible. if so how ?
    cheers
    senthil

    Hi Senthil,
    This response is a bit late but I hope it can help in some way.  Your requirement (to create draw a pie chart diagram and store the picture in BMP) is possible and actually quite easy if you don't mind using two open source libraries.  In his previous response to this thread, Detlev mentioned JFreeChart for as a solution for charting however he also mentioned that it lacks support for BMP.  Although this is true, you can use the JFreeChart library (http://www.jfree.org/jfreechart/index.html) in conjunction with an imaging library to meet your requirement.  I have used JFreeChart on multiple projects and I highly recommend it.  For the imaging library you have many options, however the only one I have used is The Java Imaging Utilities (JIU - http://jiu.sourceforge.net/).  Using these two class libraries, you can generate your pie chart and save it to a BMP file with the following block of code:
         try
             JFreeChart chart = this.createChart();
             FileOutputStream streamOut = new FileOutputStream("your/files/path/BMPfile.bmp");
             BufferedImage image = chart.createBufferedImage(600, 300);
             if(image == null)
                  reportError("Chart Image is NULL!!!!!!!!");
                  return(false);
             RGB24Image rgbImage = ImageCreator.convertImageToRGB24Image(image);
             Codec codec = new BMPCodec();
             codec.setImage(rgbImage);
             codec.setOutputStream(streamOut);
             codec.process();
             codec.close();
             streamOut.flush();
             streamOut.close();
        }catch(IOException ioExcept)
             // throw or handle IOException...
             return(false);
        }catch(OperationFailedException opFailedExcept)
             // throw or handle OperationFailedException...
             return(false);
    The first line inside the catch block calls a helper method that should create the actual chart using the JFreeChart library.  Once you have your chart instance (all chart types are represented using the JFreeChart class), you can then retrieve a BufferedImage of the chart (JFreeChart.createBufferedImage(int width, int height);).  In our situation, the BufferedImage class will act as an "intermediate" class, for both libraries (the charting and imaging) can make sense of BufferedImages.  The rest of the code deals with storing the generated chart (the BufferedImage) as a BMP file to disk.  The RGB24Image, Codec, BMPCodec, CodecMode, and OperationFailedException classes are all part of the JIU library.  Also, note that the storage  source is not solely limited to a File on disk; the Codec.setOutputStream(OutputStream os) method will accept any subclass of OutputStream.  This implies that not only can you store to the actual App Server disk (where your app is running) but also to sources such as Knowledge Management (KM) resources or even directly to the clients browser (in the case of an iView). 
    Once again, sorry for the late response and let me know if you have any questions regarding the code above. 
    Regards,
    Michael Portner

  • Business Graphics:Create multiple Pie charts dynamically

    Hi Experts,
    I have a requirement to create 10 different pie chart in a view in a Grid layout.
    The charts will be created dynamically because the data will be known at runtime.
    Any type of help will be appreciated
    Regards.

    Hi,
    Here is a simple example:
    you must write this code in wdDoModfy() method, in if (firstTime){}
    in the layout there is already created one transperent container with id BG_CONTAINER
    //add a node
    IWDNodeInfo loDynNode = wdContext.getNodeInfo().addChild("DynNode", null, true, false, true, false, false, true, null, null, null);
    //add some attributes to it
              loDynNode.addAttribute("DynAttr1Str", "ddic:com.sap.dictionary.string");
              loDynNode.addAttribute("DynAttr2Int", "ddic:com.sap.dictionary.integer");
    //get the node
              IWDNode node = wdContext.getChildNode("DynNode", 0);
    //fill the node with some values
              for (int i = 0; i < 10; i ++){
                   IWDNodeElement element = node.createElement();
                   element.setAttributeValue("DynAttr1Str", "Str value " + i);
                   element.setAttributeValue("DynAttr2Int", new Integer(i));
                   // Add to the content
                   node.addElement(element);
    //get the attributes, we will use the attrinfo to bind them to the series
              IWDAttributeInfo loDynAttr1StrInfo = loDynNode.getAttribute("DynAttr1Str");
              IWDAttributeInfo loDynAttr2IntInfo = loDynNode.getAttribute("DynAttr2Int");
    //create the graphics
              IWDBusinessGraphics loGraphics = (IWDBusinessGraphics)view.createElement(IWDBusinessGraphics.class,"bg1");
    //set the type to pie
              loGraphics.setChartType(WDBusinessGraphicsType.PIE);
    //create a simple series and bind the integer attribute to it
              IWDSimpleSeries loSSeries = (IWDSimpleSeries)view.createElement(IWDSimpleSeries.class, "Series1");
              loSSeries.bindValue(loDynAttr2IntInfo);
    //create the  category and bind the string attribute to it
              IWDCategory loCategory = (IWDCategory)view.createElement(IWDCategory.class,"Category1");
              loCategory.bindDescription(loDynAttr1StrInfo);
    //add series and category
              loGraphics.addSeries(loSSeries);
              loGraphics.setCategory(loCategory);
    //I assume that there is a transperent container already created design time to put the graphics there
    //container with id BG_CONTAINER
              IWDTransparentContainer loContainer =  (IWDTransparentContainer)view.getElement("BG_CONTAINER");
    //add the graphics
              loContainer.addChild(loGraphics);
    If this is the type of graphics you need then you must simply do a for cycle and supply the graphics with the right node elements and you are ready.
    Best regards,
    Anton

  • Create a pie chart autoshape and specify exact angles

    I am able to use the Pie Chart autoshape tool to create a new pie chart with segments. Is it possible to specify the exact angles I want for these segments?

    You can customize the segments with the AutoShape Properties panel.

  • Need help to make a Pie Chart

    I am trying to draw a pie chart for the Uptime Report.
    I have the Following table definition.
    create table downtime_detail ( env_code number, down_start date, down_end date );
    insert into downtime_detail values (1,to_date('26-JAN-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('26-JAN-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('26-JAN-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('26-JAN-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('01-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('03-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('15-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('15-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    insert into downtime_detail values (2,to_date('26-FEB-2008 02:00:00','DD-MON-YYYY HH24:MI:SS'),to_date('28-FEB-2008 03:00:00','DD-MON-YYYY HH24:MI:SS') );
    Now the Below Query returns me the values val1 and val2 on the basis of which I need to draw a Pie Chart.
    ==========================================================
    select round((DOWN/TOTAL)*100,2) val1 , round(100-((DOWN/TOTAL)*100),2) val2
    from
         (select sum((DOWN_END - DOWN_START)*24) DOWN from DOWNTIME_DETAIL where ENV_CODE=2 ) a ,
         (select ((sysdate - to_date('01-JAN-2008','DD-MON-YYYY')) * 24) TOTAL from dual ) b
    VAL1 VAL2
    3.64 96.36
    ==========================================================
    Can someone help me try do this ?
    Actually I tried but I couldnt put my custom query to get this Pie chart. Or if there is any other better approach please let me know.

    nikhilskamik,
    I believe all that you are missing in your sql is a NULL. Below is the help text for creating a Flash pie chart.
    Specify the SQL query that will populate your chart, for example:
    select null, ename, sal
    from emp
    Alternatively you can write a PL/SQL function return a SQL query, for example:
    begin
    return 'select null, ename, sal from emp';
    end;
    Your query should then read:
    select null,round((DOWN/TOTAL)*100,2) val1 , round(100-((DOWN/TOTAL)*100),2) val2
    from
    (select sum((DOWN_END - DOWN_START)*24) DOWN from DOWNTIME_DETAIL where ENV_CODE=2 ) a ,
    (select ((sysdate - to_date('01-JAN-2008','DD-MON-YYYY')) * 24) TOTAL from dual ) b
    Jeff

  • Anychart pie chart - setting colours to match output (RAG)

    Hi,
    I have a table detailing outstanding issues each with a traffic light status of either red, amber or green. I would like to create an anychart pie chart whose colours match their status to give an easy visual representation of the data.
    I have managed to get it working if there's data in the table for each status type; I've used customised colours in the pie chart and used ORDER by in my SQL (the order of the customised colours listed to match the order of the SQL output), however, if one of the status' has a null value, the colours are assigned Amber 1st, Green 2nd and Red 3rd meaning that if there are no issues of Amber status the green status issues will be amber in colour on the pie chart etc.
    Is this possible to assign specific colours and if so how can I do it?
    I'm working on Apex 3.2.1.
    Thanks in advance

    I've managed to sort this now.
    In case anyone is interested, I created a view that would display the totals for each RAG status including a 0 if total is null and then set custom colours for the pie chart in the order to match the SQL output (i.e. A (amber) first, G (green) second, R (red) third). Simple but it works for my needs.

  • Pie Chart Sector Color

    Hi,
    I am using below query to create a flash pie chart. It return count of "RED" , "GREEN" and "YELLOW" from the color field
    I used the custom color to color first value as "RED", second as "GREEN" , and third as "YELLOW"
    select  null link,
                color ,
                count( color ) value
    from table;Above is working fine if all RED , GREEN AND YELLOW ARE GREATER THAN ZERO.
    Now if there is no RED in the filed, then PI CHART contain only two region one for Green and second for Yellow.
    Problem :--
    If red is not there the value representing the count is green is show in red color.
    How to avoid this
    Thanks
    Shijesh

    Hi Andy,
    I tried the above method but its not working for me..
    here is the query which I am using..
    DECLARE
    vqry varchar(5000);
    begin
        vqry := 'select link , LABEL , sum(value) from
    (select null link, ''Red'' LABEL , user_id , COUNT(SR_PROJECT.PROJECT_STATUS_ID) value
    from  SR_PROJECT where SR_PROJECT.PROJECT_STATUS_ID=1 and
    SR_PROJECT.CURRENT_STATUS_ID NOT IN ( 5 , 6) group by user_id
    union
    select null link, ''Green'' LABEL , user_id ,COUNT(SR_PROJECT.PROJECT_STATUS_ID) value
    from  SR_PROJECT where SR_PROJECT.PROJECT_STATUS_ID=2 and
    SR_PROJECT.CURRENT_STATUS_ID NOT IN ( 5 , 6) group by user_id
    union
    select null link, ''Yellow'' LABEL , user_id , COUNT(SR_PROJECT.PROJECT_STATUS_ID) value
    from  SR_PROJECT where SR_PROJECT.PROJECT_STATUS_ID=3 and
    SR_PROJECT.CURRENT_STATUS_ID NOT IN ( 5 , 6) group by user_id )';
    if :P50_PROJECT_OWNER <> 0 OR :P50_PROJECT_OWNER <> NULL THEN
        vqry := vqry || ' where USER_ID = ' || :P50_PROJECT_OWNER;
    END IF;
    vqry := vqry || ' group by  LABEL ,link';
    return vqry;
    end;I'm using Function Returning SQL Query. Is this the reason why I'm not able to get the result

  • Interactive Reporting - Dragging a Pie Chart into a Report

    I have a report that contains about 5 charts at the end of all the tables containing data (the charts are in the report footer). I have created a new pie chart and want to drag it into the report footer as well. When I drag it in, it goes at the very beginning of the report footer. I have tried dragging it down and it seems to only want to stay on that very first page of the report footer. I am not able to move it onto a different page. How do I make this work? What I'd really like to do is add a new page in the middle of the charts and put this new chart on that new page ... but i couldn't figure out how to do that, so I was just going to drag the new chart to the very bottom of the other charts.
    Thanks.
    Terri T.

    Terri
    I had a case where I needed "extra" Report Footers. To do this I created bogus Report Group Columns in my results section with a constant value, same for all rows.
    I then used this as a Report Group in the Report Section. I turned off the Group Header and Turned On the Group Footer with a Page Break Before or After. If you have other Report Groups then you would need to make the Bogus Report Group Column before any of your business report groups.
    Wayne Van Sluys
    TopDown Consulting

  • SVG Pie Chart drill down report

    I have created a svg pie chart report within a chart region. the chart contains url drill down.
    The urls work fine but it opens the result from the url in the same chart region on the same page.
    How can I get it to open on either a new page altogether or on another region on the same page.
    Regards
    iculhane

    How do you get the url drill down to work? Can you explain to me? I have a 3d pie chart, what I want is when I click one of the pieces, it will drill down to a report.
    Thanks,
    Helen

  • Pie Chart Drill Down Report

    Hello All,
    Please help. I created a 2D Pie chart. How do I get chart to drill down to a report based on the slice of pie I click. I've already created the report. I can't seem to get the link working.
    Artnette

    Artnette,
    See this example:
    http://htmldb.oracle.com/pls/otn/f?p=31517:156
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

Maybe you are looking for