Pie Chart is not visible

I cannot get my pie chart to show in my JPanel. I am not sure why that is or how to get it to display. Everything compiles fine...I feel like an idiot. Anyway, could you look at this and let me know what I could be doing wrong. My piechart starts on line 302.
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.text.*;
public class MortCalcWeek5p extends JFrame implements ActionListener
     DecimalFormat twoPlaces = new DecimalFormat("#,###.00");//number format
     int L[] = {7, 15, 30};
     double I[] = {5.35, 5.5, 5.75};
     double P, M, J, H, C, Q;
     boolean manual = true;
     JPanel panel = new JPanel ();
     JRadioButton opt1 = new JRadioButton ("Manual Input", true);
     JRadioButton opt2 = new JRadioButton ("Menu Selections", false);
     ButtonGroup radioSelect = new ButtonGroup();
     JLabel PLabel = new JLabel("Enter the mortgage amount: ");
     JTextField PField = new JTextField(10);//field for obtaining user input for mortgage amount
     JLabel LLabel1 = new JLabel("Enter the term in years: ");
     JTextField LField = new JTextField(3);//field for obtaining user input for term in years
     JLabel ILabel1 = new JLabel("Enter the interest rate: ");
     JTextField IField = new JTextField(5);//field for obtaining user input for interest rate
     JLabel choices = new JLabel ("Or Choose the Interest Rate and Term in Years");
     JButton calcButton = new JButton("Calculate");
     JButton clearButton = new JButton("Clear");
     JButton exitButton = new JButton("Exit");
     JTextField payment = new JTextField(10);
     JLabel ILabel2 = new JLabel("Interest Rate: choose one");
     String [] IChoice = {I[0] + "", I[1] + "", I[2] + ""};
     JComboBox IBox = new JComboBox(IChoice);
     JLabel LLabel2 = new JLabel("Term (in years): choose one");
     String [] LChoice = {L[0] + "", L[1] + "", L[2] + ""};
     JComboBox LBox = new JComboBox(LChoice);
     JLabel amortBox = new JLabel("Amortization Table");
     JTextArea ta = new JTextArea();//<----------------------added
     //JScrollPane amortScroll = new JScrollPane();//
     JScrollPane amortScroll = new JScrollPane(ta, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
     public MortCalcWeek5p () //creates the GUI window
                    super("Mortgage Calculator Week 5");
                    setSize(500, 400);
                    panel.setBackground (Color.white);
                    panel.setLayout(null);
                    panel.setPreferredSize(new Dimension(900, 500));
                    setResizable(false) ;
                    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    //Creates the container
                    Container contentPane = getContentPane();
                    FlowLayout fresh = new FlowLayout(FlowLayout.LEFT);
                    panel.setLayout(fresh);
                    //identifies trigger events
                    calcButton.addActionListener(this);
                    clearButton.addActionListener(this);
                  exitButton.addActionListener(this);
                    PField.addActionListener(this);
                    LField.addActionListener(this);
                    IField.addActionListener(this);
                    opt1.addActionListener(this);
                    opt2.addActionListener(this);
                    panel.setLayout(fresh);
                    //Options
                    radioSelect.add(opt1);
                    radioSelect.add(opt2);
                    panel.add(opt1);
                    opt1.setBackground (Color.white);
                    panel.add(opt2);
                    opt2.setBackground (Color.white);
                    //Manual Entries
                    panel.add(PLabel);
                    panel.add(PField);
                    panel.add(LLabel1);
                    panel.add(LField);
                    panel.add(ILabel1);
                    panel.add(IField);
                    //Pre-set Entries
                    panel.add(choices);
                    panel.add(ILabel2);
                    panel.add(IBox);
                    IBox.setBackground (Color.white);
                    panel.add(LLabel2);
                    panel.add(LBox);
                    LBox.setBackground (Color.white);
                    //Buttons
                    panel.add(calcButton);
                    calcButton.setBackground (Color.white);
                    panel.add(payment);
                    payment.setBackground (Color.white);
                    panel.add(clearButton);
                    clearButton.setBackground (Color.white);
                    panel.add(exitButton);
                    exitButton.setBackground (Color.white);
                    //Amortization Table
                    panel.add(amortBox);
                    payment.setEditable(false);
                    panel.add(amortScroll);
                    amortScroll.setPreferredSize(new Dimension(600,300));//<----------added
                    setContentPane(panel);
                    //Pie Chart
                    //panel.add(PieChart);
                    setVisible(true);
     }// end of GUI info
          public void actionPerformed(ActionEvent e)
               Object source = e.getSource();
               if (source == calcButton)
                    try
                    if (manual)
                         Calculations_manual();
                    else Calculations_menu();
               catch(NumberFormatException event)
                    JOptionPane.showMessageDialog(null, "You did not enter a number.\n\nYou're not too bright are you?\n\nTry again.", "ERROR", JOptionPane.ERROR_MESSAGE);
               if (source == clearButton)
               reset();
               if (source == exitButton)
               end();
               if (source == opt1)
               IBox.setEnabled(false);
               LBox.setEnabled(false);
               LField.setEnabled(true);
               LField.setEditable(true);
               IField.setEnabled(true);
               IField.setEditable(true);
               manual = true;
               if (source == opt2)
               IBox.setEnabled(true);
               LBox.setEnabled(true);
               LField.setEnabled(false);
               LField.setEditable(false);
               IField.setEnabled(false);
               IField.setEditable(false);
               manual = false;
          public void Calculations_menu() //performs the calculations from user input
               double P = Double.parseDouble(PField.getText());
               double I = Double.parseDouble((String) IBox.getSelectedItem());
               double L = Double.parseDouble((String) LBox.getSelectedItem());
               double J = (I  / (12 * 100));//monthly interest rate
               double N = (L * 12);//term in months
               double M = (P * J) / (1 - Math.pow(1 + J, - N));//Monthly Payment
             String showPayment = twoPlaces.format(M);
             payment.setText(showPayment);
               int month = 1;
                         while (month <= N)
                              //performs the calculations for the amortization
                              double H = P * J;//current monthly interest
                              double C = M - H;//monthly payment minus monthly interest
                              double Q = P - C;//new balance
                              P = Q;//sets loop
                              month++;
                              //String showAmort = twoPlaces.format(H + C + Q);
                              //amortScroll(showAmort);
                            //ta.append("Month " + month);
                            ta.append("Interest Paid: " + twoPlaces.format(H));
                            ta.append("\tPrincipal Paid: " + twoPlaces.format(C));
                            ta.append("\tNew Balance: " + twoPlaces.format(Q) + "\n");
          public void Calculations_manual() //performs the calculations from user input
               double P = Double.parseDouble(PField.getText());
               double I = Double.parseDouble(IField.getText());
               double L = Double.parseDouble(LField.getText());
               double J = (I  / (12 * 100));//monthly interest rate
               double N = (L * 12);//term in months
               double M = (P * J) / (1 - Math.pow(1 + J, - N));//Monthly Payment
             String showPayment = twoPlaces.format(M);
             payment.setText(showPayment);
               int month = 1;
                         while (month <= N)
                              //performs the calculations for the amortization
                              double H = P * J;//current monthly interest
                              double C = M - H;//monthly payment minus monthly interest
                              double Q = P - C;//new balance
                              P = Q;//sets loop
                              month++;
                              //String showAmort = twoPlaces.format(H + C + Q);
                              //amortScroll(showAmort);
                            //ta.append("Month " + month);
                            ta.append("Interest Paid: " + twoPlaces.format(H));
                            ta.append("\tPrincipal Paid: " + twoPlaces.format(C));
                            ta.append("\tNew Balance: " + twoPlaces.format(Q) + "\n");
          // resets GUI for another calculation
          public void reset ()
          PField.setText(null);
          payment.setText(null);
          ta.setText(null);
          LField.setText(null);
          IField.setText(null);
          // ends GUI and exits program
          public void end()
          System.exit(0);
