problem in accesing dynamic data and no image is displaying on the browser

pradeep kumar <[email protected]> Fri, 22 Sep 2006 10:25:59 -0700 (PDT)
Newsgroups gmane.comp.krysalis.jcharts.devel
Message-ID <[email protected]>
--===============1351362725==
Content-Type: multipart/alternative; boundary="0-518703348-1158945959=:40928"
Content-Transfer-Encoding: 7bit

--0-518703348-1158945959=:40928
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

i want to create bar chart fom a database table=20
  i written the below code but it is not displaying any image plz help me=
 very urgent
  =20
  =20
  =20
  =20
  =20
  /**********************************************************************=
*************************
 * File Info: $Id: BarChartServlet.java,v 1.5 2003/04/19 01:41:27 nathani=
el_auvil Exp $
 * Copyright (C) 2002
 * Author: Nathaniel G. Auvil
 * Contributor(s):
 *
 * Copyright 2002 (C) Nathaniel G. Auvil. All Rights Reserved.
 *
 * Redistribution and use of this software and associated documentation (=
"Software"), with or
 * without modification, are permitted provided that the following condit=
ions are met:
 *
 * 1. Redistributions of source code must retain copyright statements and=
 notices.
 *  Redistributions must also contain a copy of this document.
 *
 * 2. Redistributions in binary form must reproduce the above copyright n=
otice, this list of
 *  conditions and the following disclaimer in the documentation and/or o=
ther materials
 *  provided with the distribution.
 *
 * 3. The name "jCharts" or "Nathaniel G. Auvil" must not be used to endo=
rse or promote
 *  products derived from this Software without prior written permission =
of Nathaniel G.
 *  Auvil.  For written permission, please contact nathaniel_auvil@users.=
sourceforge.net
 *
 * 4. Products derived from this Software may not be called "jCharts" nor=
 may "jCharts" appear
 *  in their names without prior written permission of Nathaniel G. Auvil=
. jCharts is a
 *  registered trademark of Nathaniel G. Auvil.
 *
 * 5. Due credit should be given to the jCharts Project (http://jcharts.s=
ourceforge.net/).
 *
 * THIS SOFTWARE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS =
IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IM=
PLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  =
IN NO EVENT SHALL
 * jCharts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDE=
NTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PR=
OCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINE=
SS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STR=
ICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE =
OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
 ************************************************************************=
************************/
  package com.objectplanet.chart.testing;
 =20
