Simple JChart question

"Arcadius A." <[email protected]>
Newsgroups gmane.comp.krysalis.jcharts.user
Message-ID <[email protected]>
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.

AA.



-------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.