public class PieChart extends JComponent {
    // Class to hold a value for a slice
    class PieSlice
        //private variables
        double value;
        Color color;
        public PieSlice(double value, Color color)
            this.value = value;
            this.color = color;
        }//end Constructor
       } //end class PieSlice
    //private variable slices are array of PieSlice
    PieSlice[] slices = new PieSlice[2];
    //constructor
    PieChart(double C, double H)
        slices[0] = new PieSlice(C, Color.red);
        slices[1] = new PieSlice(H, Color.green);
        setVisible(true);
    // This method is called whenever the contents needs to be painted
    public void paintComponent(Graphics g) {
        // Draw the pie
        this.drawPie((Graphics2D)g, getBounds(), slices);
     // slices is an array of values that represent the size of each slice.
     public void drawPie(Graphics2D g, Rectangle area, PieSlice[] slices)
             // Get total value of all slices
             double total = 0.0;
             for (int p=0; p<slices.length; p++) {
                 total += slices[p].value;
             // Draw each pie slice
             double curValue = 0.0;
             int startAngle = 0;
             for (int p=0; p<slices.length; p++)
                 // Compute the start and stop angles
                 startAngle = (int)(curValue * 360 / total);
                 int arcAngle = (int)(slices[p].value * 360 / total);
                 // Ensure that rounding errors do not leave a gap between the first and last slice
                 if (p == slices.length-1) {
                     arcAngle = 360 - startAngle;
             } //end if
             // Set the color and draw a filled arc
             g.setColor(slices[p].color);
             g.fillArc(area.x, area.y, 200, 200, startAngle, arcAngle);
             RenderingHints renderHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
               g.setRenderingHints(renderHints);
               //int border=10;
               //Ellipse2D.Double elb = new Ellipse2D.Double(area.x - border/2, area.y - border/2, pieWidth + border, pieHeight + border);
             //g.fillArc(area.x, area.y, area.width, area.height, startAngle, arcAngle);
             curValue += slices[p].value;
             } //end for
        }//end drawPie
        public void resetPieChart(double capital, double interest)
                         slices[0] = new PieSlice(capital, Color.red);
                         slices[1] = new PieSlice(interest, Color.green);
                         this.repaint();
          }//end resetPieChart
    }//end class PieChart
          public static void main(String[] args)
               MortCalcWeek5p app = new MortCalcWeek5p();
               app.pack();
          }//end main
}//end the programI am sorry for putting all this code here. I just wanted you to see the entire picture. I won't post all of this again unless requested.
Thanks,
Seawall

