From: Nathaniel G. A. <nat...@ya...> - 2003-12-04 19:03:55
|
hi Carlos. You should just use one AxisChartDataSet with a multi-dimensional array holding all the data for each line. --- Carlos D Bermudez <cdb...@us...> wrote: > I have various data sets that use the same scale so i would like to create > one graph that has mulitple lines (each line representing system usage as > a function of time). The closest example I have seen is the > ComboChartServlet, except that I would like to have multiple line graphs > rather than a line and bar graph. Perhaps there is another graph type > that better suits my needs? I also have a working servlet modeled after > the ScatterPlotServlet example but I likewise can't find a way to get it > to display multiple lines. > > > i think the relevant code is the following few lines where I create the > dataSeries, add the two datasets to it and create the chart. Perhaps > noteworthy is that all the parameters i'm using for the > addIAxisPlotDataSet method are the same except for the data portion, as I > will work on creating appropriate legends and colors later. > > IAxisDataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle, yAxisTitle, title ); > > dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data, legendLabels, linePaints, > ChartType.LINE, this.lineChartProperties ) ); > > dataSeries.addIAxisPlotDataSet( new AxisChartDataSet( data2, legendLabels, linePaints, > ChartType.LINE, this.lineChartProperties ) ); > > AxisChart axisChart = new AxisChart( dataSeries, this.chartProperties, this.axisProperties, > this.legendProperties, this.width, this.height ); > > ServletEncoderHelper.encodeJPEG13( axisChart, 1.0f, resp ); > > This results in just displaying the results for the last data set. > > Any help would be greatly appreciated. > > thanks, > > Carlos Bermudez > Rochester, Minnesota > email: cdb...@us... > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > jCharts-users mailing list > jCh...@li... > https://lists.sourceforge.net/lists/listinfo/jcharts-users __________________________________ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ |