Package Controls

Examples of Controls.MultipleChart


       
       
        jtpAnalisys.addTab("Account review", jspSpent);
        stNew.setData(strGroups, dblMonthSpent, strDates);
        //then as a plot
        JScrollPane jspChart=new JScrollPane(new MultipleChart(strGroups, dblMonthSpent, strDates, "Spent"));
        jtpAnalisys.addTab("Expenses by months", jspChart);
        //jtpAnalisys.setToolTipTextAt(1, "Outcome by months");
        //percent of money spent to different groups in months tab 3
        //dblMonthSpent[group number][month number]
        double[] dblMonthTotal=new double[dblMonthSpent[0].length]//the total amount of spend money per month
        for(int x=0; x<dblMonthTotal.length; x++)
        {
            dblMonthTotal[x]=0;
            for(int y=0; y<dblMonthSpent.length; y++)
            {
                if(dblMonthSpent[y][x]>0)
                    dblMonthTotal[x]+=dblMonthSpent[y][x];
            }
        }
        for(int i=0; i<dblMonthSpent.length; i++)
            for(int k=0; k<dblMonthSpent[i].length; k++)
            {
                if(dblMonthSpent[i][k]<0)
                    dblMonthSpent[i][k]=0;
                if(dblMonthTotal[k]!=0)
                    dblMonthSpent[i][k]=dblMonthSpent[i][k]*100/dblMonthTotal[k];

            }
        dblMonthTotal=null;
        MultipleChart mtcPercents=new MultipleChart(strGroups, dblMonthSpent, strDates, "Spent %");
        mtcPercents.setMaxValue(100);
        jspChart=new JScrollPane(mtcPercents);
        jtpAnalisys.addTab("Expenses by months in percent", jspChart);
        //jtpAnalisys.setToolTipTextAt(2, "Outcome by monthsin percent");
        //amount of money on different credit/debit cards at different months tab 3
        jspChart=new JScrollPane(new MultipleChart(strCardNames, dblCardRemainings, strDates, "Balance"));
        jtpAnalisys.addTab("Card balances", jspChart);
        //jtpAnalisys.setToolTipTextAt(3, "Card balances");
    }
View Full Code Here


            intCardPointer--;
        }
        //invert arrays for cards
       
        //amount of money spent to different groups in months tab 1
        MyScrollPane jspChart=new MyScrollPane(new MultipleChart(strGroups, dblMonthSpent, strDates, "Spent"));
        jtpAnalisys.addTab("Expenses by months", jspChart);
        //jtpAnalisys.setToolTipTextAt(1, "Outcome by months");
        //percent of money spent to different groups in months tab 2
        if(dblTotal>0)
        {
            for(int i=0; i<dblMonthSpent.length; i++)
                for(int k=0; k<dblMonthSpent[i].length; k++)
                {  
                    if(dblMonthSpent[i][k]<0)
                        dblMonthSpent[i][k]=0;
                    dblMonthSpent[i][k]=dblMonthSpent[i][k]*100/dblTotal;
                }
        }
        else
        {
            for(int i=0; i<dblMonthSpent.length; i++)
                for(int k=0; k<dblMonthSpent[i].length; k++)
                {
                        dblMonthSpent[i][k]=0;
                }
        }
        MultipleChart mtcPercents=new MultipleChart(strGroups, dblMonthSpent, strDates, "Spent %");
        mtcPercents.setMaxValue(100);
        jspChart=new MyScrollPane(mtcPercents);
        jtpAnalisys.addTab("Expenses by months in percent", jspChart);
        //jtpAnalisys.setToolTipTextAt(2, "Outcome by monthsin percent");
        //amount of money on different credit/debit cards at different months tab 3
        jspChart=new MyScrollPane(new MultipleChart(strCardNames, dblCardRemainings, strDates, "Balance"));
        jtpAnalisys.addTab("Card balances", jspChart);
        //jtpAnalisys.setToolTipTextAt(3, "Card balances");
    }
View Full Code Here

TOP

Related Classes of Controls.MultipleChart

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.