From: Nathaniel G. A. <nat...@ya...> - 2002-11-12 18:49:40
|
I am not sure what you are asking. The ChartServlet used in the demo code was just for that demo code and not intended to be part of the core jcharts API. You certainly can copy it from the demo and modify it to do whatever you need. Each chart on a page needs a separate request to the Server. so you would need two or more <img> tags. Yes, the encode(...) methods return void. Would you prefer them to return something? --- Ravi <rvb...@re...> wrote: > Hello Nathaniel, > > Thank you for the guidance. I ve a query about chart servlet, i > used the servlet for viewing more than 1 graph on one page with > different data inputs and different types of graphs (charts). > Secondly, the encoder/encoder13 class returns nothing (void), > could you pls. clear my doubt about the encoding technique you ve > used. I m stuck at this point for using jChart for more than 1 > graph on jsp page and about the encoding technique. > > Reply awaited. > > Regards, > Ravi. > > > On Fri, 01 Nov 2002 Nathaniel G. Auvil wrote : > > > >hi ravi. > > > >all the user guide charts use randomly generated data for the > >plots. If you download the user > >guide, it includes all the source used to generate the charts. > > > > > >here is the code it used to generate a LineChart: > > > > > >/******************************************************************************************/ > > private void basicChart() throws ChartDataException > > { > > String[] xAxisLabels= { "1998", "1999", "2000", "2001", > >"2002", "2003", "2004" }; > > String xAxisTitle= "Years"; > > String yAxisTitle= "Problems"; > > String title= "Micro$oft at Work"; > > DataSeries dataSeries = new DataSeries( xAxisLabels, > >xAxisTitle, yAxisTitle, title ); > > > > > > double[][] data= TestDataGenerator.getRandomNumbers( 1, 7, 0, > >6000 ); > > String[] legendLabels= { "Bugs" }; > > Paint[] paints= TestDataGenerator.getRandomPaints( 1 ); > > > > Stroke[] strokes= { LineChartProperties.DEFAULT_LINE_STROKE > >}; > > Shape[] shapes= { PointChartProperties.SHAPE_CIRCLE }; > > LineChartProperties lineChartProperties= new > >LineChartProperties( strokes, shapes ); > > > > AxisChartDataSet axisChartDataSet= new AxisChartDataSet( data, > >legendLabels, paints, > >ChartType.LINE, lineChartProperties ); > > > > dataSeries.addIAxisChartDataSet( axisChartDataSet ); > > > > ChartProperties chartProperties= new ChartProperties(); > > AxisProperties axisProperties= new AxisProperties(); > > LegendProperties legendProperties= new LegendProperties(); > > > > AxisChart axisChart= new AxisChart( dataSeries, > >chartProperties, axisProperties, > >legendProperties, AxisCharts.width, AxisCharts.height ); > > > > super.exportImage( axisChart, "basicChart" ); > > } > > > > > > > > > > > >--- "Ravi Bhatia." <rvb...@re...> wrote: > > > Hello, > > > > > > This is in reference to Jchart Examples mentioned in your > > > site. The snippet provided for Linechart is not generating > >the > > > corresponding chart when we executed in JSP page. Would > > > you pls help us in this regard. We would be grateful if you > > > could send us some code-snippets which will fetch the data > > > from outside entity dynamically and plot the graph > > > accordingly. > > > > > > thanking you. > > > awaiting your reply. > > > > > > Ravi Bhatia. > > > Technical Team Lead. > > > CIPL, Mumbai. > > > > > >===== > >An easy read on your Digital Rights Disappearing > >[http://newsforge.com/newsforge/02/10/21/1449250.shtml?tid=19] > > > >__________________________________________________ > >Do you Yahoo!? > >HotJobs - Search new jobs daily now > >http://hotjobs.yahoo.com/ > > > Whistler. ===== An easy read on your Digital Rights Disappearing [http://newsforge.com/newsforge/02/10/21/1449250.shtml?tid=19] __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 |