Did you write this? :)
Anyways, here you go. You never instantiated the pie chart or added it to gui. I created a separate JFrame and put pie chart in it. Also added PieChart.resetPieChart in actionHandler method. This should get you started.
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.text.*;
public class MortCalcWeek5p extends JFrame implements ActionListener
     DecimalFormat twoPlaces = new DecimalFormat("#,###.00");//number format
     int L[] = {7, 15, 30};
     double I[] = {5.35, 5.5, 5.75};
     double P, M, J, H, C, Q;
     boolean manual = true;
        PieChart pc = null;
     JPanel panel = new JPanel ();
     JRadioButton opt1 = new JRadioButton ("Manual Input", true);
     JRadioButton opt2 = new JRadioButton ("Menu Selections", false);
     ButtonGroup radioSelect = new ButtonGroup();
     JLabel PLabel = new JLabel("Enter the mortgage amount: ");
     JTextField PField = new JTextField(10);//field for obtaining user input for mortgage amount
     JLabel LLabel1 = new JLabel("Enter the term in years: ");
     JTextField LField = new JTextField(3);//field for obtaining user input for term in years
     JLabel ILabel1 = new JLabel("Enter the interest rate: ");
     JTextField IField = new JTextField(5);//field for obtaining user input for interest rate
     JLabel choices = new JLabel ("Or Choose the Interest Rate and Term in Years");
     JButton calcButton = new JButton("Calculate");
     JButton clearButton = new JButton("Clear");
     JButton exitButton = new JButton("Exit");
     JTextField payment = new JTextField(10);
     JLabel ILabel2 = new JLabel("Interest Rate: choose one");
     String [] IChoice = {I[0] + "", I[1] + "", I[2] + ""};
     JComboBox IBox = new JComboBox(IChoice);
     JLabel LLabel2 = new JLabel("Term (in years): choose one");
     String [] LChoice = {L[0] + "", L[1] + "", L[2] + ""};
     JComboBox LBox = new JComboBox(LChoice);
     JLabel amortBox = new JLabel("Amortization Table");
     JTextArea ta = new JTextArea();//<----------------------added
     //JScrollPane amortScroll = new JScrollPane();//
     JScrollPane amortScroll = new JScrollPane(ta, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
     public MortCalcWeek5p () //creates the GUI window
                    super("Mortgage Calculator Week 5");
                    setSize(500, 400);
                    panel.setBackground (Color.white);
                    //panel.setLayout(null);
                    panel.setPreferredSize(new Dimension(900, 500));
                    setResizable(false) ;
                    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    //Creates the container
                    //Container contentPane = getContentPane();
                    FlowLayout fresh = new FlowLayout(FlowLayout.LEFT);
                                BorderLayout bl = new BorderLayout();
                    panel.setLayout(fresh);
                    //identifies trigger events
                    calcButton.addActionListener(this);
                    clearButton.addActionListener(this);
                                exitButton.addActionListener(this);
                    PField.addActionListener(this);
                    LField.addActionListener(this);
                    IField.addActionListener(this);
                    opt1.addActionListener(this);
                    opt2.addActionListener(this);
                    //panel.setLayout(fresh);
                    //Options
                    radioSelect.add(opt1);
                    radioSelect.add(opt2);
                    panel.add(opt1);
                    opt1.setBackground (Color.white);
                    panel.add(opt2);
                    opt2.setBackground (Color.white);
                    //Manual Entries
                    panel.add(PLabel);
                    panel.add(PField);
                    panel.add(LLabel1);
                    panel.add(LField);
                    panel.add(ILabel1);
                    panel.add(IField);
                    //Pre-set Entries
                    panel.add(choices);
                    panel.add(ILabel2);
                    panel.add(IBox);
                    IBox.setBackground (Color.white);
                    panel.add(LLabel2);
                    panel.add(LBox);
                    LBox.setBackground (Color.white);
                    //Buttons
                    panel.add(calcButton);
                    calcButton.setBackground (Color.white);
                    panel.add(payment);
                    payment.setBackground (Color.white);
                    panel.add(clearButton);
                    clearButton.setBackground (Color.white);
                    panel.add(exitButton);
                    exitButton.setBackground (Color.white);
                    //Amortization Table
                    panel.add(amortBox);
                    payment.setEditable(false);
                    panel.add(amortScroll);
                    amortScroll.setPreferredSize(new Dimension(600,300));//<----------added
                    setContentPane(panel);
                                setVisible(true);
                    //Pie Chart
                                pc = new PieChart(C,H);
                    JPanel piePanel = new JPanel();
                                piePanel.setLayout(new BorderLayout());
                                piePanel.add(pc);                               
                                JFrame pieFrame = new JFrame("Pie Chart");
                                pieFrame.setSize(210,230);
                                pieFrame.getContentPane().add(piePanel);
                                pieFrame.setVisible(true);
     }// end of GUI info
          public void actionPerformed(ActionEvent e)
               Object source = e.getSource();
               if (source == calcButton)
                                pc.resetPieChart(C, H);
                    try
                    if (manual)
                         Calculations_manual();
                    else Calculations_menu();
               catch(NumberFormatException event)
                    JOptionPane.showMessageDialog(null, "You did not enter a number.\n\nYou're not too bright are you?\n\nTry again.", "ERROR", JOptionPane.ERROR_MESSAGE);
               if (source == clearButton)
               reset();
               if (source == exitButton)
               end();
               if (source == opt1)
               IBox.setEnabled(false);
               LBox.setEnabled(false);
               LField.setEnabled(true);
               LField.setEditable(true);
               IField.setEnabled(true);
               IField.setEditable(true);
               manual = true;
               if (source == opt2)
               IBox.setEnabled(true);
               LBox.setEnabled(true);
               LField.setEnabled(false);
               LField.setEditable(false);
               IField.setEnabled(false);
               IField.setEditable(false);
               manual = false;
          public void Calculations_menu() //performs the calculations from user input
               double P = Double.parseDouble(PField.getText());
               double I = Double.parseDouble((String) IBox.getSelectedItem());
               double L = Double.parseDouble((String) LBox.getSelectedItem());
               double J = (I  / (12 * 100));//monthly interest rate
               double N = (L * 12);//term in months
               double M = (P * J) / (1 - Math.pow(1 + J, - N));//Monthly Payment
             String showPayment = twoPlaces.format(M);
             payment.setText(showPayment);
               int month = 1;
                         while (month <= N)
                              //performs the calculations for the amortization
                              double H = P * J;//current monthly interest
                              double C = M - H;//monthly payment minus monthly interest
                              double Q = P - C;//new balance
                              P = Q;//sets loop
                              month++;
                              //String showAmort = twoPlaces.format(H + C + Q);
                              //amortScroll(showAmort);
                            //ta.append("Month " + month);
                            ta.append("Interest Paid: " + twoPlaces.format(H));
                            ta.append("\tPrincipal Paid: " + twoPlaces.format(C));
                            ta.append("\tNew Balance: " + twoPlaces.format(Q) + "\n");
          public void Calculations_manual() //performs the calculations from user input
               double P = Double.parseDouble(PField.getText());
               double I = Double.parseDouble(IField.getText());
               double L = Double.parseDouble(LField.getText());
               double J = (I  / (12 * 100));//monthly interest rate
               double N = (L * 12);//term in months
               double M = (P * J) / (1 - Math.pow(1 + J, - N));//Monthly Payment
             String showPayment = twoPlaces.format(M);
             payment.setText(showPayment);
               int month = 1;
                         while (month <= N)
                              //performs the calculations for the amortization
                              double H = P * J;//current monthly interest
                              double C = M - H;//monthly payment minus monthly interest
                              double Q = P - C;//new balance
                              P = Q;//sets loop
                              month++;
                              //String showAmort = twoPlaces.format(H + C + Q);
                              //amortScroll(showAmort);
                            //ta.append("Month " + month);
                            ta.append("Interest Paid: " + twoPlaces.format(H));
                            ta.append("\tPrincipal Paid: " + twoPlaces.format(C));
                            ta.append("\tNew Balance: " + twoPlaces.format(Q) + "\n");
          // resets GUI for another calculation
          public void reset ()
          PField.setText(null);
          payment.setText(null);
          ta.setText(null);
          LField.setText(null);
          IField.setText(null);
          // ends GUI and exits program
          public void end()
          System.exit(0);
