Problem with Pie Chart

Hi Experts!!
I've a little problem with a Pie Chart, I want to present a Pie Chart with 3 values which are defined on the Data Series, when I deploy I get the message: "Expected exactly 1 data series in XXXXX chart. Extra data series ignored". I don't understand why, because if I try to do a Column Chart with the same information, it works Ok!
Can anybody help me please?.
Emilio.

Multiple data series with Pie Chart is not possible. you must have one series if u r using pie chart

Similar Messages

  • Problem with Pie chart, Store Procedure and Category Axis

    Hi All,
    I'm having a problem when i try to use a Pie Chart with a store procedure
    when Category Axis - Field value is "none", the chart appears, but the description say Undefined
    but when i put any field from store procedure, the chart doesn't show.
    when I try the same with a normal SQL statement, all data was displayed
    my store procedure only have 2 columns
    n - numeric
    state - text
    The Store Procedure and the SQL, returns the same data in the same order
    Thanks in advance
    Cristian

    Hi guys,
    I need guide on creating a system using store procedure, referring to this thread: JDBC System Connection VS BI JDBC System Connection
    Hope you can help me out.
    Thanks a lot,
    Sarah

  • Problem with Pie Chart Size

    I am using the CL_GUI_CHART_ENGINE to show pie charts in a dashboard format. One of my charts has just started to randomly decide to display the pie slices incorrectly.
    this is the XML for the data
    <Chartdata>
      <Categories>
        <Category>Fax</Category>
        <Category>Phone call</Category>
        <Category>Phone Support</Category>
        <Category>Emergency service</Category>
        <Category>Web</Category>
        <Category>Email</Category>
        <Category>EDI</Category>
      </Categories>
      <Series label="Series" customizing="Series">
        <Point label="$26,815.03">
          <Value type="y">26,815.03</Value>
        </Point>
        <Point label="$17,045.12">
          <Value type="y">17,045.12</Value>
        </Point>
        <Point>
          <Value type="y">0.00</Value>
        </Point>
        <Point>
          <Value type="y">0.00</Value>
        </Point>
        <Point label="$33,914.70">
          <Value type="y">33,914.70</Value>
        </Point>
        <Point label="$23,731.63">
          <Value type="y">23,731.63</Value>
        </Point>
        <Point label="$973.08">
          <Value type="y">973.08</Value>
        </Point>
      </Series>
    </Chartdata>
    The problem is, the last point on the pie chart is showing like it is about 85% of the pie. I admit, this is my first attempt at this, but why would it be OK, then suddenly NOT OK.  Any ideas on what i may have coded incorrectly? what does the type indicator in the Value tag represent? i have looked at the documentation available for the chart engine, and it is pretty weak on specifics.
    by the way, the label on the very large part of the pie is $973.08, which is considerably less than the values in the other "slices". The data is correct, as far as having the correct values. it is just suddenly displaying it incorrectly, putting the wrong size slice with the categories.
    Edited by: David Knittle on Nov 22, 2010 1:32 PM

    could it be because the chart is interpreting the values as text values instead of numbers? and 9 would then be much larger than ther other values? I'd try values without comma....tell it it's a numeric value like 12345.67.

  • 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

  • Problem with Pie chart and Hierarchy

    I have to display a Pie chart according to a hierarchy.
    The top node claims half of the chart.
    <u>A hierarchy for example</u>:
    Division A            450
       Department A1  100     
       Department A2  150
       Department A3  200
    The Pie chart  is divided to 4 parts (instead of 3), where Division A  takes 50%.
    I don’t want Division A to be seen in the chart.
    The best solution would be if WAD could ignore the first category.
    Thanks and best regards,
    Sigal.

    In WAD, mark the SUPPRESS_OPENHIERARCHIENODES parameter of the Pie Data Provider.

  • Regarding Pages charts, when I try to 'build' a 3D chart all I get is little dots but not graphics.  No problems with 2D charts though. Guess my question is "Help?"

    Regarding Pages charts, when I try to 'build' a 3D chart all I get is little dots but not graphics.  No problems with 2D charts though. Guess my question is "Help?"

    Sorry for the delay getting back to this.
    Thanks to Fruhulda and Peter for their comments regarding the refusal of Pages to let me make 3D charts. 
    In answer to the questions put to  me in this regard :
    1. Pages version : Pages '09  v.4.1 (923)
    2. Mac O/S :          v.10.6.8 
    3. 3D chart :          Can't find a 'name', but upright bars with rounded corners ???
    4. Moved apps :    Not that I'm aware of!  All should be as installed off the disc.
    5. A note :              I have been able to create these in the past - related to a SW update? 
                          and ... can create these charts perfectly in Keynote (go figure).
    Thanks to all.
    CM

  • Problem with Area  Chart

    Hi EveryOne,
    Me having problem with area chart,i have taken 3 area series
    to plot when me plotting the values one of the series is getting
    overlapped,Why its happening like this? Me attached the code
    Thanks in advance.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script><![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var expenses:ArrayCollection = new ArrayCollection([
    {Month:"Jan", Profit:0, Expenses:0, Amount:450},
    {Month:"Feb", Profit:5, Expenses:0, Amount:600},
    {Month:"Mar", Profit:5, Expenses:5, Amount:300},
    {Month:"Mar", Profit:0, Expenses:5, Amount:300}
    public var expenses1:ArrayCollection = new ArrayCollection([
    {Month:"Jan", Profit:0, Expenses:5, Amount:450},
    {Month:"Feb", Profit:5, Expenses:5, Amount:600},
    {Month:"Mar", Profit:5, Expenses:10, Amount:300},
    {Month:"Mar", Profit:0, Expenses:10, Amount:300}
    public var expenses2:ArrayCollection = new ArrayCollection([
    {Month:"Jan", Profit:5, Expenses:0, Amount:450},
    {Month:"Feb", Profit:10, Expenses:0, Amount:600},
    {Month:"Mar", Profit:10, Expenses:6, Amount:300},
    {Month:"Mar", Profit:5, Expenses:6, Amount:300}
    ]]></mx:Script>
    <mx:AreaChart id="myChart"
    showDataTips="true">
    <mx:series>
    <mx:AreaSeries id="ara" dataProvider="{expenses}"
    xField="Expenses"
    yField="Profit"
    />
    <mx:AreaSeries id="ara1" dataProvider="{expenses1}"
    xField="Expenses"
    yField="Profit"
    />
    <mx:AreaSeries id="ara2" dataProvider="{expenses2}"
    xField="Expenses"
    yField="Profit"
    />
    </mx:series>
    </mx:AreaChart>
    </mx:Application>

    Seems to simply be a problem with your data. See this
    code.

  • Problem with simple chart

    Hi everyone. I've got a problem with ABAP charts. I need to place a simple chart in screen's container.
    REPORT ZWOP_TEST4 .
    Contain the constants for the graph type
    TYPE-POOLS: GFW.
    DATA: VALUES       TYPE TABLE OF GPRVAL WITH HEADER LINE.
    DATA: COLUMN_TEXTS TYPE TABLE OF GPRTXT WITH HEADER LINE.
    DATA: ok_code LIKE sy-ucomm.
    DATA: my_container TYPE REF TO cl_gui_custom_container.
    REFRESH VALUES.
    REFRESH COLUMN_TEXTS.
    VALUES-ROWTXT = 'Salary'.
    VALUES-VAL1 = 50000.
    VALUES-VAL2 = 51000.
    APPEND VALUES.
    VALUES-ROWTXT = 'Life cost'.
    VALUES-VAL1 = 49000.
    VALUES-VAL2 = 51200.
    APPEND VALUES.
    COLUMN_TEXTS-COLTXT = '2003'.
    APPEND COLUMN_TEXTS.
    COLUMN_TEXTS-COLTXT = '2004'.
    APPEND COLUMN_TEXTS.
    Call a chart into a standard container, this function could be used
    for many different graphic types depending on the presentation_type
    field :
    gfw_prestype_lines
    gfw_prestype_area
    gfw_prestype_horizontal_bars
    gfw_prestype_pie_chart
    gfw_prestype_vertical_bars
    gfw_prestype_time_axis
    CALL SCREEN '1000'.
      CALL FUNCTION 'GFW_PRES_SHOW'
        EXPORTING
          CONTAINER         = 'CONTAINER'    "A screen with an empty
                                            container must be defined
          PRESENTATION_TYPE = GFW_PRESTYPE_LINES
        TABLES
          VALUES            = VALUES
          COLUMN_TEXTS      = COLUMN_TEXTS
        EXCEPTIONS
          ERROR_OCCURRED    = 1
          OTHERS            = 2.
    *&      Module  STATUS_1000  OUTPUT
          text
    MODULE STATUS_1000 OUTPUT.
      SET PF-STATUS 'GUI_1000'.
    SET TITLEBAR 'xxx'.
      IF my_container IS INITIAL.
        CREATE OBJECT my_container
          EXPORTING container_name = 'CONTAINER'.
      ENDIF.
    ENDMODULE.                 " STATUS_1000  OUTPUT
    *&      Module  USER_COMMAND_1000  INPUT
          text
    MODULE USER_COMMAND_1000 INPUT.
      ok_code = sy-ucomm.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_1000  INPUT
    I created a screen 1000 in SCREENPAINTER, named it 'CONTAINER'. Then I try to launch code above and nothing appears on the screen. Could You give me some tip?

    Hi,
    delete this lines:
    IF my_container IS INITIAL.
    CREATE OBJECT my_container
    EXPORTING container_name = 'CONTAINER'.
    ENDIF.
    then it should work.
    R

  • Problem with displaying chart data

    Hello everybody,
    I have problem with displaying chart data correctly. I'm using a cartesian chart with DateTimeAxis. The stockdata I'm using is for half a year and
    with ticks for every day. The problem is, that Flex displays the data of february in march together with the data of march. I have added a picture
    to show the result. The second column of the grid is for february and the third for march.
    Could anybody help me with this problem. Thanks in advance.
    Thomas

    Hi Chris,
    thanks for your reply. Here you get the source code:
    The following method creates the LineChart:
            public function init():void
                model.upperChart = this;
                model.upperChartStyle.setChartViewStyle(this);
                this.hAxis = new MyDateTimeAxis();
                model.upperChartData.configureHAxis(this.hAxis);
                this.vAxis = new LinearAxis();
                model.upperChartData.configureVAxis(this.vAxis);           
                this.vAxisTitle = new Label();
                this.vAxisTitle.text = model.upperChartData.getVAxisTitle();
                model.upperChartStyle.setVAxisTitleLabelStyle(this.vAxisTitle);
                this.vAxisTitle.x = 10
                this.vAxisTitle.y = 0;
                this.addChild(this.vAxisTitle);
                this.myChart = new CartesianChart();
                //remove default datatip
                this.myChart.showDataTips = false;
                this.myChart.x = 10;
                this.myChart.y = 0;
                this.myChart.width = 768; 
                this.myChart.height = 196;
                model.upperChartStyle.setChartStyle(this.myChart);
                this.addChild(this.myChart);
                //Remove line shadow
                this.myChart.seriesFilters = null;
                this.myChart.horizontalAxis = this.hAxis;
                this.myChart.verticalAxis = this.vAxis;
                this.hAxisRenderer = new AxisRenderer();
                model.upperChartData.configureHAxisRenderer(this.hAxisRenderer);
                this.hAxisRenderer.axis = this.hAxis;        
                model.upperChartStyle.setHAxisRendererStyle(this.hAxisRenderer);
                this.myChart.horizontalAxisRenderers.push(this.hAxisRenderer);
                this.vAxisRenderer = new AxisRenderer();
                model.upperChartData.configureVAxisRenderer(this.vAxisRenderer);
                this.vAxisRenderer.axis = this.vAxis;
                model.upperChartStyle.setVAxisRendererStyle(this.vAxisRenderer);
                this.myChart.verticalAxisRenderers.push(this.vAxisRenderer);
                model.upperChartStyle.setVAxisDataLabelStyle(this.vAxisMinLabel);
                this.addChild(this.vAxisMinLabel);   
                model.upperChartStyle.setSeriesStyle(model.upperChartData.series, model.upperChartData.shares);           
                this.myChart.dataProvider = model.upperChartData.dataProvider;
                this.myChart.series = model.upperChartData.series;
    The data for dataprovider and series you can see in attached file dataprovider.xml.
    xfield is equivalent to timestamp
    yfield is equivalent to absolute
    I think the problem could be the configuration of the datetimeaxis. The following method shows the parameter for the datetimeaxis:
            public function configureHAxis(axis:MyDateTimeAxis):void
                axis.parseFunction = UtilityClass.parseYYYYMMDDHHNNSSString2Date;
                axis.dataUnits = "days";
                axis.dataInterval = 1;
                axis.title = "";
                axis.minimum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-01-07 00:00:00").time);
                axis.maximum = new Date(UtilityClass.parseYYYYMMDDHHNNSSString2Date("2009-07-06 00:00:00").time);
    And finally you get the function, that I'm using for string to date conversion:
            public static function parseYYYYMMDDHHNNSSString2Date(input:String):Date
                var result:Date = new Date();
                var year:Number = Number(input.substring(0,4));
                var month:Number = Number(input.substring(5,7));
                var date:Number = Number(input.substring(8,10));
                var hours:Number = Number(input.substring(11,13));
                var minutes:Number = Number(input.substring(14,16));
                var seconds:Number = Number(input.substring(17,19));           
                result.setUTCFullYear(year);
                result.setUTCMonth(month-1);
                result.setUTCDate(date);
                result.setUTCHours(hours);
                result.setUTCMinutes(minutes);
                result.setUTCSeconds(seconds);
                return result;           
    I hope that will help to locate the reason for the wrong chart visualization.
    Thanks for any help.

  • I have a problem with a chart refreshing after its bound data provider changes.

    I have a problem with a chart refreshing after its bound data
    provider changes. After the subsetHighLowData.refresh() is called I
    would expect the chart to redraw, but it still looks the same. I
    even inspected the debugger to see if the slice had taken place and
    it had.
    Any ideas coding friends?

    "nikos101" <[email protected]> wrote in
    message
    news:gib6aa$prr$[email protected]..
    >I have a problem with a chart refreshing after its bound
    data provider
    >changes.
    > After the subsetHighLowData.refresh() is called I would
    expect the chart
    > to
    > redraw, but it still looks the same. I even inspected
    the debugger to see
    > if
    > the slice had taken place and it had.
    >
    > Any ideas coding friends?
    >
    > subsetHighLowData.source =
    >
    highLowData.source.slice(slider.values[0],slider.values[1]);
    Just use the ArrayCollection's removeItemAt, and it should
    handle the event
    dispatching for you.
    HTH;
    Amy

  • Problem with waveform chart: time scale does not show time correctly

    Hello,
    I have some problems with a chart.
    I want to display some data and the time between two single data can vary. It is something between 50ms and 500 ms.
    The problems I have:
    1. The time is not shown correctly in the chart (allways 2:00:10 instead of the current time)
    2. the data points in the chart have a distance of 1 s (x-scale). That is not correct.
    I have tried several things but I thinkt I am on the wrong track.
    Could you please help me?
    Johannes
    LabVIEW 7.1 (!)
    Message Edited by johanneshoer on 10-14-2009 04:26 AM
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Solved!
    Go to Solution.
    Attachments:
    Chart Test.vi ‏55 KB

    I have modifierd the vi again.
    Now it looks much better.
    I have a data array and the last 10 seconds of the data are displayed.
    The array size is maximum 150 and that is more than I need to display. If new data is inserted, the oldest gets deleted.
    I wonder if this style is efficient?
    The time is stil not displayed correctly in the graph. Why does it always show 2:00:00 ?
    Johanens
    LabVIEW 7.1
    Greetings Johannes
    Using LabVIEW 7.1 and 2009 recently
    Attachments:
    Chart Test 3.vi ‏57 KB

  • Problem creating pie-chart

    Post Author: ujain82
    CA Forum: Desktop Intelligence Reporting
    Hello,      I am using BO 6.1
    I am having trouble creating pie chart. I am calculating different count values from different data providers. Now I need to create a pie chart showing the proportion for each count as I can find the percentage of count.
    My scenario(task):I need count on persons depending on searching on complaint text. So for each search I have a data providers. Like this I am searching for 8 criteria. So I have different data providers for each search. I get person counts from each criteria.
    Now I want to show it in a pie chart. But I could not make it done.Does anyone faced a similar problem? How do I solve my problem?
    Any comments?

    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

  • Creating custom reports with Pie Chart

    Hello,
    I've got a little problem while I'm creating custom reports with SQL Chart.
    For example, I want to have a Pie Chart that represent the distribution of the version for a software, i wrote my query with no problem, the result is in good format.
    My Pie Chart is fine except there are no percentage displayed. The legend on the right is fine with correct count of different version, but no percentage on the pie chart.
    Any idea?
    Thanks in advance,
    Fab

    Hello,
    well, I think this is not possible to ask OEM to print the percentage over the chart.
    Anyway, I sugget you to rewrite your query to compute the % in the query itselft thus to have the pct displayed on the rigth.
    Let's say you want to display the database files' size with such a query: select file_name name,bytes val from dba_data_files;
    This is the way to display the % of each file size over the total (remark the above query has been embeded in the new one).
    select name,ratio_to_report(val) over() pct
    from ( select file_name name,bytes val from dba_data_files )
    order by val desc
    It is quite easy to adapt such a tip to your own query.
    Regards,
    Noel Talard

  • Need help with pie chart code

    I am new to Java and am having problems and I am in need of some help. I have written the code for my Mortgage Calculator but do not know how to get my chart to work. I found an example of the chart code in my text book but I am not sure if I wrote it wrong. When I run the MortCalc code it compiles but the Pie Chart code won't. I tried to run the chart code by itself but it prints out another calculator. My question is 1.) Is my chart code written wrong? and 2.) How do i enter it into my MortCalc code so that I get my chart?
    **Below I have included the assignment(so you know what I am doing exactly) and below that the pie chart code just in case you have questions. Thanks for any advice you can give.
    **If you need the rest of the code I can post it too. It was too long to post with the pie chart code.
    Assignment:
    Write the program in Java(w/ a GUI) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage adn the user's selection from a menu of availible mortgage loans:
    --7 yrs @ 5.35%
    --15 yrs @ 5.5%
    --30 yrs @ 5.75%
    Use an array for the mortgage data for the different loans. Read the interst rates to fill the array from a sequential file. Display the mortgage payment amount followed by the loan balance and interest paid for each payment over the term of the loan. Add graphics in the form of a chart.Allow the user to loop back and enter a new amount and make a new selection of quit. Please insert comments in the program to document the program.
    CODE:
    import java.awt.Color;
    import java.awt.Graphics2D;
    import java.awt.Rectangle;
    //Class to hold a value for a slice
    public class PieValue {
    double value;
    Color color;
    public PieValue(double value, Color color) {
    this.value = value;
    this.color = color;
    // slices is an array of values that represent the size of each slice.
    public void drawPie(Graphics2D g, Rectangle area, PieValue[] slices) {
    // Get total value of all slices
    double total = 0.0D;
    for (int i=0; i<slices.length; i++) {
    total += slices.value;
    // Draw each pie slice
    double curValue = 0.0D;
    int startAngle = 0;
    for (int i=0; i<slices.length; i++) {
    // Compute the start and stop angles
    startAngle = (int)(curValue * 360 / total);
    int arcAngle = (int)(slices[i].value * 360 / total);
    // Ensure that rounding errors do not leave a gap between the first and last slice
    if (i == slices.length-1) {
    arcAngle = 360 - startAngle;
    // Set the color and draw a filled arc
    g.setColor(slices[i].color);
    g.fillArc(area.x, area.y, area.width, area.height, startAngle, arcAngle);
    curValue += slices[i].value;

    // Draw each pie slice
    double curValue = 0.0D;
    int startAngle = 0;
    for (int i=0; i<slices.length; i+) {
    // Compute the start and stop angles
    startAngle = (int)(curValue 360 / total);
    int arcAngle = (int)(slices.value * 360 / total);Look here and i think you will find some syntax errors.
    Count the brackets.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Illustrator CC errors reopening docs with pie charts

    I created some sample pie charts for a client - had no problems with the document while it was open. It saved fine, I even saved it as an EPS. However, when I try to reopen the document, it gives me an error (whether I open the illustrator or eps file).
    I haven't been able to track down the reason for it. It has 6 sample pie charts on it. The text and labels are simply text or lines drawn on a separate layer. The "hole" is simply a white circle on top of the chart. There isn't really anything complicated with it, so I'm not sure where the error is. I've already recreated this but had the same problem again.
    This does not happen for all pie charts - there is another file I created with other samples, and I've been able to reopen that. The odd thing is that even though I get the error, it seems to partially open the file - only a few of the elements show up. Not sure if that would help you to track down the bug or not. See screenshot below.

    I have two internal hard drives. One has the applications, the other is where I save my files. But I don't think that would be the issue since I can save/close/open other illustrator files, it's just something about these files. I have another file with bar charts - no problem with that one.
    I thought the problem might have to do with some of the pie charts having strokes applied. But I did a test with strokes applied to the chart (center, inside, outside) and I was still able to open them after closing them.
    So there is something else that I can't figure out. Is there a way to find out from the error code what the error even means or what kind of object or effect it is in relation to?

Maybe you are looking for

  • How do I add a survey to my website?

    Hello everyone, I want to build my own website using IWeb. I want use this website to collect data for my honours thesis. What I would like to do is add a survey to my website. I would like visitors to be able to answer a number of questions and I wo

  • HT5192 Can't install ios 5.1 on my ipod touch 4th gen

    Unable to install IOS 5.1 update on my ipod touch 4G. On error occurred while installing. I'm using my ipod only to update it.. How can i install IOS 5.1 update on my ipod touch 4G without encountering any problem?

  • Displaying scanned image in image edit control

    Hi, i have a kodak image scan control and kodak image edit control on my form. iam able to scan images and save them to filesystem, but iam not able to display the scanned image in the image edit control. can anybody pl. help me. thanks in advance. K

  • Install ODI 11g on Mac OS

    Hi Guys! Has anyone been successful installing the ODI 11g Studio on a Mac OS X (1.5)? Metalink Note 1214428.1 says it's certified on Mac OS, but I can't run it. Thanks!

  • HT4236 i am syncing my 6228 photos, can I stop the procedure in mid operation. what are the consequences

    I am presently syncing my ipad for the first time. i am at step 8 of 8 syncing 6228 photos. it is taking a long time. can I stop the procedure at this stage with no consequence. if any what are the consequences.