import org.jCharts.axisChart.AxisChart;
import org.jCharts.axisChart.customRenderers.axisValue.renderers.ValueLab=
elPosition;
import org.jCharts.axisChart.customRenderers.axisValue.renderers.ValueLab=
elRenderer;
import org.jCharts.chartData.AxisChartDataSet;
import org.jCharts.chartData.DataSeries;
import org.jCharts.chartData.interfaces.IAxisDataSeries;
import org.jCharts.encoders.ServletEncoderHelper;
import org.jCharts.properties.*;
import org.jCharts.properties.util.ChartFont;
import org.jCharts.types.ChartType;
import java.sql.*;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import java.awt.*;
import java.io.IOException;
import java.io.*;
import java.util.*;
  public class barcheck extends HttpServlet {
    //---all of my charts serviced by this Servlet will have the same pro=
perties.
    private BarChartProperties barChartProperties;
   =20
    //---all of my charts serviced by this Servlet will have the same pro=
perties.
    protected LegendProperties legendProperties;
    protected AxisProperties axisProperties;
    protected ChartProperties chartProperties;
   =20
    protected int width =3D 550;
    protected int height =3D 360;
   =20
   =20
    /********************************************************************=
**************************
     *
     ********************************************************************=
**************************/
    public void init() {
        this.legendProperties =3D new LegendProperties();
        this.chartProperties =3D new ChartProperties();
        this.axisProperties =3D new AxisProperties( false );
        ChartFont axisScaleFont =3D new ChartFont( new Font( "Georgia Neg=
reta cursiva", Font.PLAIN, 13 ), Color.black );
        axisProperties.getXAxisProperties().setScaleChartFont( axisScaleF=
ont );
        axisProperties.getYAxisProperties().setScaleChartFont( axisScaleF=
ont );
       =20
        ChartFont axisTitleFont =3D new ChartFont( new Font( "Arial Narro=
w", Font.PLAIN, 14 ), Color.black );
        axisProperties.getXAxisProperties().setTitleChartFont( axisTitleF=
ont );
        axisProperties.getYAxisProperties().setTitleChartFont( axisTitleF=
ont );
       =20
        DataAxisProperties dataAxisProperties =3D (DataAxisProperties) ax=
isProperties.getYAxisProperties();
       =20
        try {
            dataAxisProperties.setUserDefinedScale( -3000, 3000 );
        } catch( PropertyException propertyException ) {
            propertyException.printStackTrace();
        }
       =20
        dataAxisProperties.setRoundToNearest( 2 );
       =20
        ChartFont titleFont =3D new ChartFont( new Font( "Georgia Negreta=
 cursiva", Font.PLAIN, 14 ), Color.black );
        this.chartProperties.setTitleFont( titleFont );
       =20
        this.barChartProperties =3D new BarChartProperties();
       =20
        ValueLabelRenderer valueLabelRenderer =3D new ValueLabelRenderer(=
 false, false, true, -1 );
        valueLabelRenderer.setValueLabelPosition( ValueLabelPosition.ON_T=
OP );
        valueLabelRenderer.useVerticalLabels( false );
        barChartProperties.addPostRenderEventListener( valueLabelRenderer=
 );
       =20
    }
   =20
   =20
    /********************************************************************=
**************************
     *
     ********************************************************************=
**************************/
    public void service( HttpServletRequest req, HttpServletResponse http=
ServletResponse ) throws ServletException, IOException {
        try {
            DriverManager.registerDriver(new oracle.jdbc.driver.OracleDri=
ver());
            Connection con;
            con =3D DriverManager.getConnection("jdbc:oracle:thin:@127.0.=
0.1:1521:BSL","scott","tiger");
            System.out.println(con);
            Statement stmt =3D con.createStatement();
            ResultSet rs =3D stmt.executeQuery("select * from account");
            ResultSetMetaData rmd=3Drs.getMetaData();
            String xAxisTitle =3D rmd.getColumnLabel(1);
            String yAxisTitle =3D rmd.getColumnLabel(2);
           =20
           =20
            String[] xAxisLabels=3Dnew String[20];
            PrintWriter out=3DhttpServletResponse.getWriter();
            int i=3D0;
           double[][] data =3D new double[20][20];
            int j=3D0;
            while(rs.next())
            {      =20
                 xAxisLabels[i]=3D rs.getString(2);=20
                 data[i][0]=3Drs.getDouble(1) ;
                 i++;
            }  =20
            String title =3D "Micro$oft At Work";
            IAxisDataSeries dataSeries =3D new DataSeries( xAxisLabels, x=
AxisTitle, yAxisTitle, title );
           =20
           =20
            String[] legendLabels =3D {"Bugs"};
            Paint[] paints =3D new Paint[]{Color.yellow};
            dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data, l=
egendLabels, paints, ChartType.BAR, this.barChartProperties ) );
           =20
            AxisChart axisChart =3D new AxisChart( dataSeries, this.chart=
Properties, this.axisProperties, this.legendProperties, this.width, this.=
height );
            ServletEncoderHelper.encodeJPEG13( axisChart, 1.0f, httpServl=
etResponse );
        } catch( Throwable throwable ) {
            //HACK do your error handling here...
            throwable.printStackTrace();
        }
    }
}









 	=09
---------------------------------
 All-new Yahoo! Mail - Fire up a more powerful email and get things done =
faster.
--0-518703348-1158945959=:40928
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

<div>i want to create bar chart fom a database table </div>  <div>i writt=
en the below code but it is not displaying any image plz help me very urg=
ent</div>  <div>&nbsp;</div>  <div>&nbsp;</div>  <div>&nbsp;</div>  <div>=
&nbsp;</div>  <div>&nbsp;</div>  <div>/**********************************=
*************************************************************<BR>&nbsp;* =
File Info: $Id: BarChartServlet.java,v 1.5 2003/04/19 01:41:27 nathaniel_=
auvil Exp $<BR>&nbsp;* Copyright (C) 2002<BR>&nbsp;* Author: Nathaniel G.=
 Auvil<BR>&nbsp;* Contributor(s):<BR>&nbsp;*<BR>&nbsp;* Copyright 2002 (C=
) Nathaniel G. Auvil. All Rights Reserved.<BR>&nbsp;*<BR>&nbsp;* Redistri=
bution and use of this software and associated documentation ("Software")=
, with or<BR>&nbsp;* without modification, are permitted provided that th=
e following conditions are met:<BR>&nbsp;*<BR>&nbsp;* 1. Redistributions =
of source code must retain copyright statements and notices.<BR>&nbsp;* &=
nbsp;Redistributions must also contain
 a copy of this document.<BR>&nbsp;*<BR>&nbsp;* 2. Redistributions in bin=
ary form must reproduce the above copyright notice, this list of<BR>&nbsp=
;* &nbsp;conditions and the following disclaimer in the documentation and=
/or other materials<BR>&nbsp;* &nbsp;provided with the distribution.<BR>&=
nbsp;*<BR>&nbsp;* 3. The name "jCharts" or "Nathaniel G. Auvil" must not =
be used to endorse or promote<BR>&nbsp;* &nbsp;products derived from this=
 Software without prior written permission of Nathaniel G.<BR>&nbsp;* &nb=
sp;Auvil.&nbsp; For written permission, please contact <A href=3D"mailto:=
[email protected]">[email protected].=
net</A><BR>&nbsp;*<BR>&nbsp;* 4. Products derived from this Software may =
not be called "jCharts" nor may "jCharts" appear<BR>&nbsp;* &nbsp;in thei=
r names without prior written permission of Nathaniel G. Auvil. jCharts i=
s a<BR>&nbsp;* &nbsp;registered trademark of Nathaniel G. Auvil.<BR>&nbsp=
;*<BR>&nbsp;* 5. Due credit should be
 given to the jCharts Project (<A href=3D"http://jcharts.sourceforge.net/=
">http://jcharts.sourceforge.net/</A>).<BR>&nbsp;*<BR>&nbsp;* THIS SOFTWA=
RE IS PROVIDED BY Nathaniel G. Auvil AND CONTRIBUTORS ``AS IS'' AND ANY<B=
R>&nbsp;* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,=
 THE IMPLIED WARRANTIES OF<BR>&nbsp;* MERCHANTABILITY AND FITNESS FOR A P=
ARTICULAR PURPOSE ARE DISCLAIMED.&nbsp; IN NO EVENT SHALL<BR>&nbsp;* jCha=
rts OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, S=
PECIAL,<BR>&nbsp;* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NO=
T LIMITED TO, PROCUREMENT OF<BR>&nbsp;* SUBSTITUTE GOODS OR SERVICES; LOS=
S OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<BR>&nbsp;* HOWEVER =
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,STRICT LIABILI=
TY, OR TORT<BR>&nbsp;* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY=
 WAY OUT OF THE USE OF THIS SOFTWARE, EVEN<BR>&nbsp;* IF ADVISED OF THE P=
OSSIBILITY OF SUCH
 DAMAGE<BR>&nbsp;********************************************************=
****************************************/</div>  <div>package com.objectp=
lanet.chart.testing;</div>  <div><BR>import org.jCharts.axisChart.AxisCha=
rt;<BR>import org.jCharts.axisChart.customRenderers.axisValue.renderers.V=
alueLabelPosition;<BR>import org.jCharts.axisChart.customRenderers.axisVa=
lue.renderers.ValueLabelRenderer;<BR>import org.jCharts.chartData.AxisCha=
rtDataSet;<BR>import org.jCharts.chartData.DataSeries;<BR>import org.jCha=
rts.chartData.interfaces.IAxisDataSeries;<BR>import org.jCharts.encoders.=
ServletEncoderHelper;<BR>import org.jCharts.properties.*;<BR>import org.j=
Charts.properties.util.ChartFont;<BR>import org.jCharts.types.ChartType;<=
BR>import java.sql.*;<BR>import javax.servlet.ServletException;<BR>import=
 javax.servlet.http.*;<BR>import java.awt.*;<BR>import java.io.IOExceptio=
n;<BR>import java.io.*;<BR>import java.util.*;</div>  <div>public class b=
archeck extends HttpServlet
 {<BR>&nbsp;&nbsp;&nbsp; //---all of my charts serviced by this Servlet w=
ill have the same properties.<BR>&nbsp;&nbsp;&nbsp; private BarChartPrope=
rties barChartProperties;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; //=
---all of my charts serviced by this Servlet will have the same propertie=
s.<BR>&nbsp;&nbsp;&nbsp; protected LegendProperties legendProperties;<BR>=
&nbsp;&nbsp;&nbsp; protected AxisProperties axisProperties;<BR>&nbsp;&nbs=
p;&nbsp; protected ChartProperties chartProperties;<BR>&nbsp;&nbsp;&nbsp;=
 <BR>&nbsp;&nbsp;&nbsp; protected int width =3D 550;<BR>&nbsp;&nbsp;&nbsp=
; protected int height =3D 360;<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nb=
sp; <BR>&nbsp;&nbsp;&nbsp; /*********************************************=
*************************************************<BR>&nbsp;&nbsp;&nbsp;&n=
bsp; *<BR>&nbsp;&nbsp;&nbsp;&nbsp; **************************************=
********************************************************/<BR>&nbsp;&nbsp;=
&nbsp; public void init()
 {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.legendProperties =3D=
 new LegendProperties();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; th=
is.chartProperties =3D new ChartProperties();<BR>&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp; this.axisProperties =3D new AxisProperties( false );<B=
R>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChartFont axisScaleFont =3D =
new ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 13 ), Col=
or.black );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; axisProperties.=
getXAxisProperties().setScaleChartFont( axisScaleFont );<BR>&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; axisProperties.getYAxisProperties().setScal=
eChartFont( axisScaleFont );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChartFont axisTitleFont =
=3D new ChartFont( new Font( "Arial Narrow", Font.PLAIN, 14 ), Color.blac=
k );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; axisProperties.getXAxi=
sProperties().setTitleChartFont( axisTitleFont
 );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; axisProperties.getYAxis=
Properties().setTitleChartFont( axisTitleFont );<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Data=
AxisProperties dataAxisProperties =3D (DataAxisProperties) axisProperties=
.getYAxisProperties();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; try {<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataAxisProperties.setUserD=
efinedScale( -3000, 3000 );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
 } catch( PropertyException propertyException ) {<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; propertyException.printSta=
ckTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; dataAxisProperties.setRoundToNearest( 2 );<BR>&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;
 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChartFont titleFont =3D n=
ew ChartFont( new Font( "Georgia Negreta cursiva", Font.PLAIN, 14 ), Colo=
r.black );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.chartProper=
ties.setTitleFont( titleFont );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; this.barChartProperti=
es =3D new BarChartProperties();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ValueLabelRenderer v=
alueLabelRenderer =3D new ValueLabelRenderer( false, false, true, -1 );<B=
R>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; valueLabelRenderer.setValueL=
abelPosition( ValueLabelPosition.ON_TOP );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp; valueLabelRenderer.useVerticalLabels( false );<BR>&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; barChartProperties.addPostRenderEvent=
Listener( valueLabelRenderer );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp; <BR>&nbsp;&nbsp;&nbsp;
 }<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; /*=
*************************************************************************=
********************<BR>&nbsp;&nbsp;&nbsp;&nbsp; *<BR>&nbsp;&nbsp;&nbsp;&=
nbsp; *******************************************************************=
***************************/<BR>&nbsp;&nbsp;&nbsp; public void service( H=
ttpServletRequest req, HttpServletResponse httpServletResponse ) throws S=
ervletException, IOException {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp; try {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()=
);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Connection con;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; con =3D DriverManager.getConnection("jdbc:oracle:thin:@127.0=
.0.1:1521:BSL","scott","tiger");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 System.out.println(con);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp; Statement stmt =3D con.createStatement();<BR>&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ResultSet r=
s =3D stmt.executeQuery("select * from account");<BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ResultSetMetaData rmd=3Drs=
.getMetaData();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp; String xAxisTitle =3D rmd.getColumnLabel(1);<BR>&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String yAxisTitle =
=3D rmd.getColumnLabel(2);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; String[] xAxisLabels=3Dnew String[20];<BR>&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PrintWriter
 out=3DhttpServletResponse.getWriter();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int i=3D0;<BR>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double[][] data =3D new double[20]=
[20];<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p; int j=3D0;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp; while(rs.next())<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp; xAxisLabels[i]=3D rs.getString(2); <BR>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; data[i][0]=3Drs.getDouble(1) ;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i++;<BR=
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbs=
p;&nbsp;
 <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S=
tring title =3D "Micro$oft At Work";<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IAxisDataSeries dataSeries =3D new Data=
Series( xAxisLabels, xAxisTitle, yAxisTitle, title );<BR>&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String[] legendLabels =3D =
{"Bugs"};<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp; Paint[] paints =3D new Paint[]{Color.yellow};<BR>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dataSeries.addIAxisPlot=
DataSet( new AxisChartDataSet( data, legendLabels, paints, ChartType.BAR,=
 this.barChartProperties ) );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp; AxisChart axisChart =3D
 new AxisChart( dataSeries, this.chartProperties, this.axisProperties, th=
is.legendProperties, this.width, this.height );<BR>&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ServletEncoderHelper.encodeJ=
PEG13( axisChart, 1.0f, httpServletResponse );<BR>&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp; } catch( Throwable throwable ) {<BR>&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //HACK do your error ha=
ndling here...<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp; throwable.printStackTrace();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; }<BR>}<BR></div><BR><BR><DIV>
<DIV>
<DIV>
<DIV>
<DIV><A href=3D"http://www.flamingtext.com/ymail.html" target=3D_top></A>=
</DIV><A href=3D"http://www.flamingtext.com/ymail.html" target=3D_top></A=
><A href=3D"http://www.flamingtext.com/ymail.html" target=3D_top><IMG alt=
=3D"Image by FlamingText.com" src=3D"http://ymail.flamingtext.com/ymail/2=
005/01/27/flamingtext_com_1106818644_23535.jpg" border=3D0></A><A href=3D=
"http://www.flamingtext.com/ymail.html" target=3D_top></A></DIV></DIV></D=
IV></DIV><p>&#32;
		<hr size=3D1><a href=3D"http://us.rd.yahoo.com/evt=3D43256/*http://advi=
sion.webevents.yahoo.com/mailbeta"> All-new Yahoo! Mail </a>- Fire up a m=
ore powerful email and get things done faster.
--0-518703348-1158945959=:40928--


--===============1351362725==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--===============1351362725==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
jCharts-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jcharts-developers

--===============1351362725==--