public class PieChart extends JComponent {
    // Class to hold a value for a slice
    class PieSlice
        //private variables
        double value;
        Color color;
        public PieSlice(double value, Color color)
            this.value = value;
            this.color = color;
        }//end Constructor
       } //end class PieSlice
    //private variable slices are array of PieSlice
    PieSlice[] slices = new PieSlice[2];
    //constructor
    PieChart(double C, double H)
        slices[0] = new PieSlice(C, Color.red);
        slices[1] = new PieSlice(H, Color.green);
        setVisible(true);
    // This method is called whenever the contents needs to be painted
    public void paintComponent(Graphics g) {
        // Draw the pie
        this.drawPie((Graphics2D)g, getBounds(), slices);
     // slices is an array of values that represent the size of each slice.
     public void drawPie(Graphics2D g, Rectangle area, PieSlice[] slices)
             // Get total value of all slices
             double total = 0.0;
             for (int p=0; p<slices.length; p++) {
                 total += slices[p].value;
             // Draw each pie slice
             double curValue = 0.0;
             int startAngle = 0;
             for (int p=0; p<slices.length; p++)
                 // Compute the start and stop angles
                 startAngle = (int)(curValue * 360 / total);
                 int arcAngle = (int)(slices[p].value * 360 / total);
                 // Ensure that rounding errors do not leave a gap between the first and last slice
                 if (p == slices.length-1) {
                     arcAngle = 360 - startAngle;
             } //end if
             // Set the color and draw a filled arc
             g.setColor(slices[p].color);
             g.fillArc(area.x, area.y, 200, 200, startAngle, arcAngle);
             RenderingHints renderHints = new RenderingHints(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
               g.setRenderingHints(renderHints);
               //int border=10;
               //Ellipse2D.Double elb = new Ellipse2D.Double(area.x - border/2, area.y - border/2, pieWidth + border, pieHeight + border);
             //g.fillArc(area.x, area.y, area.width, area.height, startAngle, arcAngle);
             curValue += slices[p].value;
             } //end for
        }//end drawPie
        public void resetPieChart(double capital, double interest)
                         slices[0] = new PieSlice(capital, Color.red);
                         slices[1] = new PieSlice(interest, Color.green);
                         this.repaint();
          }//end resetPieChart
    }//end class PieChart
          public static void main(String[] args)
               MortCalcWeek5p app = new MortCalcWeek5p();
               app.pack();
          }//end main
}//end the program

