what's going wrong here

Zyan Ocular <[email protected]> Tue, 8 Mar 2005 17:54:20 +0530
Newsgroups gmane.comp.krysalis.jcharts.devel
Message-ID <[email protected]>
hi all ,
i'm developing a financial data chart  but facing some problems using jcharts:

this is in the try block of the service method :

>>

LegendProperties legendProperties = new LegendProperties();
		ChartProperties chartProperties = new ChartProperties();
		AxisProperties axisProperties = new AxisProperties( false );

		ChartFont axisScaleFont = new ChartFont( new Font( "Georgia Negreta
cursiva", Font.PLAIN, 13 ), Color.black );
		axisProperties.getXAxisProperties().setScaleChartFont( axisScaleFont );
		axisProperties.getYAxisProperties().setScaleChartFont( axisScaleFont );

		ChartFont axisTitleFont = new ChartFont( new Font( "Arial Narrow",
Font.PLAIN, 14 ), Color.black );
		axisProperties.getXAxisProperties().setTitleChartFont( axisTitleFont );
		axisProperties.getYAxisProperties().setTitleChartFont( axisTitleFont );

		Stroke[] strokes= { LineChartProperties.DEFAULT_LINE_STROKE,
LineChartProperties.DEFAULT_LINE_STROKE,
LineChartProperties.DEFAULT_LINE_STROKE };
		Shape[] shapes= {null};
		LineChartProperties lineChartProperties = new
LineChartProperties(strokes,shapes);

		String[] xAxisLabels= {"1998", "1999", "2000", "2001", "2002",
"2003", "2004"};
		String xAxisTitle= "Years";
		String yAxisTitle= "Problems";
		String title= "Market Behavior: 5 day index";
		DataSeries dataSeries = new DataSeries( xAxisLabels, xAxisTitle,
yAxisTitle,title );


		//From AxisChartServlet.java:createAxisChartDataSet
		double[][] data=  new double[][]{{1500, 6880, 4510, 2600, 1200, 1580, 8000}};;
		String[] legendLabels= { "Bugs"};
		Paint[] paints= new Paint[]{Color.blue.darker()};
		AxisChartDataSet acds = new AxisChartDataSet(data, legendLabels,
paints,ChartType.LINE, lineChartProperties );
		dataSeries.addIAxisPlotDataSet(acds);
		AxisChart axisChart = new AxisChart(dataSeries, chartProperties,
axisProperties,legendProperties, 550, 360);

		ServletEncoderHelper.encodeJPEG13(axisChart, 1.0f, resp);



>>


Was trying to stream the pic to the page as well as to the disk, but
some error is occuring because of which i am not getting any image.

Can you help me with what is it that i am doing wrong?


Best Regards,
auto.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click