Fw: JCharts question
Jeremias Maerki <[email protected]>
| Newsgroups | gmane.comp.krysalis.jcharts.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Arcadius, I'm not directly involved in the JCharts project so I'm simply forwarding your question to the right mailing list: [email protected] You can subscribe here: http://sourceforge.net/mail/?group_id=16161 Forwarded by Jeremias Maerki <[email protected]> ----------------------- Original Message ----------------------- From: "Arcadius A." <[email protected]> To: [email protected] 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 ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click