From: Jeremias M. <dev...@gr...> - 2004-03-07 16:19:06
|
Hello Arcadius, I'm not directly involved in the JCharts project so I'm simply forwarding your question to the right mailing list: jch...@li... You can subscribe here: http://sourceforge.net/mail/?group_id=16161 Forwarded by Jeremias Maerki <dev...@gr...> ----------------------- Original Message ----------------------- From: "Arcadius A." <ah...@sh...> To: jm...@us... Date: Sun, 07 Mar 2004 01:28:12 +0100 Subject: JCharts question ---- Hello! I'm new to JCharts. I'm trying to modify the "ScatterPlotChartServlet" example to do what I need. The actual code in "ScatterPlotChartServlet" looks like the following: private ScatterPlotDataSet createScatterPlotDataSet() { Point2D.Double[] points = new Point2D.Double[ 20 ]; Point2D.Double[] points2 = new Point2D.Double[ 20 ]; for( int x = 0; x < 20; x++ ) { //--- y = x2 points[ x ] = ScatterPlotDataSet.createPoint2DDouble(); points[ x ].setLocation( x, Math.pow(x,2 ) ); } ScatterPlotDataSet scatterPlotDataSet = new ScatterPlotDataSet( this.createScatterPlotProperties() ); scatterPlotDataSet.addDataPoints( points, Color.red, "Proprietary" ); return scatterPlotDataSet; } Me, I'd like to draw 3 graphs, for instance : y=Math.pow(x,2) y=Math.pow(x,3) y=Math.sin(Math.PI*x) on the SAME chart. My question is: How can I modify the code of the "ScatterPlotChartServlet" above to have 3 graphs on the SAME chart? creating two others points2[] and points3[] objects for the 2 remaining graphs did not help. Thanks. Arcadius. --------------------- Original Message Ends -------------------- Jeremias Maerki |