From: Carlos D B. <cdb...@us...> - 2003-12-04 18:55:36
|
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... |