Graphical chart in a mortgage calculator

I need to add a graphical amortization chart to my mortgage calculator program.
I don't have a clue how to start. Does anyone know of any reading material
I could get my hands on that would help me out?
An example to work with would be nice, but I will settle for
some extra reading material to study.
thank you.

I don't think I am allowed to use third party stuff
what I need to do is devise a chart that will show the interest paid as well as the principal payment as two lines on an a graph
when you change the interest rate and term of the loan
and recalculate. the graph shows the new interest and principal

Similar Messages

  • Mortgage Calculator in Java

    Can anyone help me figure out how to change my mortgage calculator to do the following?
    Modify the mortgage program to display the mortgage payment amount. Then, list the loan balance and interest paid for each payment over the term of the loan. The list would scroll off the screen, but use loops to display a partial list, hesitate, and then display more of the list. Do not use a graphical user interface. Insert comments in the program to document the program. Here is the code I have currently.
    import java.io.*;
    import java.text.DecimalFormat;
    public class MortgageRateWeek3Test
         public static void main(String[] args) throws IOException
              //Declaring and Constructing Variables
              int iTerm;
              double dInterest = 5.75;
              double dPayment, dRate, dAmount = 200000, dMonthlyInterest,dMonthlyPrincipal, dMonthlyBalance;
              DecimalFormat twoDigits = new DecimalFormat("$#,000.00");
                        //Calculations Retrieved from http://www.1728.com/loanform.htm on 9/14/05
                        dRate = dInterest / 1200;
                        iTerm = 360;
                        dPayment = (dAmount * dRate) / (1 - Math.pow(1 / (1 + dRate), iTerm));
                        dMonthlyInterest = (dAmount / 12) * (dInterest / 100);
                        dMonthlyPrincipal = (dPayment - dMonthlyInterest);
                        dMonthlyBalance = (dAmount - dMonthlyPrincipal);
                                  // Output dPayment
                                  System.out.println();
                                  System.out.println("\tYour Monthly Payment is: " + twoDigits.format (dPayment));
                                  System.out.println();
         public class monthlyInterest
              //Declaring Variables for monthlyInterest
              double dMonthlyInterest = 0.0;
              double dAmount = 0.0;
              double dInterest = 0.0;
                   //Calculations for monthlyInterest
                   dMonthlyInterest = (dAmount / 12) * (dInterest / 100);
              return dMonthlyInterest;
         public static double monthlyPrincipal()
              //Declaring Variables for monthlyPrincipal
              double dMonthlyPrincipal = 0.0;
              double dPayment = 0.0;
              double dMonthlyInterest = 0.0;
                   //Calculations for monthlyPrincipal
                   dMonthlyPrincipal = (dPayment - dMonthlyInterest);
              return dMonthlyPrincipal;
         public static double monthlyBalance()
              //Declaring Variables for monthlyBalance
              double dMonthlyBalance = 0.0;
              double dAmount = 0.0;
              double dMonthlyPrincipal = 0.0;
                   //Calculations for monthlyBalance
                   dMonthlyBalance = (dAmount - dMonthlyPrincipal);
              return dMonthlyBalance;
    }

    There are imports that aren't available to us, so no. nobody probaly can. Of course maybe someon could be bothered going through all of your code, and may spot some mistake. But I doubt they will since you didn't bother to use [c[b]ode] tags.

  • Graphical Chart Generation

    Post Author: RamprakashA
    CA Forum: Charts and Graphs
    Hai all,       I am using  Inbuilt  version of Crystal  report  in VS.NET 2005(Crystal Report Version  10), i am creating a consolidated report, i want to added 11 Bar chart and  Line Chart combined together in one report, Is it is possible or  not.....Any one know how many Graphical Chart can be placed inside a single Crystal Report.   If it is possible then, when i am added more the 5 Bar  Report i am not getting any preview to that,i paced all the chart in separated Report Header for every chartIf any one want the  structure  please find the report in attachment. Any one help me,ASAP i am running out of time  Thank You Ramprakash                                

    I mean with graphical diagrams these: http://www.realmeme.com/miner/java/AppServersDejanews.png

  • Category Project Status Chart report is not viewing in graphical chart.

    Hi,
       I created a dupilcate "Category Project Status Chart with GL " of "Category Project Status Chart ",however not able to generate the graphical chart on the report.
    My Query Defination for the Catagory Report Chart
    SELECT <%RESULTS%> FROM ( SELECT DISTINCT INTERNAL_CAT_OBJECT_NAME AS CATEGORY,CASE WHEN
    ((<%SCHEMA%>.FCI_PRJ_STATUS(T1.OBJECTID,3)) = 1) THEN <%RES_ID(projects$project.status.red)%> WHEN
    ((<%SCHEMA%>.FCI_PRJ_STATUS(T1.OBJECTID,3)) = 2) THEN <%RES_ID(projects$project.status.yellow)%> WHEN
    ((<%SCHEMA%>.FCI_PRJ_STATUS(T1.OBJECTID,3)) = 3) THEN <%RES_ID(projects$project.status.green)%> WHEN
    ((<%SCHEMA%>.FCI_PRJ_STATUS(T1.OBJECTID,3)) = 4) THEN <%RES_ID(projects$project.status.future)%> WHEN
    ((<%SCHEMA%>.FCI_PRJ_STATUS(T1.OBJECTID,3)) = 5) THEN <%RES_ID(projects$project.status.complete)%> ELSE
    <%RES_ID(projects$project.status.unknown)%> END AS PRJ_STATUS_NAME,<%SCHEMA%>.FCI_PRJ_STATUS(T1.OBJECTID, 3)
    AS PRJ_STATUS_CODE, <%SCHEMA%>.FCI_DOC_CUR_CONVERT(COALESCE(ESTIMATED_PRICE,0),ESTIMATED_OBJECT_ID,<%COMPANY_CURRENCY_OBJ_ID%>)
    AS PRICE,(SELECT DISPLAY_NAME FROM <%SCHEMA%>.FCI_MAS_CURRENCY WHERE OBJECTID = <%COMPANY_CURRENCY_OBJ_ID%>) AS
    CURRENCY FROM <%SCHEMA%>.FCI_PRO_PROJECTS T1 WHERE T1.INACTIVE = 0 AND T1.IS_TEMPLATE = 0 AND
    T1.CONTEXTID = <%CONTEXT(projects.projects)%> X inner join <%SCHEMA%>.FCI_DYN_$2147483538 ON OBJECTID = <%SCHEMA%>.FCI_DYN_$2147483538.OBJECTID ) GROUP BY GL_DESCRIPTION_OBJECT_NAME,CATEGORY, PRJ_STATUS_NAME, PRJ_STATUS_CODE, CURRENCY <%ORDERBY%>
    The report i am seeing is
    Normal report with one column as "GL Description" with values in a table.
    Please let  me know if you have any idea ?
    Regards
    Sumanta

    Hi Rob,
               Now the chart is displaying , however the color notaion is not showing, It is showing only one yellow color.In Chart defination i used as *
    Color Palette: High Contrast and Legend: East*
    as it is in original.
    Please let me know if any configuration required.
    Regards
    Sumanta

  • Stacked format in chart using graphics:chart

    I Implemented a graphics:chart element and is working fine, I know how to set Pie format, bars, line in 2D or 3D, but I cant find info about how to set the stacked format.
    I read the PDF that comes with the SAP chart Designer. In the section “Blocks” with Time Axis gives and example.
    And the example is the following:
    <?xml version="1.0" encoding="utf-8"?>
    <ChartData>
    <Categories>
      <Category>20060703;120000</Category>
      <Category>20060704;120000</Category>
      <Category>20060705;120000</Category>
      <Category>20060706;120000</Category>
    </Categories>
    <Series label="Coffee">
      <Point>
       <Value type="y">94</Value>
      </Point>
      <Point>
       <Value type="y">110</Value>
      </Point>
      <Point>
       <Value type="y">139</Value>
      </Point>
      <Point>
       <Value type="y">192</Value>
      </Point>
    </Series>
    <Series label="Espresso">
      <Point>
       <Value type="y">35</Value>
      </Point>
      <Point>
       <Value type="y">39</Value>
      </Point>
      <Point>
       <Value type="y">38</Value>
      </Point>
      <Point>
       <Value type="y">59</Value>
      </Point>
    </Series>
    </ChartData>
    I copy, paste this example and I dont get stacked columns I see 2 series for each category, and I see 20060703;120000 as a label of the column. Something is wrong and I dont get it.
    Some1 have a code sample of a stacked graphics:chart ?

    Hi Roddy,
    I can only assume that the default value for this attribute is for a column chart.
    Here is a sample of a stacked column chart. I just did what was suggested above but using ChartDesigner to create the customising and then I pasted it into the sample. As mentioned I created a second series of data.
    <%@page language="abap" %>
    <%@extension name="graphics" prefix="graphics" %>
    <%@extension name="htmlb" prefix="abap" %>
    <graphics:chart igs_rfc_destination = "IGS_RFC_DEST"
                    width               = "300"
                    height              = "300"
                    format              = "JPG"
                    font_family         = "Arial Unicode MS"
                    dimension           = "PseudoThree" >
      <graphics:data>
        <graphics:nativexml>
          <?xml version="1.0" encoding="utf-8"?>
          <SimpleChartData>
            <Categories>
              <C>Category 1</C>
              <C>Category 2</C>
              <C>Category 3</C>
              <C>Category 4</C>
              <C>Category 5</C>
            </Categories>
            <Series>
              <S label="17.55%">17.55</S>
              <S label="17.10%">17.10</S>
              <S label="8.70%">8.7</S>
              <S label="8.25%">8.25</S>
              <S label="6.87%">6.87</S>
            </Series>
            <Series>
              <S label="6.87%">6.87</S>
              <S label="8.25%">8.25</S>
              <S label="8.70%">8.7</S>
              <S label="17.10%">17.10</S>
              <S label="17.55%">17.55</S>
            </Series>
          </SimpleChartData>
        </graphics:nativexml>
      </graphics:data>
      <graphics:custom>
        <graphics:nativexml>
                <?xml version="1.0" encoding="utf-8"?>
          <SAPChartCustomizing version="2.0">
           <GlobalSettings>
            <Dimension>Two</Dimension>
            <TransparentColor>None</TransparentColor>
            <ColorPalette>Tradeshow</ColorPalette>
            <ColorOrder>Default</ColorOrder>
            <Gaps>Void</Gaps>
            <EqualizeValueAxes>false</EqualizeValueAxes>
            <ThreeD>
             <Ratio>1.75</Ratio>
             <Distance>20</Distance>
             <Depth>10</Depth>
             <DepthCalculation>Automatic</DepthCalculation>
            </ThreeD>
            <Defaults>
             <ChartType>StackedColumns</ChartType>
             <FontFamily>Automatic</FontFamily>
            </Defaults>
            <Colors>
             <Color id="1">RGB(187,204,221)</Color>
             <Color id="2">RGB(204,222,240)</Color>
             <Color id="3">RGB(221,234,243)</Color>
             <Color id="4">RGB(221,234,243)</Color>
             <Color id="5">RGB(236,244,249)</Color>
             <Color id="6">RGB(236,244,249)</Color>
             <Color id="7">RGB(255,255,255)</Color>
             <Color id="8">RGB(255,0,255)</Color>
             <Color id="9">RGB(126,168,222)</Color>
             <Color id="10">RGB(107,152,202)</Color>
             <Color id="11">RGB(79,135,191)</Color>
             <Color id="12">RGB(44,106,174)</Color>
             <Color id="13">RGB(19,80,142)</Color>
             <Color id="14">RGB(192,192,192)</Color>
             <Color id="15">RGB(192,192,192)</Color>
             <Color id="16">RGB(0,0,0)</Color>
             <Color id="17">RGB(198,222,127)</Color>
             <Color id="18">RGB(171,197,94)</Color>
             <Color id="19">RGB(147,174,68)</Color>
             <Color id="20">RGB(118,143,44)</Color>
             <Color id="21">RGB(91,111,33)</Color>
             <Color id="22">RGB(192,192,192)</Color>
             <Color id="23">RGB(192,192,192)</Color>
             <Color id="24">RGB(156,235,145)</Color>
             <Color id="25">RGB(255,229,112)</Color>
             <Color id="26">RGB(248,211,61)</Color>
             <Color id="27">RGB(241,194,10)</Color>
             <Color id="28">RGB(220,180,0)</Color>
             <Color id="29">RGB(200,163,0)</Color>
             <Color id="30">RGB(192,192,192)</Color>
             <Color id="31">RGB(192,192,192)</Color>
             <Color id="32">RGB(255,250,102)</Color>
             <Color id="33">RGB(196,179,236)</Color>
             <Color id="34">RGB(162,149,205)</Color>
             <Color id="35">RGB(135,123,176)</Color>
             <Color id="36">RGB(109,99,150)</Color>
             <Color id="37">RGB(91,81,130)</Color>
             <Color id="38">RGB(192,192,192)</Color>
             <Color id="39">RGB(192,192,192)</Color>
             <Color id="40">RGB(255,103,88)</Color>
             <Color id="41">RGB(169,204,197)</Color>
             <Color id="42">RGB(137,167,161)</Color>
             <Color id="43">RGB(115,145,140)</Color>
             <Color id="44">RGB(88,115,110)</Color>
             <Color id="45">RGB(61,82,77)</Color>
             <Color id="46">RGB(192,192,192)</Color>
             <Color id="47">RGB(192,192,192)</Color>
             <Color id="48">RGB(192,192,192)</Color>
             <Color id="49">RGB(199,172,137)</Color>
             <Color id="50">RGB(167,147,123)</Color>
             <Color id="51">RGB(145,129,109)</Color>
             <Color id="52">RGB(115,102,88)</Color>
             <Color id="53">RGB(82,76,69)</Color>
             <Color id="54">RGB(192,192,192)</Color>
             <Color id="55">RGB(192,192,192)</Color>
             <Color id="56">RGB(192,192,192)</Color>
             <Color id="57">RGB(220,138,188)</Color>
             <Color id="58">RGB(195,103,158)</Color>
             <Color id="59">RGB(174,90,140)</Color>
             <Color id="60">RGB(155,61,115)</Color>
             <Color id="61">RGB(126,38,89)</Color>
             <Color id="62">RGB(192,192,192)</Color>
             <Color id="63">RGB(192,192,192)</Color>
             <Color id="64">RGB(192,192,192)</Color>
            </Colors>
           </GlobalSettings>
           <Elements>
            <ChartElements>
             <Background>
              <Visibility>true</Visibility>
              <Extension/>
              <Insets>3</Insets>
              <Color>@6</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
             </Background>
             <PlotArea>
              <Visibility>true</Visibility>
              <Extension/>
              <Alignment>Automatic</Alignment>
              <ManualPosition>
               <Top>0</Top>
               <Left>0</Left>
               <Bottom>100</Bottom>
               <Right>100</Right>
              </ManualPosition>
              <Color>@5</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>@4</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
             </PlotArea>
             <Title>
              <Visibility>true</Visibility>
              <Extension/>
              <Caption/>
              <Position>Top</Position>
              <AlignToPlot>false</AlignToPlot>
              <Insets>4</Insets>
              <Text>
               <FontFamily>Automatic</FontFamily>
               <Color>@16</Color>
               <Size>8</Size>
               <Style>Normal</Style>
               <HorizontalPosition>Default</HorizontalPosition>
               <VerticalPosition>Default</VerticalPosition>
               <Direction>Default</Direction>
              </Text>
              <Color>None</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
             </Title>
             <Subtitle>
              <Visibility>true</Visibility>
              <Extension/>
              <Caption/>
              <Position>Top</Position>
              <AlignToPlot>false</AlignToPlot>
              <Insets>4</Insets>
              <Text>
               <FontFamily>Automatic</FontFamily>
               <Color>@16</Color>
               <Size>8</Size>
               <Style>Normal</Style>
               <HorizontalPosition>Default</HorizontalPosition>
               <VerticalPosition>Default</VerticalPosition>
               <Direction>Default</Direction>
              </Text>
              <Color>None</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
             </Subtitle>
             <Legend>
              <Visibility>true</Visibility>
              <Extension/>
              <Caption/>
              <Alignment>ToPlotArea</Alignment>
              <Position>Bottom</Position>
              <Insets>4</Insets>
              <Order>Ascending</Order>
              <OrderByRow>false</OrderByRow>
              <OrderByData>false</OrderByData>
              <MoreInfo>false</MoreInfo>
              <ManualPosition>
               <Top>93.9048</Top>
               <Left>7.24382</Left>
               <Bottom>98.6667</Bottom>
               <Right>98.7633</Right>
              </ManualPosition>
              <Text>
               <FontFamily>Automatic</FontFamily>
               <Color>@16</Color>
               <Size>9</Size>
               <Style>Normal</Style>
              </Text>
              <Color>None</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
              <SashColor>RGB(0,0,0)</SashColor>
              <SashStyle>Solid</SashStyle>
              <SashWidth>1</SashWidth>
             </Legend>
            </ChartElements>
            <ChartTypes>
             <StackedColumns>
              <Visibility>true</Visibility>
              <Extension/>
              <Percentage>true</Percentage>
              <Distance>50</Distance>
              <AutoBorder>false</AutoBorder>
              <BlockStyle>Rectangle</BlockStyle>
              <ConnectionLines>false</ConnectionLines>
             </StackedColumns>
            </ChartTypes>
            <ChartAxes>
             <CategoryAxis>
              <Visibility>true</Visibility>
              <Extension/>
              <Minimum>1</Minimum>
              <MinimumAutomatic>true</MinimumAutomatic>
              <Maximum>5</Maximum>
              <MaximumAutomatic>true</MaximumAutomatic>
              <Order>Ascending</Order>
              <VariableCategories>false</VariableCategories>
              <AxisType>Flat</AxisType>
              <Centered>false</Centered>
              <Position>Primary</Position>
              <Color>None</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
              <Line>
               <Visibility>true</Visibility>
               <Extension/>
               <CategoryGap>0</CategoryGap>
               <WrapText>true</WrapText>
               <Position>AtBorder</Position>
               <Insets>2</Insets>
               <Axis>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>2</Width>
               </Axis>
               <MajorTicks>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>2</Width>
               </MajorTicks>
               <MajorTickGap>0</MajorTickGap>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>9</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Line>
              <GridLine>
               <Visibility>true</Visibility>
               <Extension/>
               <MajorLines>
                <Color>@2</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MajorLines>
               <MajorTickGap>0</MajorTickGap>
              </GridLine>
              <Title>
               <Visibility>true</Visibility>
               <Extension/>
               <Caption/>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>8</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Title>
              <Unit>
               <Visibility>true</Visibility>
               <Extension/>
               <Caption/>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>8</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Unit>
             </CategoryAxis>
             <ValueAxis id="ValueAxis1">
              <Visibility>true</Visibility>
              <Extension/>
              <Minimum>0</Minimum>
              <MinimumCalculation>Automatic</MinimumCalculation>
              <Maximum>100</Maximum>
              <MaximumCalculation>Automatic</MaximumCalculation>
              <ScalingType>Linear</ScalingType>
              <Order>Ascending</Order>
              <Position>Primary</Position>
              <Color>None</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
              <Line>
               <Visibility>true</Visibility>
               <Extension/>
               <Insets>2</Insets>
               <Format/>
               <Axis>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>2</Width>
               </Axis>
               <MajorTickCalculation>AutomaticTicks</MajorTickCalculation>
               <NumberMajorTicks>6</NumberMajorTicks>
               <MajorTicks>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>2</Width>
               </MajorTicks>
               <AutomaticMinorTicks>true</AutomaticMinorTicks>
               <NumberMinorTicks>4</NumberMinorTicks>
               <MinorTicks>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MinorTicks>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>9</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Line>
              <GridLine>
               <Visibility>true</Visibility>
               <Extension/>
               <MajorLines>
                <Color>@2</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MajorLines>
               <MajorTickGap>0</MajorTickGap>
               <MinorLines>
                <Color>@3</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MinorLines>
               <MinorTickGap>0</MinorTickGap>
              </GridLine>
              <Title>
               <Visibility>true</Visibility>
               <Extension/>
               <Caption/>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>8</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Title>
              <Unit>
               <Visibility>true</Visibility>
               <Extension/>
               <Caption/>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>8</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Unit>
             </ValueAxis>
             <ValueAxis id="ValueAxis2">
              <Visibility>false</Visibility>
              <Extension/>
              <Minimum>0</Minimum>
              <MinimumCalculation>Automatic</MinimumCalculation>
              <Maximum>1</Maximum>
              <MaximumCalculation>Automatic</MaximumCalculation>
              <ScalingType>Linear</ScalingType>
              <Order>Ascending</Order>
              <Position>Secondary</Position>
              <Color>None</Color>
              <SecondaryColor>RGB(0,0,0)</SecondaryColor>
              <Pattern>None</Pattern>
              <Gradient>None</Gradient>
              <Texture>None</Texture>
              <TextureMode>Tile</TextureMode>
              <Transparency>0</Transparency>
              <BorderColor>None</BorderColor>
              <BorderStyle>Solid</BorderStyle>
              <BorderWidth>1</BorderWidth>
              <Line>
               <Visibility>true</Visibility>
               <Extension/>
               <Insets>2</Insets>
               <Format/>
               <Axis>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>2</Width>
               </Axis>
               <MajorTickCalculation>AutomaticTicks</MajorTickCalculation>
               <NumberMajorTicks>6</NumberMajorTicks>
               <MajorTicks>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>2</Width>
               </MajorTicks>
               <AutomaticMinorTicks>true</AutomaticMinorTicks>
               <NumberMinorTicks>4</NumberMinorTicks>
               <MinorTicks>
                <Color>@1</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MinorTicks>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>9</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Line>
              <GridLine>
               <Visibility>true</Visibility>
               <Extension/>
               <MajorLines>
                <Color>@2</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MajorLines>
               <MajorTickGap>0</MajorTickGap>
               <MinorLines>
                <Color>@3</Color>
                <Style>Solid</Style>
                <Width>1</Width>
               </MinorLines>
               <MinorTickGap>0</MinorTickGap>
              </GridLine>
              <Title>
               <Visibility>true</Visibility>
               <Extension/>
               <Caption/>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>8</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Title>
              <Unit>
               <Visibility>true</Visibility>
               <Extension/>
               <Caption/>
               <Text>
                <FontFamily>Automatic</FontFamily>
                <Color>@16</Color>
                <Size>8</Size>
                <Style>Normal</Style>
                <HorizontalPosition>Default</HorizontalPosition>
                <VerticalPosition>Default</VerticalPosition>
                <Direction>Default</Direction>
               </Text>
               <Color>None</Color>
               <SecondaryColor>RGB(0,0,0)</SecondaryColor>
               <Pattern>None</Pattern>
               <Gradient>None</Gradient>
               <Texture>None</Texture>
               <TextureMode>Tile</TextureMode>
               <Transparency>0</Transparency>
               <BorderColor>None</BorderColor>
               <BorderStyle>Solid</BorderStyle>
               <BorderWidth>1</BorderWidth>
              </Unit>
             </ValueAxis>
            </ChartAxes>
           </Elements>
           <Values>
            <Series>
             <Visibility>true</Visibility>
             <XAxisId>Primary</XAxisId>
             <YAxisId>Primary</YAxisId>
             <LineType>Direct</LineType>
             <ShowInLegend>Automatic</ShowInLegend>
             <ShowLabel>false</ShowLabel>
             <Format>$Label</Format>
             <LineColor>Automatic</LineColor>
             <LineStyle>Solid</LineStyle>
             <LineWidth>2</LineWidth>
             <Color>Automatic</Color>
             <SecondaryColor>RGB(0,0,0)</SecondaryColor>
             <Pattern>None</Pattern>
             <Gradient>None</Gradient>
             <Texture>None</Texture>
             <TextureMode>Tile</TextureMode>
             <Transparency>0</Transparency>
             <MarkerShape>Rectangle</MarkerShape>
             <MarkerSize>5</MarkerSize>
             <BorderColor>Automatic</BorderColor>
             <BorderStyle>Solid</BorderStyle>
             <BorderWidth>1</BorderWidth>
             <Text>
              <FontFamily>Automatic</FontFamily>
              <Color>@16</Color>
              <Size>8</Size>
              <Style>Normal</Style>
              <HorizontalPosition>Default</HorizontalPosition>
              <VerticalPosition>Default</VerticalPosition>
              <Direction>Default</Direction>
             </Text>
            </Series>
            <Series id="Series1">
             <Visibility>true</Visibility>
             <ChartType>Automatic</ChartType>
             <XAxisId>Primary</XAxisId>
             <YAxisId>Primary</YAxisId>
             <LineType>Direct</LineType>
             <ShowInLegend>Automatic</ShowInLegend>
             <ShowLabel>false</ShowLabel>
             <Format>$Label</Format>
             <LineColor>Automatic</LineColor>
             <LineStyle>Solid</LineStyle>
             <LineWidth>2</LineWidth>
             <Color>Automatic</Color>
             <SecondaryColor>RGB(0,0,0)</SecondaryColor>
             <Pattern>None</Pattern>
             <Gradient>None</Gradient>
             <Texture>None</Texture>
             <TextureMode>Tile</TextureMode>
             <Transparency>0</Transparency>
             <MarkerShape>Rectangle</MarkerShape>
             <MarkerSize>5</MarkerSize>
             <BorderColor>Automatic</BorderColor>
             <BorderStyle>Solid</BorderStyle>
             <BorderWidth>1</BorderWidth>
             <Text>
              <FontFamily>Automatic</FontFamily>
              <Color>@16</Color>
              <Size>8</Size>
              <Style>Normal</Style>
              <HorizontalPosition>Default</HorizontalPosition>
              <VerticalPosition>Default</VerticalPosition>
              <Direction>Default</Direction>
             </Text>
            </Series>
            <Series id="Series2">
             <Visibility>true</Visibility>
             <ChartType>Automatic</ChartType>
             <XAxisId>Primary</XAxisId>
             <YAxisId>Primary</YAxisId>
             <LineType>Direct</LineType>
             <ShowInLegend>Automatic</ShowInLegend>
             <ShowLabel>false</ShowLabel>
             <Format>$Label</Format>
             <LineColor>Automatic</LineColor>
             <LineStyle>Solid</LineStyle>
             <LineWidth>2</LineWidth>
             <Color>Automatic</Color>
             <SecondaryColor>RGB(0,0,0)</SecondaryColor>
             <Pattern>None</Pattern>
             <Gradient>None</Gradient>
             <Texture>None</Texture>
             <TextureMode>Tile</TextureMode>
             <Transparency>0</Transparency>
             <MarkerShape>Rectangle</MarkerShape>
             <MarkerSize>5</MarkerSize>
             <BorderColor>Automatic</BorderColor>
             <BorderStyle>Solid</BorderStyle>
             <BorderWidth>1</BorderWidth>
             <Text>
              <FontFamily>Automatic</FontFamily>
              <Color>@16</Color>
              <Size>8</Size>
              <Style>Normal</Style>
              <HorizontalPosition>Default</HorizontalPosition>
              <VerticalPosition>Default</VerticalPosition>
              <Direction>Default</Direction>
             </Text>
            </Series>
            <Series id="Series3">
             <Visibility>true</Visibility>
             <ChartType>Automatic</ChartType>
             <XAxisId>Primary</XAxisId>
             <YAxisId>Primary</YAxisId>
             <LineType>Direct</LineType>
             <ShowInLegend>Automatic</ShowInLegend>
             <ShowLabel>false</ShowLabel>
             <Format>$Label</Format>
             <LineColor>Automatic</LineColor>
             <LineStyle>Solid</LineStyle>
             <LineWidth>2</LineWidth>
             <Color>Automatic</Color>
             <SecondaryColor>RGB(0,0,0)</SecondaryColor>
             <Pattern>None</Pattern>
             <Gradient>None</Gradient>
             <Texture>None</Texture>
             <TextureMode>Tile</TextureMode>
             <Transparency>0</Transparency>
             <MarkerShape>Rectangle</MarkerShape>
             <MarkerSize>5</MarkerSize>
             <BorderColor>Automatic</BorderColor>
             <BorderStyle>Solid</BorderStyle>
             <BorderWidth>1</BorderWidth>
             <Text>
              <FontFamily>Automatic</FontFamily>
              <Color>@16</Color>
              <Size>8</Size>
              <Style>Normal</Style>
              <HorizontalPosition>Default</HorizontalPosition>
              <VerticalPosition>Default</VerticalPosition>
              <Direction>Default</Direction>
             </Text>
            </Series>
            <Series id="Series4">
             <Visibility>true</Visibility>
             <ChartType>Automatic</ChartType>
             <XAxisId>Primary</XAxisId>
             <YAxisId>Primary</YAxisId>
             <LineType>Direct</LineType>
             <ShowInLegend>Automatic</ShowInLegend>
             <ShowLabel>false</ShowLabel>
             <Format>$Label</Format>
             <LineColor>Automatic</LineColor>
             <LineStyle>Solid</LineStyle>
             <LineWidth>2</LineWidth>
             <Color>Automatic</Color>
             <SecondaryColor>RGB(0,0,0)</SecondaryColor>
             <Pattern>None</Pattern>
             <Gradient>None</Gradient>
             <Texture>None</Texture>
             <TextureMode>Tile</TextureMode>
             <Transparency>0</Transparency>
             <MarkerShape>Rectangle</MarkerShape>
             <MarkerSize>5</MarkerSize>
             <BorderColor>Automatic</BorderColor>
             <BorderStyle>Solid</BorderStyle>
             <BorderWidth>1</BorderWidth>
             <Text>
              <FontFamily>Automatic</FontFamily>
              <Color>@16</Color>
              <Size>8</Size>
              <Style>Normal</Style>
              <HorizontalPosition>Default</HorizontalPosition>
              <VerticalPosition>Default</VerticalPosition>
              <Direction>Default</Direction>
             </Text>
            </Series>
           </Values>
           <Images/>
          </SAPChartCustomizing>
        </graphics:nativexml>
      </graphics:custom>
    </graphics:chart>
    Cheers
    Graham Robbo

  • Waveform graphic / chart time display (x-axis) is wrong?

    Why the time is incorrect in waveform graphic / chart? How to solve it?
    When I run the program, I find that waveform graphic/chart show 0 to 20 (time/x-axis) but actual is running 30 second.

    The Build Waveform is on the Waveform palette. You can use it to set the dt. It's a fancy cluster. The dt is your loop rate in seconds. I would assume you have some wait or delay function that you are using to set the loop rate.
    You can also use a property node - XScale.Range. Offset and Xscale.Range.Multiplier. Look at the example called Real Time Chart.

  • Graphics chart scaling XML

    Hello,
    We are using BSP to display charts with percentages on them. We want to always display 0 - 100 on the value access but the scaling adjusts itself to the values of the bars. The XML for the chart design is developed in the Chart Designer and graphics:chart is used in the view definition. Since we are using percentages on the bars the scaling is from 0 to 1.0 rather than 0 to 100.
    Any assistance would be appreciated.
    Thanks,
    Rick

    Rick,
    Please check the properties of Minimum Data Value and Maximum Data Value of xml.
    You can set the minimum and maximum data value for your graph. Based on that range values, scaling will be display on your graph. Also please check the properties of Value Axis->Axis properties
          Minimum Value  0
          Maximum Value  100
    Thanks!
    Lakshmikandh

  • Graphics chart LEGEND not display on Form on Web.

    Sir,
    I am create the Chart in graphics builder 6i and call the chart from form builder 6i it runnnig fine chart and Legend are displayed. then move the chart and form to Database(apps) then run the form in ERP menu Chart Only display but LEGEND not display.
    Please help me how appear the LEGEND on the chart.
    Advance Thanks,
    Kadavul. V

    Hi
    pls post ur Question in the right forum...
    General EBS Discussion
    Regards,
    Abdetu...

  • Function module to display the given numbers in graphics / chart.

    Hi all,
    I was given a situation where if I give some number, those numbers shud be displayed in graphics or like a chart ( X & y axis chart). Is there any function modules for this? Pls help me.
    Thanks in advance.
    Vijaykumar.G

    You might want to try this function module.
    [code]
    REPORT ZRICH_0005 .
    DATA: BEGIN OF ITAB_DATA OCCURS 0,
               DATANAME(15),
               QUANTITY1 TYPE I,
               QUANTITY2 TYPE I,
               QUANTITY3 TYPE I,
          END OF ITAB_DATA.
    Data: BEGIN OF ITAB_OPTIONS OCCURS 0,
               OPTION(20),
          END OF ITAB_OPTIONS.
    ITAB_DATA-DATANAME = 'Maple'.
    ITAB_DATA-QUANTITY1 = 5500.
    ITAB_DATA-QUANTITY2 = 6200.
    ITAB_DATA-QUANTITY3 = 5900.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Oak'.
    ITAB_DATA-QUANTITY1 = 3500.
    ITAB_DATA-QUANTITY2 = 5200.
    ITAB_DATA-QUANTITY3 = 4400.
    APPEND ITAB_DATA.
    ITAB_DATA-DATANAME = 'Cherry'.
    ITAB_DATA-QUANTITY1 = 1800.
    ITAB_DATA-QUANTITY2 = 2200.
    ITAB_DATA-QUANTITY3 = 1900.
    APPEND ITAB_DATA.
    CALL FUNCTION 'GRAPH_MATRIX_3D'
         EXPORTING
              COL1        = 'Jan'
              COL2        = 'Feb'
              COL3        = 'Mar'
              TITL        = 'Lumber Usage in $'
         TABLES
              DATA        = ITAB_DATA
              OPTS        = ITAB_OPTIONS
         EXCEPTIONS
              OTHERS      = 1.
    [/code]
    Regards,
    Rich Heilman

  • Java Mortgage Calculator

    Im having trouble making my GUI look the way I want it. Obviously I dont know enough about Gridlayout And I think I need to use GridBagLayout instead. I need the amortization schedule to print all the way out and everything to line up. If anyone has some suggestions I would love to hear it, and yes, this is my homework. see the code below:
    Main java file: implements MyFrame4 java file
    import java.awt.*; //imports awt
    public class MortgageCalculator4 {   // main MortgageCalculator class constuctor
    public static void main(String args[]) {  //implements MyFrame4
    Frame f = new MyFrame4();
    } //end of MortgageCalculator4 class
    Adapter java file: implements WindowAdapter
    import java.awt.*; //imports awt
    import java.awt.event.*;
    class MyAdapter extends WindowAdapter {   //creates window adapter
    Frame myFrame;
    MyAdapter(Frame f) {
    super();
    myFrame = f;
    public void windowClosing(WindowEvent e) {
    myFrame.dispose();
    } //end of MyAdapter class
    Frame java file: main body of program implemented by MortgageCalculator file
    import java.awt.*; //imports awt's
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;
    class MyFrame4 extends Frame implements TextListener, ActionListener {    //class constructs the frame and layout
    Button loanButton1 = new Button("Loan 1"), //creates and labels buttons
    loanButton2 = new Button("Loan 2"),
    loanButton3 = new Button("Loan 3"),
    clearButton = new Button("clear/New");
    TextField principalField = new TextField("0.00", 15), //sets TextField properties
    rateField = new TextField("0.00", 3), //adds field lenghts and initial properties
    yearsField = new TextField("0", 3),
    paymentField = new TextField("0.00", 15),
    intpaymentTextArea = new TextField("0.00", 40);
    double principal, rate, ratePercent; //assigns variables
    int years, n;
    final int paymentsPerYear = 12;
    final int timesPerYearCalculated = 12;
    double effectiveAnnualRate;
    double payment;      
    public MyFrame4() { //beginnig of frame constructor
    setTitle("Mortgage Payment Calculator");
    setLayout(new GridLayout(14, 2));
    Label title1Label = new Label("Enter loan amount then select a loan option");
    Label title2Label = new Label("or enter an interest rate and years");
    Label principalLabel = new Label("Loan Amount $"), // constructs labels
    rateLabel = new Label("Rate (%)"),
    yearsLabel = new Label("Years"),
    loan1Label = new Label("7 years at 5.35%"), //asigns labels
    loan2Label = new Label("15 years at 5.5%"),
    loan3Label = new Label("30 years at 5.75%%"),
    paymentLabel = new Label("Payment $"),
    intpaymentLabel = new Label("Ammortization Schedule");
    Panel title1LabelPanel = new Panel (new FlowLayout(FlowLayout.RIGHT));
    Panel title2LabelPanel = new Panel (new FlowLayout(FlowLayout.RIGHT));
    Panel principalLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)), // places label positions and button panels
    loan1LabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    loan2LabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    loan3LabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    rateLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    yearsLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    paymentLabelPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    intpaymentLabelPanel = new Panel(new FlowLayout(FlowLayout.CENTER));
    Panel principalFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    loan1ButtonPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    loan2ButtonPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    loan3ButtonPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    rateFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    yearsFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    paymentFieldPanel = new Panel(new FlowLayout(FlowLayout.LEFT)),
    clearButtonPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    blankPanel = new Panel(new FlowLayout(FlowLayout.RIGHT)),
    intpaymentTextAreaPanel = new Panel(new FlowLayout(FlowLayout.RIGHT));
    title1LabelPanel.add(title1Label);
    title1LabelPanel.add(title2Label);
    principalLabelPanel.add(principalLabel); //adds labels buttons and fields
    principalFieldPanel.add(principalField);
    loan1LabelPanel.add(loan1Label);
    loan1ButtonPanel.add(loanButton1);
    loan2LabelPanel.add(loan2Label);
    loan2ButtonPanel.add(loanButton2);
    loan3LabelPanel.add(loan3Label);
    loan3ButtonPanel.add(loanButton3);
    clearButtonPanel.add(clearButton);
    rateLabelPanel.add(rateLabel);
    rateFieldPanel.add(rateField);
    rateField.setEditable(true);
    yearsLabelPanel.add(yearsLabel);
    yearsFieldPanel.add(yearsField);
    yearsField.setEditable(true);
    paymentLabelPanel.add(paymentLabel);
    paymentFieldPanel.add(paymentField);
    paymentField.setEditable(false);
    intpaymentLabelPanel.add(intpaymentLabel);
    intpaymentTextAreaPanel.add(intpaymentTextArea);
    intpaymentTextArea.setEditable(false);
    add(title1LabelPanel);
    add(title2LabelPanel);
    add(principalLabelPanel);
    add(principalFieldPanel);
    add(loan1LabelPanel);
    add(loan1ButtonPanel);
    add(loan2LabelPanel);
    add(loan2ButtonPanel);
    add(loan3LabelPanel);
    add(loan3ButtonPanel);
    add(rateLabelPanel);
    add(rateFieldPanel);
    add(yearsLabelPanel);
    add(yearsFieldPanel);
    add(paymentLabelPanel);
    add(paymentFieldPanel);
    add(clearButtonPanel);
    add(intpaymentLabelPanel);
    add(blankPanel);
    add(intpaymentTextAreaPanel);
    loanButton1.addActionListener(this); //assigns ActionListener to buttons
    loanButton2.addActionListener(this);
    loanButton3.addActionListener(this);
    clearButton.addActionListener(this);
    principalField.addTextListener(this); //adds TextListener to fields
    rateField.addTextListener(this);
    yearsField.addTextListener(this);
    addWindowListener(new MyAdapter(this));
    pack(); //resizes window to fit components
    setVisible(true);
    DecimalFormat currency = new DecimalFormat("####0.00"); //sets currency format
    public void actionPerformed(ActionEvent e){ //checks for buttons clicked and sets variables to fields
         //wanted to get data from array but couldnt make it work
              if(e.getSource() == loanButton1){
                   rateField.setText("5.85");
                   yearsField.setText("7");
         if(e.getSource() == loanButton2){
                   rateField.setText("5.5");
              yearsField.setText("20");           
              if(e.getSource() == loanButton3){
                   rateField.setText("5.75");
              yearsField.setText("30");     
              if(e.getSource() == clearButton){
                   rateField.setText("0.00");
              yearsField.setText("0");
              principalField.setText("0.00");           
    public void textValueChanged(TextEvent e) {  //checks field variables and sends to calculations
    Object source = e.getSource();
    if (source == principalField
    || source == rateField
    || source == yearsField) {
    try {
    principal = Double.parseDouble(principalField.getText()); //perform calculations for payment
    ratePercent = Double.parseDouble(rateField.getText());
    rate = ratePercent / 100.0;
    years = Integer.parseInt(yearsField.getText());
    n = paymentsPerYear * years;
    effectiveAnnualRate = rate / paymentsPerYear;
    payment =
    principal
    * (effectiveAnnualRate
    / (1 - Math.pow(1 + effectiveAnnualRate, -n)));
    DecimalFormat payForm = new DecimalFormat("####.##"); //performs calculations for Ammortization text area
    int num_Months = years*12;     
    double i = ratePercent/1200;
    payment = principal*((i*(Math.pow((1+i),num_Months)))/((Math.pow((1+i),num_Months))-1));               
    int num_Payments = num_Months-1;
    int month_counter = 0;
    double intPaid = 0;
    double balance = principal;
    intpaymentTextArea.setText("");
    while (month_counter <= num_Months){
    intPaid = balance * i;
    balance = balance - (payment - intPaid);
    intpaymentTextArea.setText(("Month ")+month_counter+( " - Payment: $")
    payForm.format(payment)" Balance: "
    payForm.format(balance)(" Interest Paid: $")
    payForm.format(intPaid)"\n");
    month_counter++;
    paymentField.setText(currency.format(payment)); //display payment
    } catch (NumberFormatException ex) {  //catch exceptions
    } //end of MyFrame4 Class

    Another suggestion is post only the necessary code that exemplifies the unexpected behavior, and don't forget to use code tags when you're posting code. Look for CODE button when writing the post! This way your code will be well formatted and more readable. It also increases the chance of someone reading it and help you.

  • Business Graphics - Chart Type - Columns, and Simple Scatter Type

    Hi,
        I am interested to know more about Business Graphics Specially Chart types Columns and
    Scatter type ( and Time Scatter).  I am facing problem in producing X and Y Co-ordinate values for Charts. (Specially Date Values in X Axis.). I tried with Time Scatter type and need more documents.
    Expecting Good Documents and suggestions.
    Thanks, 
             Vinod V

    Hi
    Check this link
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/86/243f403f0a9354e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nwmobile71/helpdata/en/0b/79553b066d9414e10000000a114084/frameset.htm
    https://help.sap.com/saphelp_nw04/helpdata/en/0c/95c83956852b51e10000000a114084/frameset.htm
    thanks

  • How do I add a mortgage calculator or any calculator

    how do I add to a realtors website a mortgage calculator

    Hi,
    I was wondering if there is a way of adding a different type of calculator into Muse.  I am opening a printing business and would like to have a calculator for clients to be able to calculate the price of their prints based on the dimensions they choose.  The client would enter the height and width of his/her print and get the price automatically calculated for them.  I also would like for the calculator to give the client the minimum number of pixels to produce such print.  I can create such calculator on Excel.  Would it be possible to embed it into Muse somehow?  Many thanks for your help!

  • IGS graphics chart onclick event

    hi everybody,
    iv'e included an igs graphics element (a simple chart) in my bsp and i want to fetch an event when the
    user clicks on a certain bar. for example, redirect him to a certain url. is this possible?
    thanks in advance,
    dsp

    thx a lot, this works perfectly for me.
    if anyone is interested, the coding must look like this:
    data: point TYPE REF TO if_ixml_element.
    point->set_attribute(  name = 'extension'
                                     value = 'href=http://sdn.sap.com' ).

  • Any help with Graphics/Chart builder PLEASE!!

    I am dying here. I have some charts I need to produce and can't for the life of me figure out graphics builder. Can anyone point me in a good direction to a good source for information???
    Thanks,
    Dia

    Hi Dia,
    Did you start with the quick tours? If you've lost your program groups, you can find them in:
    ...\TOOLS\DOC60\us\D2k\Gr\There's six tours - gr1.htm, gr2.htm, ... gr6.htm.
    regards,
    Stewart

  • Reports 9.0.2. How to dynamically set graphic/chart width in paper layout?

    Hi there,
    I have a graphic with vertical bars in paper layout. Its width ranges from quarter of a A4 page width to several ones spanned. I have made the page width large enough but can not control the graphic width dynamically and when too much data must be shown on the X axis the bars get too thick to read.
    Is there another way except of?:
    - making the graph middle-sized and hoping that the client will not notice the visual glitch when too much or less data is the case;
    - using JSP (this is not an option here).
    To make the things worse, when the graph is expanded beyond a A4 page width or something its border reflects the change, but its contents is ugly shrunk.
    As I browsed this forum, I got convinced that the only way to get the graph under control at some extend is to use JSP web report.
    Anyone with experience on this? 10x in advance folks.

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

Maybe you are looking for