Similar Messages

  • Xcelsius - Embedded 'Jpg' logo not visible, Pie chart Legends not visible

    Hi,
       I am new to xcelsius. could you please help.
       I have two issues.
      1. I incorporated Logo (JPG FILE) and selected options Embed file, resize image to component, but image is not visible when I preview. Why? What needs to be done to make logo visible in preview(swf file). I did not export yet to Infoview though.
    2. Legend values are cropped. I have 35 legends that are to be listed for pie chart. I can see only 31 and remaining four not visible (two from beginning, 2 at the end). I reduced font to lowest visible value i.e.  8 and increased height max possible that looks good . How to make them visible? or make them to fit to chart. Is there any option? Legend values are towards right of chart.
    Please help.
    BR, Nanda Kishore

    Hi,
       Are you using Image Component to insert your JPEG, if not try that. It will work as expected.
       As for your pie chart legends, it will work as long as your Pie Chart is large enough to fit all regions onto the screen.
       Try a simple test just to prove that concept.
          - Create 2 columns in Excel
          - Make Column A your Region Column. Insert up to 35 records
          - Make Column B you Data column. Also insert up to 35 records.
          - Now map your data into the Pie Chart and make sure you reduce the fonts of the region to "8" (Smallest it can go)
          - Preview it.
    Ken

  • Xcelsius Present - Pie Chart Does Not Display

    I am evaluating a trial copy of Xcelsius Present and I am having trouble with creating a Pie Chart. I have imported my spreadsheet and have made my data selection, but the pie chart does not display. I have used Crystal Reports in the past and have never run across the problem.  I have tried to create and import a new spreadsheet with the data needed for the pie chart, but I have the same problem with the chart not loading. This problem does not occur with other charts that I am creating.
    Can anyone make a recommendation on what to do?
    Thanks.
    Anita

    I'm having the same problem with the Xcelsius Present 2008 evaluation copy (5.3.0.0).
    No matter how pie chart data is formatted, there is nothing displaying.
    I'd like to know whether this is a known bug or whether this is only in the eval copy. This would prevent me from buying the product.

  • Pie Chart Legend not displaying full names

    Hi All,
    In a RTF template, we have displayed a PIE chart. In the PIE chart, when the number of legends are more, the legends are getting truncated on the generated PDF report. The document which describes the issue with screen shots is placed at [http://www-apps.us.oracle.com/~sgnanama/Pie%20Chart%20Legends%20Display%20Issue.doc] . And following is the snippet of code placed at ALT text of PIE chart picture present in the template. Is there any way to enlarge the legends display section to show the full text of the legends? Please share your thoughts. Thanks.
    chart:
    <Graph graphType="PIE" depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_NONE">
    <LegendArea borderColor="#cccccc" borderTransparent="false"/>
    <LegendText wordWrapEnabled ="true"/>
    <SeriesItems defaultBorderColor="#cccccc">
    <Series id="0" color="#336699"/>
    <Series id="1" color="#99ccff"/>
    <Series id="2" color="#999933"/>
    <Series id="3" color="#666699"/>
    <Series id="4" color="#cc9933"/>
    <Series id="5" color="#6666"/>
    <Series id="6" color="#3399ff"/>
    </SeriesItems>
    <Title text="" visible="true"/>
    <Footnote text="Company Contribution" visible="true" horizontalAlignment="CENTER"/>
    <O1Title text="Company Contribution" visible="true"/>
    <LocalGridData rowCount="{count(CATEGORY/ERC)}" colCount="1">
    <RowLabels>
    <xsl:for-each select="CATEGORY">
    <xsl:if test="string(ERC)">
    <Label>
    <xsl:value-of select="CATEGORY_NAME"/>
    </Label>
    </xsl:if>
    </xsl:for-each>
    </RowLabels>
    <DataValues>
    <xsl:for-each select="CATEGORY">
    <xsl:if test="string(ERC)">
    <RowData>
    <Cell>
    <xsl:value-of select="ERC"/>
    </Cell>
    </RowData>
    </xsl:if>
    </xsl:for-each>
    </DataValues>
    </LocalGridData>
    </Graph>

    as far as i know only way to display legname in full when u have more values is to make the size of the chart large . i have one the req like that i made it large enough so that it will withstand if i get more values .
    it may not be good idea but this is the way i did .

  • Pie chart value not displaying in report builder

    Hi,
    I created a report by using report builder i used a pie chart in my report but one value is showing other one is not showing. Kindly tell me what is the problem behind it?
    here is an image which is not displaying 1 value in pie chart. please help me

    Hi Aamir,
    Please check if there is any misconfiguration (e.g. show data label, formatting, etc.) for your chart slice per the following post.
    http://social.technet.microsoft.com/Forums/en-US/ebc3bfc5-6338-4946-ade6-64e89611f6b7/ssrs-report-builder-30-pie-chart?forum=sqldatawarehousing
    http://msdn.microsoft.com/en-us/library/dd220469.aspx
    Further more, you can post this topic in SQL server forum for a better assistance.
    http://social.technet.microsoft.com/Forums/en-US/home?forum=sqlreportingservices%2Csqldatawarehousing%2Csqlanalysisservices&filter=alltypes&sort=lastpostdesc
    Thanks
    Daniel Yang
    TechNet Community Support

  • Drill down for pie chart is not enabled

    hi,
    i am trying to have a drill down functionality  for a pie chart but when i go to drill down option that screen is not enabled.
    how to make drill down option enable.
    please let me know
    Edited by: venkat s on May 9, 2008 9:36 AM

    i just gave yaxis  source and x axix source . it is enabling now

  • Pie Chart Does Not Show Up

    I followed the tutorial here:
    http://msdn.microsoft.com/en-us/library/dd255283.aspx 
    But my pie chart is blank. I saw this thread, which sounds like a similar problem:
    http://social.technet.microsoft.com/Forums/en-US/01aa4e08-0e3f-4b34-a3e4-03f1ba20bc1b/ssrs-report-builder-30-pie-chart?forum=sqldatawarehousing
    But it wasn't very helpful. I have confirmed that I have followed the instructions in the tutorial exactly, but my chart just shows up as a blank square. I can send the tutorial RDL file if it will help.
    What am I doing wrong?

    Hi Paul,
    I also follow the instructions of the tutorial to create a pie chart to the repot in my Report Builder 3.0, it works great. So I think maybe you have configure some other settings, please double-check that you haven’t take some actions that the document
    doesn’t suggest. If you already done, could you please tell us which actions are you taken?
    If you just followed the instructions in the tutorial exactly, could you please send me the RDL file with sample data to sqltnsp AT Microsoft.com (Please replace AT with @) or upload the files to your skydrive.live.com, so that we can make further analysis.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Web Analysis reports charts are not visible in work space

    Hi All,
    I have created couple of reports in web analysis 11.1.1.3 with charts embeeded in that reports and when i open the same report in the workspace iam not able to see the chart.
    If any one have faced this issue give me an idea .
    Following are the logs
    <event logger="com.hyperion.analyzer.utils.chart.a" timestamp="1257795266678" level="ERROR" thread="TP-Processor3" sequence_no="13">
    <time>09 Nov 2009 12:34:26,678</time>
    <context originator_type="WebAnalysis"/>
    <message><![CDATA[
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.]]></message>
    </event>
    <event logger="com.hyperion.analyzer.utils.chart.a" timestamp="1257795329303" level="ERROR" thread="TP-Processor3" sequence_no="14">
    <time>09 Nov 2009 12:35:29,303</time>
    <context originator_type="WebAnalysis"/>
    <message><![CDATA[
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.]]></message>
    </event>
    <event logger="com.hyperion.analyzer.utils.chart.a" timestamp="1257795332502" level="ERROR" thread="TP-Processor3" sequence_no="15">
    <time>09 Nov 2009 12:35:32,502</time>
    <context originator_type="WebAnalysis"/>
    <message><![CDATA[
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.]]></message>
    </event>
    <event logger="com.hyperion.analyzer.utils.chart.a" timestamp="1257795337055" level="ERROR" thread="TP-Processor3" sequence_no="16">
    <time>09 Nov 2009 12:35:37,055</time>
    <context originator_type="WebAnalysis"/>
    <message><![CDATA[
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.]]></message>
    </event>
    Thanks,
    Ram

    I using local deployment. I deploy my application directly from NWDS to a Mobile Client running also locally in my machine. Maybe I'm wrong, but I think that Mobile Client look for resources in NWDS workspace.
    This is the dpi file located in the Mobile Client inbox folder when I perform the deployment.
    <?xml version="1.0" encoding="UTF-8"?>
    <deployment>
    <device>
    <repository>
    <mcd name="IrviaDemoApp" namespace="" version="1">
    <action type="install"/>
    <location type="local">
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\MOBILE-INF\MCD.xml" property="mcd" type="file"/>
    <component name="hpcds.es~irvia_demo_app">
    <applications>
    <application deploy="true" name="IrviaDemoApp"/>
    </applications>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\bin" property="bin" type="dir"/>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\gen_wdp" property="gen_wdp" type="dir"/>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\src\mimes" property="mimes" type="dir"/>
    <source path="C:\Documents and Settings\oloranube\workspace.sr5.jdi\LocalDevelopment\DCs\company.es\irvia_demo_app\_comp\gen_wdp\application-j2ee-engine.xml" property="j2ee_xml" type="file"/>
    </component>
    </location>
    </mcd>
    </repository>
    </device>
    </deployment>
    There is a <source> entry for the mimes directory, where "Component images" are located.
    PD: Sorry about my poor english. I hope you to understand me.

  • Drill Down in Pie Chart not working in IE8 / Mozilla 5

    Hi Experts,
    In my dashboards, drill down feature in Pie charts are not working if the flash is viewed in IE8 / Mozilla Firefox 5.
    In IE7 it is working. Is there any browser settings required for this ? Pls suggest.
    Drill down in column chart is working fine.
    Xcelsius Version: Xcelsius 2008 SP3 FP 3.5
    Browser Version: Firefox 5.0 / IE 8
    Many thanks,
    PASG

    Hi,
      You may want to download Xcelsius 2008 with SP4.
      SP4 will support the newer IE 8 (32 bits) for Xcelsius related issue.
      As for FireFox 5 that came out last week, this won't be supported anytime soon.
    Regards,
    Ken
    Edited by: Ken Low on Jun 27, 2011 8:50 AM

  • How to show negative value in Pie Chart from Webi?

    I have below example data, I want to convert this to a pie chart in Web Intelligence, my problem is after I convert it to a pie chart, the revenue '-30' is shown as '30', looks like the pie chart is not suppor the negative value to show, I want to know if there is any workaround or solution to make the pie chart to show the negative value? Is this behavior is by design? do we have any official document to explain this?
    The product I used is BOE XI 3.1 SP3.
    Department    Revenue
    A                      100
    B                       -30
    C                        80
    Edited by: Alex Wang on Jul 13, 2010 5:51 PM

    Why are you showing this information as a pie chart? It doesn't make sense to try and display a negative slice in a pie chart. I can't really think of a logical way to try and draw a negative slice in a pie chart. With a pie chart you will need all your information to either all be positive or all negative, otherwise it doesn't work.
    What you need is to have a bar chart, with positive and negative values on the y axis.

  • 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

  • Pie Chart -- Text on Axis

    Help. I have created a pie chart. The chart has a title at the top and the legend appears to the right of the pie chart. However, my problem is there is "text" that is appearing at the bottom of the pie chart with the name of the data values column name. How can I get that text (subtitle) to disappear. Ex.
    O ---------> pie chart with data values showing and legend to the right (okay).
    xxxxx -------> text at the bottom of pie chart (do not want this text to appear). I'm not sure if this is
    considered "text" or a "label". I just need to turn it off. Help
    Thanks in advance!

    HI,
    While SAP solves the problem , you can do a quick fix by displaying only one either Char or % on pie chart and have a legend to display the other value(i.e normally charecterstic).
    Regards
    Madhukar

  • Pie Chart display problem

    Hello,
    Pie chart is not displayed when I tried this sql with 'order by' clause.
    select null, b.subject_name, count(a.subject) cnt
    from schooltemp a, subject b
    where a.subject = b.subject_id
    group by b.subject_name
    order by cnt desc
    This sql works only when 'order by' clause is removed.

    Hello Marco,
    I think I've found the cause.
    That was not because of "order by" clause, but because of the length of column data used in the legend section.
    When the column data for legend is longer than 38 chars, this SVG chart becomes blank in my case.

  • Pie chart using httpservice

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

    <data>

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

    <data>

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

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

  • 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

Maybe you are looking for

  • Rough time getting a new phone

    My Alltel prepaid phone gave up on me and I had to get a new one.  First checking Verizon's web site- no possibility to "upgrade" for former alltel customers ( "upgrade" - wireglish for" to purchase a new device"). Calling customer "service". OK., no

  • Superscript becomes # in CONVERT_OTF output PDF

    Hello, As the subject says, units of m2 (2 in superscript) becomes m# when converting OTF to PDF. Does anyone have an idea how to fix this, I looked into note 1012515, but it's already implemented. Thanks!

  • Developping multiple level SOA approval in OIM11g

    Hi Team, How to achive the below functionality in SOA work flow: 1. Once Request raised , it will to 2 managers & 1 Super Manager(approvers) queue. for Ex : M1,M2,SuperManager. ----------> 2 hours,2hours,5Hours 2. A task should be created and ,It wil

  • Touchpad lock failure

    Hi there. I'm using a probook 4520s with windows 7 professional 32bit. The touchpad is giving me problems in that it won't lock. This happened unexpectedly after windows declared it had "updated a driver." I tried to uninstall synaptics touchpad unde

  • Pass file to Reader for printing withour user interaction

    We already pass PDF files to Reader for viewing. We now need to have a "Print" button on our screens and the PDF can be directly printed without viewing (at least without interaction to print or even close the viewer when done). This should be tantam