Amounts in pie charts.

Hi there.
I´m trying to create some pie charts in BIP with MSWord, but I´ve noticed although the source amounts are quantities, only percentages appear in the chart.
Can somebody tell me?. I´m blocked by now with it.
Thanks a lot.
Bye...

Hi
So you want to see the actual amount as a label rather than the percentage ?
<Slice labelPosition="LP_OUTSIDE_WITH_FEELER"/>
<SliceLabel textType="LD_VALUE"/>
the second line gets the value.
Regards
Tim
http://blogs.oracle.com/xmlpublisher

Similar Messages

  • Pie chart legend total does not calculate correctly

    Hi All
    I have a pie chart in a CR 2008 report (SP0). 
    The pie has one "On Change Of" and one "Show Value" field.
    The datasource for the report is an Oracle 10g (Rel 2) Stored Procedure (SP).
    The SP signs the value per each transaction (record), so if the txn is a reversal is will arrive in the report as a negative value
    The records that are listed in the report have the correct sign on each line, and totals in the report are correct
    So, if the first record has a value of 10,000 - these would be known as Cash txns
    and the second record has a value of -5,000 - these would be known as Cash Reversal txns
    The report total will be 5,000
    In the legend entry of the pie chart the values per series are being displayed correctly.  There is a series per Txn type (so one series represents Cash txns, the second series represents Cash Reversal txns)
    From the example above my pie shows 1 txn for Cash @ 10,000
    and 1 txn for Cash Reversal @ -5000 (it has the negaitve amount in brackets)
    But the total in the legend is 15,000
    I cannot figure out why that the legend total is not calculating correclty.
    Has anyone seen this behaviour before?
    Any help would be great thanks
    Best regards
    Patrick

    Just realised why....  The total is counting all txns, and my formula is not telling it that Reversal should be subtracted - duuhhhh!!!!

  • Pie Chart displaying percentages

    Good Morning,
    I'm hoping someone has had experience creating a pie chart
    with percentage values and is wiling to offer some assistance
    because I've tried many ways and still came up short.
    The data table I'm using contains two columns: type (A, B, C,
    etc) and amount (100, 250, etc).
    In order to create a chart showing what percent of the whole
    each type is, I need to sum all the amounts for all types then
    divide each type by the sum of all amounts (to create each slice).
    Any suggestions on how to do this through CFquery and
    CFchart?
    Thanks in advance,
    Sue

    Add this line in the graph you are putting in RTF template.
    Right click the image, properties and the last tab web.
    add this under the graph node.
    To get the actual Value use this.
    <SliceLabel textType="LD_VALUE"/>
    Other vaules you can use are
    LD_TEXT_PERCENT, LD_VALUE , LD_TEXT , LD_PERCENT

  • Crystal reports pie chart

    Hi,
    I have a record with 2 fields: a date field called 'mydate' and a text field called 'yesno'.
    There are about 100 records in the database.
    I want to produce a pie chart that will only produce the amount of 'YES' values in the 'yesno' field and show these values on the pie chart by month.
    Im pretty new to crystal reports, so if you could give me a step-by-step, that would be great.
    Thanks.
    J.

    James,
    I don't quite understand. Is the detail amount correct, just displayed as percentages, or is the actual percentage being displayed.
    If the detail amount is being displayed as a percentage, under Chart Expert -> Options -> Number Format is where you can format the field.
    If it's the actual percentage being displayed, you're going to have to change the Show Value you're basing the chart on.
    I hope this helps.
    Mike

  • 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

  • Pie Chart Designing help

    Hai ,
    Can Any body help me in creating a Pie Chart in Web dynpro ABAP ,
    My requirement is I have an  data in an internal table with company code and  Amount , which need to be displayed in Pie chart , it could be helped if u send me the code .
    Regards,
    K. Vinay Kumar

    Hi Vinay,
              Following are the steps to be followed.
                      1.  Add the Business Graphics(BG) UI Element  in the view.
                      2.  Change the chart type to pie
                      3.  Rite click on the BG UI and add catergory and series(simpleseries).
                      4.  Bind the category with the company code and series with the values.
                      5.  If u like the customize the BG, rite click and 'Edit customization' which will create a MIME Xml file.
    Ranganathan.

  • Creating Pie Chart?

    Hi All,
    2 problems:
    I am attempting to create a Pie Chart in VC but it does not work, I have built other graphs with success.
    The data I am using is simple, I have one Data column Actual Amount and another Target Amount, I simply want to put both of them into a Pie chart and show how much Target is still left to achieve compared to Actual.
    When i attempt this all i get is one full amount?
    Another problem is i want the value displayed on my line chart rather than just when i hover my mouse over the Line Chart?
    Any advice appreciated,
    Thanks

    John,
    VC does not support displaying the data series on charts (other than hovering over it).
    As for the other problem of displaying two data series on the same pie chart, try charting them on separate pie charts instead? what is ur query drilled by? to see the actual vs target amts, i would think it would be easier to view if you plotted them as bar/column charts (just a suggestion)
    prachi

  • Move percent in pie chart?

    I'd like to be able to shift the percentage number in a pie chart slightly to add text below it with a text block. Is there any way to do this? It seems I can just have the percentage amount appear either inside or outside the pie piece, but can't position where inside. Is that the case?
    Thanks in advance for your help.
    Patrick

    patricksgolden wrote:
    I'd like to be able to shift the percentage number in a pie chart slightly to add text below it with a text block. Is there any way to do this? It seems I can just have the percentage amount appear either inside or outside the pie piece, but can't position where inside. Is that the case?
    In the Inspector > Charts
    play with the slider entitled :
    Labels > Position
    *Oops, I missed that you are using Numbers '08, the slider is a Numbers '09 feature.*
    Yvan KOENIG (VALLAURIS, France) dimanche 11 avril 2010 21:29:42

  • Partial pie chart build

    Hi Folks,
    I need to have a 3D pie chart and then animate only the amount of the pie I want to show, not the rest of it. I have tried creating a pie chart and made the proportions to equal 100%. By animating the build in as 3D grow I can make the wedges come in, but I only want the first wedge, not the second: I then want to get rid of that chart and have another chart do the same thing with different numbers. Anyone got any idea how I may do this?
    Many thanks,
    Colin

    In the Build Inspector, select Delivery by Wedge, and then in the Build From section, choose "First" as the start, and "1" as the end. This has the effect of building in only the first wedge (you can also build in various contiguous subsets of the wedges as well).

  • Percentage in Flash Pie Charts

    Hi
    I have a pie chart showing calls by company, its currently showing a value on the pie segment (amount of calls). Can I have this showing as a percentage?
    Here is my code
    select null link, COMPANY label, COUNT(ID) value
    from CHART_BY_CUSTOMER
    WHERE REGION = NVL(REPLACE(:P8_REGION, '%null'||'%', NULL), REGION)
    AND LOB = NVL(REPLACE(:P8_LOB, '%null'||'%', NULL), LOB)
    AND TRUNC(TO_DATE(DATECALLED)) BETWEEN TRUNC(TO_DATE(:P8_FROM_DATE))
    AND TRUNC(TO_DATE(:P8_TO_DATE))
    AND COMPANY NOT LIKE '.Caller%'
    group by COMPANY
    order by company
    Thanks
    Adam

    Adam,
    The ratio_to_report analytic function can do exactly that. Try this:
    select null link, COMPANY label, 100*ratio_to_report(COUNT(ID)) over () value
    from CHART_BY_CUSTOMER
    WHERE REGION = NVL(REPLACE(:P8_REGION, '%null'||'%', NULL), REGION)
    AND LOB = NVL(REPLACE(:P8_LOB, '%null'||'%', NULL), LOB)
    AND TRUNC(TO_DATE(DATECALLED)) BETWEEN TRUNC(TO_DATE(:P8_FROM_DATE))
    AND TRUNC(TO_DATE(:P8_TO_DATE))
    AND COMPANY NOT LIKE '.Caller%'
    group by COMPANY
    order by company
    You'll also want to change the Postfix for your value labels to '%'.
    - Marco

  • Proportional pie charts and annotation

    Hi,
    I have Numbers to help me make colourful, etc. graphs for inclusion in my MSc dissertation. I am using pie charts to show annual comparisons between common forms of disposing of waste. Ideally, I'd like the pie chart to show the amount of hazardous waste produced per annum, i.e. the larger the amount produced, the larger the pie chart. Other than doing it manually, by eye, can Numbers do this?
    Finally, when some of the fractions are small, instead of showing, say <1%, it will say 0%. Can I alter the labelling of the pie chart's slices?
    Many thanks - and I hope that this makes sense!
    Simon

    Axtron,
    Not seeing your available data, the only thing to go by is the image that comes to mind. Pie charts are excellent for depicting parts of the whole, so your concept of showing all the various waste materials produced in a year broken into percents works well. The pie charts will do the percents for you. Perhaps grouping a few waste types with small amounts and labeling them "All Others" would work.
    To show comparisons of successive years would require a pie chart for each year. One would scan across the row of charts and see certain types of waste were increasing or decreasing percent-wise over a period of time. But remember, each chart has to be the same size so as not to distort the data.
    If you are interested in showing increases and decreases in quantities of the various waste types over a period of time, perhaps a line or bar chart would be more effective. As a matter of fact, you could use either of these to show the percents of the pie chart as well. Once you have a table of data you can experiment with each type of chart to see which best emphasizes your point.
    pw

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Reporting Services in 2005 Secondary Pie Chart?

       Hi,
             In 2008 and 20012, secondary pie charts with a percentage threshold from a main pie chart can be easily created. Is it possible to do in 2005?
    *CustomAttributes
    Thanks.

    Hi Robb,
    It seems that you are using Dundas Chart Control for SQL Server 2008 R2 Reporting Services not the Dundas Chart Control 2005 that Microsoft has purchased.
    Microsoft purchased the license to use Dundas Chart Control 2005 in Reporting Services 2008 and above. Therefore the supported upgrade is from Reporting Services 2005 Dundas Charts to SSRS 2008 (R2) and SSRS 2012 Charts.
    If you are using a particular component released by Dundas for SSRS 2008 R2, you won’t be able to upgrade Reporting Services 2008 R2 Reports with Dundas Charts to Reporting Services 2012 Charts.
    To confirm this, please check the details of this assembly “DundasRSChart.dll” located under the /Report Server/bin directory.
    If the Product Name is “Dundas Chart for Reporting Services 2008 R2”, it indicates that this is a new version of Dundas Chart for SSRS 2008 R2 (i.e. a third party control). If the Product Name is “Microsoft SQL Server”, it indicates that this is the version
    that Microsoft has purchased.
    In this condition, you have to migrate the DundasRSChart.dll to the SSRS 2012 instance and reference it as the custom assembly in the reports. Please make sure to rename the DLL file so that it won’t replace the native DundasRSChart.dll installed by SQL
    Server 2012.
    For more information about referencing custom assembly in a report, please see:
    Using Custom Assemblies with Reports
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • 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

  • No data in Active sessions pie-chart and availability is 0%

    Hi All,
    Does anyone know why my Enterprise Manager cosole in Oracle 10g installed on windows xp professional is not showing any data? Availabilty is always 0% for the instance ORCL and the active sessions pie-chart is always showing 0.01 since May 17,2005.
    Can anyone tell me how to configure EM so that instance ORCL and the active sessions start showing data again?
    Thanks

    Hi,
    Kindly activate the data request. Post that, Under "request available for reporting" a symbol will appear which means that the data has been moved to Active table and is available for reporting at further levels.
    And you can then check for contents in the active table of the DSo, you should get the records.
    Change log: Contains the change history for the delta update from the DataStore object into other data targets, such as DataStore objects or InfoCubes. It makes sense in case of delta uploads.
    Regards,
    hemlata

Maybe you are looking for