|
From: sitanshu m. <mah...@gm...> - 2006-10-26 12:12:38
|
Hey! shalini
u check out through jfreecharts >>
tht's also another way to achive all this >> bar charts, stacked bar charts,
pie charts and time charts
if u need a jar then i am having >> let me know >> even u can get that from
google!!!
bye!
thanks and regards
Sitanshu Maheshwari
+919911373111
On 10/26/06, KUMARARAJA Shalini <SKu...@co...> wrote:
>
> Hi,
>
>
>
> We need to draw a graph with plots of two different value sets having
> different shapes and colors for those two value sets.
>
> The present method supports only one dataset.
>
>
>
> double maxX=0,maxY=0,minX=0,minY=0;
>
> Point2D.Double[] points = new Point2D.Double
> [TotItems];
>
>
>
> for (int iCount=0;iCount<TotItems;iCount++ )
>
> {
>
> points[iCount] =
> ScatterPlotDataSet.createPoint2DDouble();
>
>
> points[iCount].setLocation(xAxis[iCount], yAxis[iCount]);
>
> if (xAxis[iCount] > maxX)
> maxX=xAxis[iCount];
>
> if (yAxis[iCount] > maxY)
> maxY=yAxis[iCount];
>
> if (yAxis[iCount] < minY)
> minY=yAxis[iCount];
>
> }
>
>
>
> Stroke[] strokes = new Stroke[]{new
> BasicStroke()};
>
> Shape[] shapes = new Shape[]{new Polygon( new
> int[]{0, 5, 10, 5}, new int[]{5, 0, 5, 10}, 4 )};
>
>
>
> ScatterPlotDataSet scatterPlotDataSet = new
> ScatterPlotDataSet( new ScatterPlotProperties( strokes, shapes ) );
>
> scatterPlotDataSet.addDataPoints( points,
> Color.blue, null );
>
>
>
> ScatterPlotDataSeries scatterPlotDataSeries = new
> ScatterPlotDataSeries( scatterPlotDataSet,xAxisTitle,yAxisTitle,null );
>
> DataAxisProperties xAxisProperties = new
> DataAxisProperties();
>
>
>
> /*********The DataSeries created as in the above code is passed as in the
> below code.**************/
>
>
>
> ScatterPlotAxisChart scatterPlotAxisChart = new
> ScatterPlotAxisChart(
> scatterPlotDataSeries,chartProperties,axisProperties,legendProperties,width*2,height*2
> );
>
>
>
> bufferedImage = new BufferedImage(
> scatterPlotAxisChart.getImageWidth(), scatterPlotAxisChart.getImageHeight(),
> BufferedImage.TYPE_INT_RGB );
>
> scatterPlotAxisChart.setGraphics2D(
> bufferedImage.createGraphics() );
>
> scatterPlotAxisChart.render();
>
>
>
> Pls let us know how this can be achieved.
>
>
>
>
>
> Regards,
>
> Shalini.K
>
>
> Confidentiality Statement:
>
> This message is intended only for the individual or entity to which it is
> addressed. It may contain privileged, confidential information which is
> exempt from disclosure under applicable laws. If you are not the intended
> recipient, please note that you are strictly prohibited from disseminating
> or distributing this information (other than to the intended recipient) or
> copying this information. If you have received this communication in error,
> please notify us immediately by return email.
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>
> _______________________________________________
> jCharts-developers mailing list
> jCh...@li...
> https://lists.sourceforge.net/lists/listinfo/jcharts-developers
>
>
>
|