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

Similar Messages

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

  • 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 showing digit "1" when we set "ignore blank cells"property

    All,
    We have pie chart in Xcelsius 2008 that shows the data with legend value and we have also set the ignore blank cells property to ignore the blank value from column. but once we set this property, it displays the digit "1" in the legend when there is no data.
    we are expecting that nothing should be displayed in pie chart legend when there is no data for the pie chart.
    Thanks,
    Sourabh

    hi Sourabh,
    I could replicate your scenario.
    Workaround is to create a duplicate of this chart. Go to properties of this new chart.
    Go to Appearance ->
    Uncheck
    - Legend
    - Mouse-over values
    - Data Labels
    for this chart.
    Write a logic in excel using 'IF' to verify if your data is empty.
    Use 'Dynamic Visibility' feature to display this chart only when your data is empty.
    Display your original chart if your data is not empty.
    Regards,
    Vamsee

  • Pie Chart legend label icon

    Hi, is it possible to change the label icons of a Pie Chart legend? I have a pie chart with genre distribution % and would like to set the male and female genre icons instead of the color. 
    Thank you

    Hello Pedro,
    in general you can' t change the label icons in SSRS - I assume you mean with "label icons" the small colored rectangles indicating each of the sections in a pie chart. But I have a workaround for you: Simply not to use the build-in labeling mechanism
    of the chart, but to create an individual textbox with the needed symbols for your purposes. In that textbox you have to set an expression for showing the needed male or female symbols as Unicode-chars. There's a text function for that, I mean something like
    "=ChrW(&XXX)" is the appropriate expression. XXX has to be the character string of the Unicode-chartset, if you want e.g. the male symbol as an icon. Unfortunately, I can't post links, but it's quite easy to find via Bing or Google the needed
    chars or signs in the Unicode-Table (use e.g. "Unicode table" as search string and you find a great site for retrievaling chars and symbols in the Unicode-Table).
    Generally spoken, I wouldn't use pie charts at all, normally bar charts are the better choice in visualizing data - with bar charts it's easier to recognize skales than in a pie chart and you can often label bars in a direct way, so you don't need an extra
    legend.
    I hope I could help you, but feel free to ask me, if yo have further questions
    Robert 

  • Pie chart legend should display values and percents

    Hi All,
    Can any body suggest me how to display values and percent in pie chart legend.Thanks in advance.
    Edited by: 997414 on Apr 1, 2013 11:25 PM

    Hi,
    I used this tag : <SliceLabel textType="LD_TEXT_PERCENT"/>
    My full graph;
    chart:
    <Graph depthAngle="50" depthRadius="8" pieDepth="30" pieTilt="20" seriesEffect="SE_AUTO_GRADIENT" graphType="PIE"><LegendArea visible="false" automaticPlacement="AP_NEVER" position="LAP_BOTTOM" /><LocalGridData colCount="1" rowCount="{count(.//DSYATIRIMDAGILIMANA_ROW)}"><RowLabels><xsl:for-each select=".//DSYATIRIMDAGILIMANA_ROW" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><Label><xsl:value-of select="RAPORAD" /></Label></xsl:for-each></RowLabels><DataValues><xsl:for-each select=".//DSYATIRIMDAGILIMANA_ROW" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><RowData><Cell><xsl:value-of select="ORAN" /></Cell></RowData></xsl:for-each></DataValues></LocalGridData>
    <SliceLabel textType="LD_TEXT_PERCENT"/>
    </Graph>
    I hope, It helps you since I figure it out in very very hard way.
    This is the main reference : http://www.oracle.com/technetwork/middleware/reports/graph-dtd-technote-2-094743.html

  • Pie Chart legend text when drill down too larger

    Dear Gurus,
    I have this report with Pie chart:
    *)Table:
    Element Group
    Earnings 100
    Deductions 30
    When drill down (after click on Earnings/Deductions), it become detail like this:
    Element Group Classification Name
    Earning Regular
    Earning Irregular
    And the Pie chart legend show this: Earnings, Regular Earnings
    ->how to remove Earnings?I just want to show classification name as legend.
    I use OBIEE 11.1.1.3
    Any help will be appreciated
    Regards
    Joe
    Edited by: JoeSSI on Aug 10, 2012 12:33 AM
    Edited by: JoeSSI on Aug 10, 2012 12:35 AM
    Edited by: JoeSSI on Aug 10, 2012 3:24 AM

    Hi Joe,
    There was a bug associated with repeated legends in 11.1.1.3 version.Can you check the below document and see if the mentioned patch helps,
    Vertical Bar Charts In OBIEE 11g Display Repeated Labels In The Graph Legend [ID 1376185.1]
    Regards,
    Dpka

  • CRVS2010 Beta 2 Pie chart legend displaying "_e_Total:1_n_pseudoloc_"

    Instead of displaying "Total" at the bottom of my pie chart legend I am getting the following text: "_e_Total:1_n_pseudoloc_"
    The values and percentages calculate correctly, but the label is unusual.

    Hello,
    I have the same problem with my pie chart. My report was fine before I did my update to CRVS2010 Beta 2. I was using crystal report 11.5.
    My report is really simple. I have a resume chart that you can drilldown. Each drilldown show the same chart for the selected
    item.
    I'm using Windows 7 Professionnel 64 bit in french (canada version).
    Visual Studio Version 10.0.30319.1
    Framework 4.0.30319

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

  • Pdf generated through API's does not display pie chart

    I'm using BIP 10.1.3.4, running on Oracle Linux 5 connecting to a 11g database.
    I developed an RTF using the word template builder and included a pie chart. Previewing from within Word works fine, running the report directly from BIP works fine. I then used the API's to generate the pdf programmatically to have more control.
    I use RTFProcessor to convert my RTF into a XSL, DataProcessor to generate the xml data and FOProcessor to generate the final PDF. This works fine running from local JDeveloper, connecting through to the remote database.
    I've now loaded the java class with the API's into the database, and as per http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12188/T421739T517850.htm#T520954, loaded up the following jar's
    xdocore.jar - the core BI Publisher library
    aolj.jar - although this is an Oracle E-Business Suite library, it is required for standalone implementations as well
    i18nAPI_v3.jar - the i18n library used for localization functions
    xdoparser.jar - the scalable XML parser and XSLT 2.0 engine
    xmlparserv2-904.jar - the main XML parser/XSLT engine
    bipres.jar - a charting library
    bicmn.jar - a charting library
    jewt4.jar - a charting support library
    share.jar - a charting support library
    collections.jar - you only need this if you are working with the delivery APIs or bursting engine.
    The report works fine, all data tabels are shown but the pie chart is missing. I originally got the jar files from the TemplateBuilder/jlib directory. I also tried using the jar files from the BIP/xmlpserver\WEB-INF\lib directory as well. Problem remains - everything works fine except for the lack of the pie chart !
    Any help would be greatly appreciated :)
    Cheers,
    Brent

    bump .... anyone had similar problems ?

  • 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

  • Pie Chart Legend Question

    Running CR XI R2
    I have a pie chart that is displaying both Percentages and values in the legend. Is there any way to remove the $ from the value in the Legend as the Value is not currency but a count.
    Thanks
    Joe

    I tried that and it didn't work. I've actually played around with it more and got them to go away
    I don't have data elements (labels) on the pie chart slices, and I'm sorry i forgot to mention that. I put the labels on, changed their formatting and took them off again and it affected the legend in the way I was hoping for.
    Thanks for the response

Maybe you are looking for

  • RTF file with Template Buider

    Hi I have the XML data for 100 columns,I want to create the RTF file to include all 100 columns in one table. My questions are 1.Is there any best way to setup the more columns in one table . Can you please point me some examples where i can see the

  • How can I turn off email alerts in Lion server?

    I have a 2011 Mini Server.  I don't want to run any of the server software and followed the instructions in the Apple article "How to disable Lion Server".  The problem I'm having is that I keep getting email alerts, mostly the same one saying "The h

  • Force install of an Add-ons

    We have to public computers in our staff area. They are both locked down via GP. We have set them up to auto-login to guest accounts when you switch the machine on. Each time you start the machine it resets the local profile to blank. So nothing can

  • Invoice value including subsequent debit

    Hi Friends,      I have posted an invoice for a material. Later i have posted subsequent debit for the extra value. Now i would like to see, how much i have spent for that material including subsequent debit amount. Where can i see that value, kindly

  • Deficit of Stock w. vendor QI 96 SET : 213005200G 1101 O

    I would like to return delivery in QM because the goods of subcontract PO has defects. but the system show Deficit of stock as subject. I check MMBE the quantity is correct and its status is Q. why the system show this message? the quantity is correc